3 const _ = require('lodash');
4 const async = require('async');
5 const path = require('path');
6 const webpack = require('webpack');
8 const file = require('../common/file');
9 const util = require('../common/util');
11 const basePath = path.join(__dirname, '..', '..');
12 const distPath = path.join(basePath, 'dist');
13 const fpPath = path.join(basePath, 'fp');
14 const filename = 'lodash.fp.js';
17 'entry': path.join(fpPath, '_convertBrowser.js'),
22 'libraryTarget': 'umd'
25 new webpack.optimize.OccurenceOrderPlugin,
26 new webpack.optimize.DedupePlugin
30 const mappingConfig = {
31 'entry': path.join(fpPath, '_mapping.js'),
34 'filename': 'mapping.fp.js',
36 'libraryTarget': 'umd'
40 /*----------------------------------------------------------------------------*/
43 * Creates browser builds of the FP converter and mappings at the `target` path.
46 * @param {string} target The output directory path.
50 _.partial(webpack, mappingConfig),
51 _.partial(webpack, fpConfig),
52 file.min(path.join(distPath, filename))