diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-07-29 11:34:00 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-08-08 00:29:39 -0400 |
commit | a4869031e0fc8607d99d50765a297fede409ff28 (patch) | |
tree | 35c5baee217dbc6014683f80307bb834b6275a91 /Gruntfile.js | |
parent | 10e2343e771bea91d87bb01d63d57adbc575032b (diff) | |
download | jquery-ui-a4869031e0fc8607d99d50765a297fede409ff28.tar.gz jquery-ui-a4869031e0fc8607d99d50765a297fede409ff28.zip |
Build: Add requirejs build task
This more closely emulates what you get from the builder in terms of file order
it also will error on any dependency issues.
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index 7ccb800b0..3ee17462c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -150,16 +150,6 @@ grunt.initConfig({ }, compare_size: compareFiles, concat: { - ui: { - options: { - banner: createBanner( uiFiles ), - stripBanners: { - block: true - } - }, - src: uiFiles, - dest: "dist/jquery-ui.js" - }, i18n: { options: { banner: createBanner( allI18nFiles ) @@ -178,6 +168,27 @@ grunt.initConfig({ dest: "dist/jquery-ui.css" } }, + requirejs: { + js: { + options: { + baseUrl: "./", + paths: { + jquery: "./external/jquery/jquery", + external: "./external/" + }, + preserveLicenseComments: false, + optimize: "none", + findNestedDependencies: true, + skipModuleInsertion: true, + exclude: [ "jquery" ], + include: expandFiles( [ "ui/**/*.js", "!ui/i18n/*" ] ), + out: "dist/jquery-ui.js", + wrap: { + start: createBanner( uiFiles ), + } + } + } + }, // Remove the requireSpacesInsideParentheses override once everything is fixed jscs: { @@ -455,10 +466,10 @@ grunt.registerTask( "update-authors", function() { }); }); -grunt.registerTask( "default", [ "lint", "test" ]); +grunt.registerTask( "default", [ "lint", "requirejs", "test" ]); grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ]); grunt.registerTask( "test", [ "qunit" ]); -grunt.registerTask( "sizer", [ "concat:ui", "uglify:main", "compare_size:all" ]); -grunt.registerTask( "sizer_all", [ "concat:ui", "uglify", "compare_size" ]); +grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ]); +grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ]); }; |