1
1
#!/usr/bin/env node
2
2
require ( './external/shelljs/make' ) ;
3
3
var builder = require ( './external/builder/builder.js' ) ;
4
+ var crlfchecker = require ( './external/crlfchecker/crlfchecker.js' ) ;
4
5
5
6
var ROOT_DIR = __dirname + '/' , // absolute path to project's root
6
7
BUILD_DIR = 'build/' ,
@@ -218,6 +219,8 @@ target.bundle = function() {
218
219
bundleVersion = exec ( 'git log --format="%h" -n 1' ,
219
220
{ silent : true } ) . output . replace ( '\n' , '' ) ;
220
221
222
+ crlfchecker . checkIfCrlfIsPresent ( SRC_FILES ) ;
223
+
221
224
// This just preprocesses the empty pdf.js file, we don't actually want to
222
225
// preprocess everything yet since other build targets use this file.
223
226
builder . preprocess ( 'pdf.js' , ROOT_DIR + BUILD_TARGET ,
@@ -673,15 +676,17 @@ target.lint = function() {
673
676
echo ( ) ;
674
677
echo ( '### Linting JS files (this can take a while!)' ) ;
675
678
676
- var LINT_FILES = 'src/*.js \
677
- web/*.js \
678
- test/*.js \
679
- test/unit/*.js \
680
- extensions/firefox/*.js \
681
- extensions/firefox/components/*.js \
682
- extensions/chrome/*.js' ;
679
+ var LINT_FILES = [ 'src/*.js' ,
680
+ 'web/*.js' ,
681
+ 'test/*.js' ,
682
+ 'test/unit/*.js' ,
683
+ 'extensions/firefox/*.js' ,
684
+ 'extensions/firefox/components/*.js' ,
685
+ 'extensions/chrome/*.js' ] ;
686
+
687
+ exec ( 'gjslint --nojsdoc ' + LINT_FILES . join ( ' ' ) ) ;
683
688
684
- exec ( 'gjslint --nojsdoc ' + LINT_FILES ) ;
689
+ crlfchecker . checkIfCrlfIsPresent ( LINT_FILES ) ;
685
690
} ;
686
691
687
692
//
@@ -694,3 +699,4 @@ target.clean = function() {
694
699
695
700
rm ( '-rf' , BUILD_DIR ) ;
696
701
} ;
702
+
0 commit comments