2016-05-16 13:33:49 +02:00
|
|
|
'use strict';
|
|
|
|
|
2017-05-13 13:25:33 +02:00
|
|
|
const async = require('async');
|
|
|
|
const path = require('path');
|
2016-05-16 13:33:49 +02:00
|
|
|
|
2017-05-13 13:25:33 +02:00
|
|
|
const file = require('../common/file');
|
|
|
|
const util = require('../common/util');
|
2016-05-16 13:33:49 +02:00
|
|
|
|
2017-05-13 13:25:33 +02:00
|
|
|
const basePath = path.join(__dirname, '..', '..');
|
|
|
|
const distPath = path.join(basePath, 'dist');
|
|
|
|
const filename = 'lodash.js';
|
2016-05-16 13:33:49 +02:00
|
|
|
|
2017-05-13 13:25:33 +02:00
|
|
|
const baseLodash = path.join(basePath, filename);
|
|
|
|
const distLodash = path.join(distPath, filename);
|
2016-05-16 13:33:49 +02:00
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
2017-05-13 13:25:33 +02:00
|
|
|
/**
|
|
|
|
* Creates browser builds of Lodash at the `target` path.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @param {string} target The output directory path.
|
|
|
|
*/
|
2016-05-16 13:33:49 +02:00
|
|
|
function build() {
|
|
|
|
async.series([
|
|
|
|
file.copy(baseLodash, distLodash),
|
|
|
|
file.min(distLodash)
|
2017-05-13 13:25:33 +02:00
|
|
|
], util.pitch);
|
2016-05-16 13:33:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
build();
|