mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Add main:modules npm run script.
This commit is contained in:
@@ -4,7 +4,6 @@ var _ = require('lodash'),
|
||||
async = require('async'),
|
||||
fs = require('fs-extra'),
|
||||
glob = require('glob'),
|
||||
Module = require('module'),
|
||||
path = require('path');
|
||||
|
||||
var mapping = require('../../fp/_mapping');
|
||||
|
||||
23
lib/main/build-modules.js
Normal file
23
lib/main/build-modules.js
Normal file
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('lodash'),
|
||||
fs = require('fs-extra'),
|
||||
path = require('path');
|
||||
|
||||
var basePath = path.join(__dirname, '..', '..'),
|
||||
distPath = path.join(basePath, 'dist'),
|
||||
corePath = path.join(distPath, 'lodash.core.js');
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
function onComplete(error) {
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
function build(target) {
|
||||
fs.copy(corePath, path.join(target, 'core.js'), onComplete);
|
||||
}
|
||||
|
||||
build(_.last(process.argv));
|
||||
@@ -32,6 +32,7 @@
|
||||
"build:fp": "node lib/fp/build-dist.js",
|
||||
"build:fp-modules": "node lib/fp/build-modules.js",
|
||||
"build:main": "node lib/main/build-dist.js",
|
||||
"build:main-modules": "node lib/main/build-modules.js",
|
||||
"doc": "node lib/doc/build github",
|
||||
"doc:site": "node lib/doc/build site",
|
||||
"style": "npm run style:main & npm run style:fp & npm run style:perf & npm run style:test",
|
||||
|
||||
Reference in New Issue
Block a user