Skip to content

Commit 7e97b4e

Browse files
committed
build: update Gruntfile
1 parent 17b696d commit 7e97b4e

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

Gruntfile.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,40 @@ module.exports = function(grunt) {
6666
}
6767
},
6868

69+
safer: {
70+
target: {
71+
files: [ {
72+
src: 'lib/**/*.js'
73+
}, {
74+
src: 'module/**/*.js'
75+
}, {
76+
src: 'index.js',
77+
} ]
78+
}
79+
},
80+
6981
endline: {
7082
target: {
71-
options: {
72-
except: 'node_modules',
73-
replaced: true
74-
},
7583
files: [ {
76-
src: './**/*.js'
84+
src: 'lib/**/*.js'
85+
}, {
86+
src: 'min/**/*.js'
87+
}, {
88+
src: 'module/**/*.js'
89+
}, {
90+
src: '*.js',
7791
} ]
7892
}
7993
}
8094
});
8195

82-
grunt.loadNpmTasks('grunt-contrib-clean');
8396
grunt.loadNpmTasks('grunt-contrib-uglify');
8497
grunt.loadNpmTasks('grunt-contrib-jshint');
8598
grunt.loadNpmTasks('grunt-endline');
99+
grunt.loadNpmTasks('grunt-safer-regex');
86100

87-
grunt.registerTask('lint', [ 'jshint' ]);
88-
grunt.registerTask('min', [ 'clean', 'uglify', 'endline' ]);
101+
grunt.registerTask('lint', [ 'jshint', 'safer' ]);
102+
grunt.registerTask('min', [ 'uglify', 'endline' ]);
89103
grunt.registerTask('default', [ 'lint', 'min' ]);
90104

91105
return;

0 commit comments

Comments
 (0)