Make build expose fp mapping in the dist.

This commit is contained in:
John-David Dalton
2015-11-30 20:19:56 -08:00
parent 8154e5e521
commit 230e8d0787

View File

@@ -10,11 +10,10 @@ var minify = require('../common/minify.js');
var basePath = path.join(__dirname, '..', '..'), var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist'), distPath = path.join(basePath, 'dist'),
entryPath = path.join(__dirname, 'bower.js'),
filename = 'lodash.fp.js'; filename = 'lodash.fp.js';
var webpackConfig = { var fpConfig = {
'entry': entryPath, 'entry': path.join(__dirname, 'bower.js'),
'output': { 'output': {
'path': distPath, 'path': distPath,
'filename': filename, 'filename': filename,
@@ -27,6 +26,16 @@ var webpackConfig = {
] ]
}; };
var mappingConfig = {
'entry': path.join(__dirname, 'mapping.js'),
'output': {
'path': distPath,
'filename': 'fp-mapping.js',
'library': 'mapping',
'libraryTarget': 'umd'
}
};
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
function onComplete(error) { function onComplete(error) {
@@ -36,6 +45,7 @@ function onComplete(error) {
} }
async.series([ async.series([
_.partial(webpack, webpackConfig), _.partial(webpack, mappingConfig),
_.partial(webpack, fpConfig),
_.partial(minify, path.join(distPath, filename)) _.partial(minify, path.join(distPath, filename))
], onComplete); ], onComplete);