Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if(!addonToBuild.PREBUILT_PATH) {
addonToBuild.PREBUILT_PATH = `${addonPath}/pre-built`;
}
fs.removeSync(addonToBuild.PREBUILT_PATH);
const ui = new UI({
inputStream: process.stdin,
outputStream: process.stdout,
errorStream: process.stderr,
writeLevel: 'DEBUG' | 'INFO' | 'WARNING' | 'ERROR',
ci: true | false
});
const project = Project.closestSync(addonPath, ui);
project.initializeAddons();
// Extend the current addon from base Addon
const CurrentAddon = Addon.extend(Object.assign({}, addonToBuild, {root: addonPath, pkg: project.pkg}));
const currAddon = new CurrentAddon(addonPath, project);
// Get the tree for Addon and Vendor
let addonTree = new Funnel (currAddon.treeFor('addon'), {
destDir: 'addon'
});
let vendorTree = new Funnel (currAddon.treeFor('vendor'), {
destDir: 'vendor'
});
// Merge, Build the resulting tree and store it in prebuild path
return build(new Merge([addonTree, vendorTree], { annotation: '[ember-rollup] Merging prebuild addon and vendor tree' }), addonToBuild.PREBUILT_PATH);
}
var Addon = require('ember-cli/lib/models/addon');
var objectAssign = require('object-assign');
var findHost = require('./utils/find-host');
/**
* A simple base class for other addons to extend when they want to generate an
* Asset Manifest.
*
* @class ManifestGenerator
* @extends EmberCliAddon
*/
var ManifestGenerator = Addon.extend({
/**
* Insert a meta tag to hold the manifest in the DOM. We won't insert the
* manifest until after postprocessing so the content is a placeholder value.
*/
contentFor: function(type, config) {
var app = findHost(this);
var options = app && app.options && app.options.assetLoader;
if (type === 'head-footer' && !(options && options.noManifest)) {
var metaName = config.modulePrefix + '/config/asset-manifest';
return '';
}
},
/**
* Generate an Asset Manifest from the "all" post-processing tree with any
* specified manifestOptions.