2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

Nuke grunt-line-remover.

Use concat's process function instead.
This commit is contained in:
XhmikosR
2016-04-02 10:03:04 +03:00
parent 064fda0e80
commit ed0c12fd71
3 changed files with 46 additions and 47 deletions
+5 -12
View File
@@ -58,17 +58,6 @@ module.exports = function (grunt) {
},
// JS build configuration
lineremover: {
es6Import: {
files: {
'<%= concat.bootstrap.dest %>': '<%= concat.bootstrap.dest %>'
},
options: {
exclusionPattern: /^(import|export)/g
}
}
},
babel: {
dev: {
options: {
@@ -159,6 +148,10 @@ module.exports = function (grunt) {
concat: {
options: {
// Custom function to remove all export and import statements
process: function (src) {
return src.replace(/^(export|import).*/gm, '');
},
stripBanners: false
},
bootstrap: {
@@ -447,7 +440,7 @@ module.exports = function (grunt) {
grunt.registerTask('test-js', ['eslint', 'jscs:core', 'jscs:test', 'jscs:grunt', 'qunit']);
// JS distribution task.
grunt.registerTask('dist-js', ['babel:dev', 'concat', 'lineremover', 'babel:dist', 'stamp', 'uglify:core', 'commonjs']);
grunt.registerTask('dist-js', ['babel:dev', 'concat', 'babel:dist', 'stamp', 'uglify:core', 'commonjs']);
grunt.registerTask('test-scss', ['scsslint:core']);