Last active
December 16, 2015 16:10
-
-
Save wimleers/5461681 to your computer and use it in GitHub Desktop.
(Assuming jQuery is loaded anyway, i.e. excluding jQuery.) BEFORE: Edit (custom code) + deps: VIE, Create.js, Backbone, Underscore, jQuery UI Widget, jQuery UI Core AFTER: Edit (custom code) + deps: Backbone, Underscore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grunt | |
Running "concat:edit" (concat) task | |
File "build/edit.js" created. | |
Running "min:edit" (min) task | |
File "build/edit.min.js" created. | |
Uncompressed size: 83949 bytes. | |
Compressed size: 7684 bytes gzipped (29545 bytes minified). | |
Running "min:backbone" (min) task | |
File "build/backbone.min.js" created. | |
Uncompressed size: 94306 bytes. | |
Compressed size: 9905 bytes gzipped (30252 bytes minified). | |
Running "min:all" (min) task | |
File "build/all.min.js" created. | |
Uncompressed size: 178256 bytes. | |
Compressed size: 17226 bytes gzipped (59795 bytes minified). | |
Done, without errors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grunt | |
Running "concat:edit" (concat) task | |
File "build/edit.js" created. | |
Running "min:edit" (min) task | |
File "build/edit.min.js" created. | |
Uncompressed size: 76329 bytes. | |
Compressed size: 7686 bytes gzipped (27835 bytes minified). | |
Running "min:createjs" (min) task | |
File "build/create.min.js" created. | |
Uncompressed size: 51818 bytes. | |
Compressed size: 5712 bytes gzipped (23643 bytes minified). | |
Running "min:viejs" (min) task | |
File "build/vie.min.js" created. | |
Uncompressed size: 133810 bytes. | |
Compressed size: 9350 bytes gzipped (32370 bytes minified). | |
Running "min:backbone" (min) task | |
File "build/backbone.min.js" created. | |
Uncompressed size: 94306 bytes. | |
Compressed size: 9905 bytes gzipped (30252 bytes minified). | |
Running "min:jquiwidget" (min) task | |
File "build/jquiwidget.min.js" created. | |
Uncompressed size: 23265 bytes. | |
Compressed size: 3968 bytes gzipped (10560 bytes minified). | |
Running "min:all" (min) task | |
File "build/all.min.js" created. | |
Uncompressed size: 379532 bytes. | |
Compressed size: 34736 bytes gzipped (124652 bytes minified). | |
Done, without errors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
concat: { | |
edit: { | |
src: [ | |
'core/modules/edit/js/*.js', | |
'core/modules/edit/js/editors/*.js', | |
'core/modules/edit/js/models/*.js', | |
'core/modules/edit/js/views/*.js' | |
], | |
dest: 'build/edit.js' | |
} | |
}, | |
watch: { | |
files: '<config:lint.all>', | |
tasks: 'default' | |
}, | |
min: { | |
edit: { | |
src: ['build/edit.js'], | |
dest: 'build/edit.min.js' | |
}, | |
backbone: { | |
src: [ | |
'core/misc/backbone/backbone.js', | |
'core/misc/underscore/underscore.js' | |
], | |
dest: 'build/backbone.min.js' | |
}, | |
all: { | |
src: [ | |
'build/edit.js', | |
'core/misc/backbone/backbone.js', | |
'core/misc/underscore/underscore.js' | |
], | |
dest: 'build/all.min.js' | |
} | |
}, | |
jshint: { | |
options: { | |
curly: true, | |
immed: false, | |
undef: true, | |
browser: true, | |
laxbreak: true | |
}, | |
globals: { | |
jQuery: true, | |
_: true, | |
Backbone: true, | |
VIE: true, | |
Drupal: true, | |
drupalSettings: true | |
} | |
} | |
}); | |
grunt.registerTask('default', 'concat min'); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
concat: { | |
edit: { | |
src: [ | |
'core/modules/edit/js/*.js', | |
'core/modules/edit/js/editors/*.js', | |
'core/modules/edit/js/models/*.js', | |
'core/modules/edit/js/views/*.js', | |
'core/modules/edit/js/createjs/*.js', | |
'core/modules/edit/js/viejs/*.js' | |
], | |
dest: 'build/edit.js' | |
} | |
}, | |
watch: { | |
files: '<config:lint.all>', | |
tasks: 'default' | |
}, | |
min: { | |
edit: { | |
src: ['build/edit.js'], | |
dest: 'build/edit.min.js' | |
}, | |
createjs: { | |
src: ['core/misc/create/create-editonly.js'], | |
dest: 'build/create.min.js' | |
}, | |
viejs: { | |
src: ['core/misc/vie/vie-core.js'], | |
dest: 'build/vie.min.js' | |
}, | |
backbone: { | |
src: [ | |
'core/misc/backbone/backbone.js', | |
'core/misc/underscore/underscore.js' | |
], | |
dest: 'build/backbone.min.js' | |
}, | |
jquiwidget: { | |
src: [ | |
'core/misc/ui/ui/jquery.ui.core.js', | |
'core/misc/ui/ui/jquery.ui.widget.js' | |
], | |
dest: 'build/jquiwidget.min.js' | |
}, | |
all: { | |
src: [ | |
'build/edit.js', | |
'core/misc/create/create-editonly.js', | |
'core/misc/vie/vie-core.js', | |
'core/misc/backbone/backbone.js', | |
'core/misc/underscore/underscore.js', | |
'core/misc/ui/ui/jquery.ui.core.js', | |
'core/misc/ui/ui/jquery.ui.widget.js' | |
], | |
dest: 'build/all.min.js' | |
} | |
}, | |
jshint: { | |
options: { | |
curly: true, | |
immed: false, | |
undef: true, | |
browser: true, | |
laxbreak: true | |
}, | |
globals: { | |
jQuery: true, | |
_: true, | |
Backbone: true, | |
VIE: true, | |
Drupal: true, | |
drupalSettings: true | |
} | |
} | |
}); | |
grunt.registerTask('default', 'concat min'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment