mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Merge pull request #1999 from kkujala/master
Add carriage return checks to make.js.
This commit is contained in:
commit
ace05a7776
2 changed files with 39 additions and 8 deletions
22
make.js
22
make.js
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
require('./external/shelljs/make');
|
||||
var builder = require('./external/builder/builder.js');
|
||||
var crlfchecker = require('./external/crlfchecker/crlfchecker.js');
|
||||
|
||||
var ROOT_DIR = __dirname + '/', // absolute path to project's root
|
||||
BUILD_DIR = 'build/',
|
||||
|
@ -218,6 +219,8 @@ target.bundle = function() {
|
|||
bundleVersion = exec('git log --format="%h" -n 1',
|
||||
{silent: true}).output.replace('\n', '');
|
||||
|
||||
crlfchecker.checkIfCrlfIsPresent(SRC_FILES);
|
||||
|
||||
// This just preprocesses the empty pdf.js file, we don't actually want to
|
||||
// preprocess everything yet since other build targets use this file.
|
||||
builder.preprocess('pdf.js', ROOT_DIR + BUILD_TARGET,
|
||||
|
@ -673,15 +676,17 @@ target.lint = function() {
|
|||
echo();
|
||||
echo('### Linting JS files (this can take a while!)');
|
||||
|
||||
var LINT_FILES = 'src/*.js \
|
||||
web/*.js \
|
||||
test/*.js \
|
||||
test/unit/*.js \
|
||||
extensions/firefox/*.js \
|
||||
extensions/firefox/components/*.js \
|
||||
extensions/chrome/*.js';
|
||||
var LINT_FILES = ['src/*.js',
|
||||
'web/*.js',
|
||||
'test/*.js',
|
||||
'test/unit/*.js',
|
||||
'extensions/firefox/*.js',
|
||||
'extensions/firefox/components/*.js',
|
||||
'extensions/chrome/*.js'];
|
||||
|
||||
exec('gjslint --nojsdoc ' + LINT_FILES);
|
||||
exec('gjslint --nojsdoc ' + LINT_FILES.join(' '));
|
||||
|
||||
crlfchecker.checkIfCrlfIsPresent(LINT_FILES);
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -694,3 +699,4 @@ target.clean = function() {
|
|||
|
||||
rm('-rf', BUILD_DIR);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue