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:
+5
-12
@@ -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']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user