diff options
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" ]); }; |