mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Comment style consistency.
Former-commit-id: c166fbd838f2ad139bb89da2c916fa07c4fceff0
This commit is contained in:
8
build.js
8
build.js
@@ -118,7 +118,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// post-process and `gzip` the uglified distribution. Lines are
|
// post-process and `gzip` the uglified distribution. Lines are
|
||||||
// restricted to 500 characters for consistency with Closure Compiler.
|
// restricted to 500 characters for consistency with Closure Compiler
|
||||||
uglifiedSource = postprocess(ugly.split_lines(uglifiedSource, 500));
|
uglifiedSource = postprocess(ugly.split_lines(uglifiedSource, 500));
|
||||||
invoke('gzip', ['-9f', '-c'], uglifiedSource, 'binary', function onUglifyCompress(exception, uglifiedGzippedSource) {
|
invoke('gzip', ['-9f', '-c'], uglifiedSource, 'binary', function onUglifyCompress(exception, uglifiedGzippedSource) {
|
||||||
var uglifiedSize;
|
var uglifiedSize;
|
||||||
@@ -132,17 +132,17 @@
|
|||||||
|
|
||||||
// save the compiled version to disk. The explicit `binary`
|
// save the compiled version to disk. The explicit `binary`
|
||||||
// encoding for the `gzip`-ped version is necessary to ensure that
|
// encoding for the `gzip`-ped version is necessary to ensure that
|
||||||
// the stream is written correctly.
|
// the stream is written correctly
|
||||||
fs.writeFileSync(path.join(distPath, 'lodash.compiler.js'), compiledSource);
|
fs.writeFileSync(path.join(distPath, 'lodash.compiler.js'), compiledSource);
|
||||||
fs.writeFileSync(path.join(distPath, 'lodash.compiler.js.gz'), compiledGzippedSource, 'binary');
|
fs.writeFileSync(path.join(distPath, 'lodash.compiler.js.gz'), compiledGzippedSource, 'binary');
|
||||||
|
|
||||||
// save the uglified version to disk.
|
// save the uglified version to disk
|
||||||
fs.writeFileSync(path.join(distPath, 'lodash.uglify.js'), uglifiedSource);
|
fs.writeFileSync(path.join(distPath, 'lodash.uglify.js'), uglifiedSource);
|
||||||
fs.writeFileSync(path.join(distPath, 'lodash.uglify.js.gz'), uglifiedGzippedSource, 'binary');
|
fs.writeFileSync(path.join(distPath, 'lodash.uglify.js.gz'), uglifiedGzippedSource, 'binary');
|
||||||
|
|
||||||
// select the smallest minified distribution and use it as the
|
// select the smallest minified distribution and use it as the
|
||||||
// official minified release. If they are equivalent, the compiled
|
// official minified release. If they are equivalent, the compiled
|
||||||
// distribution is used.
|
// distribution is used
|
||||||
fs.writeFileSync(path.join(__dirname, 'lodash.min.js'), compiledSize < uglifiedSize ? compiledSource : uglifiedSource);
|
fs.writeFileSync(path.join(__dirname, 'lodash.min.js'), compiledSize < uglifiedSize ? compiledSource : uglifiedSource);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,9 +39,9 @@
|
|||||||
if (module != require.main) {
|
if (module != require.main) {
|
||||||
module.exports = postprocess;
|
module.exports = postprocess;
|
||||||
} else {
|
} else {
|
||||||
// Read the JavaScript source file from the first argument if the script
|
// read the JavaScript source file from the first argument if the script
|
||||||
// was invoked directly (e.g. `node post-compile.js source.js`) and write to
|
// was invoked directly (e.g. `node post-compile.js source.js`) and write to
|
||||||
// the same file.
|
// the same file
|
||||||
(function() {
|
(function() {
|
||||||
var source = fs.readFileSync(process.argv[2], 'utf8');
|
var source = fs.readFileSync(process.argv[2], 'utf8');
|
||||||
fs.writeFileSync(process.argv[2], postprocess(source), 'utf8');
|
fs.writeFileSync(process.argv[2], postprocess(source), 'utf8');
|
||||||
|
|||||||
@@ -199,9 +199,9 @@
|
|||||||
if (module != require.main) {
|
if (module != require.main) {
|
||||||
module.exports = preprocess;
|
module.exports = preprocess;
|
||||||
} else {
|
} else {
|
||||||
// Read the JavaScript source file from the first argument if the script
|
// read the JavaScript source file from the first argument if the script
|
||||||
// was invoked directly (e.g. `node pre-compile.js source.js`) and write to
|
// was invoked directly (e.g. `node pre-compile.js source.js`) and write to
|
||||||
// the same file.
|
// the same file
|
||||||
(function() {
|
(function() {
|
||||||
var source = fs.readFileSync(process.argv[2], 'utf8');
|
var source = fs.readFileSync(process.argv[2], 'utf8');
|
||||||
fs.writeFileSync(process.argv[2], preprocess(source), 'utf8');
|
fs.writeFileSync(process.argv[2], preprocess(source), 'utf8');
|
||||||
|
|||||||
Reference in New Issue
Block a user