From 7a714d1575d40c3a0f7097dd63e444d6e7e663b1 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Fri, 30 May 2014 22:50:58 -0700 Subject: [PATCH] change location of where built files go --- .gitignore | 5 +- Gruntfile.js | 140 +++++++++++------------ demos/agenda-views.html | 6 +- demos/basic-views.html | 6 +- demos/default.html | 6 +- demos/external-dragging.html | 6 +- demos/gcal.html | 8 +- demos/json.html | 6 +- demos/languages.html | 8 +- demos/selectable.html | 6 +- demos/theme.html | 6 +- demos/timezones.html | 8 +- jshint.conf.js | 9 +- karma.conf.js | 8 +- readme.md | 2 +- tasks/generateLanguages.js | 7 +- tests/data_as_a_function.html | 6 +- tests/date_util_test.html | 2 +- tests/day_render.html | 6 +- tests/dbclick.html | 6 +- tests/droppable.html | 6 +- tests/event_data_transform.html | 6 +- tests/fullheight.html | 6 +- tests/gcal.html | 8 +- tests/hiddenDays.html | 6 +- tests/init.js | 0 tests/issue_1035.html | 6 +- tests/issue_206_parseDate_dst.html | 6 +- tests/issue_2154.html | 6 +- tests/issue_220_buttons_ie6.html | 6 +- tests/issue_221_quick_remove_source.html | 8 +- tests/issue_230_height_json_events.html | 6 +- tests/issue_244_aspectRatio_0.html | 6 +- tests/issue_251_empty_end_date.html | 6 +- tests/issue_333_blinking.html | 6 +- tests/issue_417_refetchEvents.html | 8 +- tests/issue_429_gotoDate.html | 6 +- tests/issue_477_event_width.html | 6 +- tests/issue_517_js_error_ie.html | 6 +- tests/issue_554.html | 8 +- tests/issue_586_refetchEvents.html | 8 +- tests/issue_616.html | 8 +- tests/issue_679.html | 8 +- tests/issue_688_parseInt.html | 6 +- tests/issue_740_event_resizing.html | 6 +- tests/issue_750.html | 6 +- tests/issue_757_removeEvents.html | 6 +- tests/languages-datepicker.html | 8 +- tests/liquidwidth.html | 6 +- tests/locale.html | 6 +- tests/long_event_titles.html | 6 +- tests/many_agenda_events.html | 6 +- tests/many_events.html | 6 +- tests/method_destroy.html | 6 +- tests/methods.html | 8 +- tests/no_event_titles.html | 6 +- tests/options.html | 6 +- tests/past_future_classNames.html | 6 +- tests/plain.html | 6 +- tests/selectable.html | 6 +- tests/short_agenda.html | 6 +- tests/skip-redraw-test.html | 6 +- tests/slotEventOverlap-demo.html | 6 +- tests/slot_event_overlap.html | 6 +- tests/snap.html | 6 +- tests/sources.html | 8 +- tests/sources_new.html | 8 +- tests/stacking.html | 6 +- tests/tabs.html | 6 +- tests/theming.html | 6 +- tests/triggers.html | 8 +- tests/triggers_view.html | 8 +- tests/week_numbers.html | 6 +- 73 files changed, 293 insertions(+), 302 deletions(-) delete mode 100644 tests/init.js diff --git a/.gitignore b/.gitignore index 71b8f50..d69e6b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ -build/out -build/archive -build/bower -build/cdnjs +build/temp dist # npm modules diff --git a/Gruntfile.js b/Gruntfile.js index 55fc376..fc7e82a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -25,7 +25,9 @@ module.exports = function(grunt) { uglify: {}, copy: {}, compress: {}, - clean: {} + clean: { + temp: 'build/temp' + } }; // Combine certain configs for the "meta" template variable (<%= meta.whatever %>) @@ -37,7 +39,7 @@ module.exports = function(grunt) { // Bare minimum for debugging grunt.registerTask('dev', [ 'lumbar:build', - 'generateLanguages' + 'languages' ]); @@ -58,7 +60,7 @@ module.exports = function(grunt) { config.lumbar = { build: { build: 'lumbar.json', - output: 'build/out' // a directory. lumbar doesn't like trailing slash + output: 'dist' // a directory. lumbar doesn't like trailing slash } }; @@ -68,9 +70,9 @@ module.exports = function(grunt) { process: true // replace }, expand: true, - cwd: 'build/out/', + cwd: 'dist/', src: [ '*.js', '*.css' ], - dest: 'build/out/' + dest: 'dist/' }; // create minified versions (*.min.js) @@ -79,11 +81,11 @@ module.exports = function(grunt) { preserveComments: 'some' // keep comments starting with /*! }, expand: true, - src: 'build/out/fullcalendar.js', // only do it for fullcalendar.js + src: 'dist/fullcalendar.js', // only do it for fullcalendar.js ext: '.min.js' }; - config.clean.modules = 'build/out/**'; + config.clean.modules = 'dist/*.{js,css}'; @@ -95,26 +97,35 @@ module.exports = function(grunt) { 'jshint:srcLanguages', 'clean:languages', 'generateLanguages', - 'uglify:languages' + 'uglify:languages', + 'uglify:languagesAll' ]); config.generateLanguages = { moment: 'lib/moment/lang/', datepicker: 'lib/jquery-ui/ui/i18n/', fullCalendar: 'lang/', - dest: 'build/out/lang/' + dest: 'build/temp/lang/', + allDest: 'build/temp/lang-all.js' }; config.uglify.languages = { expand: true, - cwd: 'build/out/lang/', + cwd: 'build/temp/lang/', src: '*.js', - dest: 'build/out/lang-min/' + dest: 'dist/lang/' + }; + + config.uglify.languagesAll = { + src: 'build/temp/lang-all.js', + dest: 'dist/lang-all.js' }; config.clean.languages = [ - 'build/out/lang/*', - 'build/out/lang-min/*' + 'build/temp/lang', + 'build/temp/lang-all.js', + 'dist/lang', + 'dist/lang-all.js' ]; @@ -128,6 +139,7 @@ module.exports = function(grunt) { 'languages', 'copy:archiveModules', 'copy:archiveLanguages', + 'copy:archiveLanguagesAll', 'copy:archiveMoment', 'copy:archiveJQuery', 'concat:archiveJQueryUI', @@ -140,26 +152,31 @@ module.exports = function(grunt) { // copy FullCalendar modules into ./fullcalendar/ directory config.copy.archiveModules = { expand: true, - cwd: 'build/out/', + cwd: 'dist/', src: [ '*.js', '*.css' ], - dest: 'build/archive/fullcalendar/' + dest: 'build/temp/archive/' }; config.copy.archiveLanguages = { expand: true, - cwd: 'build/out/lang-min/', + cwd: 'dist/lang/', src: '*.js', - dest: 'build/archive/fullcalendar/lang/' + dest: 'build/temp/archive/lang/' + }; + + config.copy.archiveLanguagesAll = { + src: 'dist/lang-all.js', + dest: 'build/temp/archive/lang-all.js' }; config.copy.archiveMoment = { src: 'lib/moment/min/moment.min.js', - dest: 'build/archive/lib/moment.min.js' + dest: 'build/temp/archive/lib/moment.min.js' }; config.copy.archiveJQuery = { src: 'lib/jquery/jquery.min.js', - dest: 'build/archive/lib/jquery.min.js' + dest: 'build/temp/archive/lib/jquery.min.js' }; config.concat.archiveJQueryUI = { @@ -170,7 +187,7 @@ module.exports = function(grunt) { 'lib/jquery-ui/ui/minified/jquery.ui.draggable.min.js', 'lib/jquery-ui/ui/minified/jquery.ui.resizable.min.js' ], - dest: 'build/archive/lib/jquery-ui.custom.min.js' + dest: 'build/temp/archive/lib/jquery-ui.custom.min.js' }; // copy demo files into ./demos/ directory @@ -184,7 +201,7 @@ module.exports = function(grunt) { } }, src: 'demos/**', - dest: 'build/archive/' + dest: 'build/temp/archive/' }; // copy the "cupertino" jquery-ui theme into the demo directory (for demos/theme.html) @@ -192,7 +209,7 @@ module.exports = function(grunt) { expand: true, cwd: 'lib/jquery-ui/themes/cupertino/', src: [ 'jquery-ui.min.css', 'images/*' ], - dest: 'build/archive/lib/cupertino/' + dest: 'build/temp/archive/lib/cupertino/' }; // in demo HTML, rewrites paths to work in the archive @@ -201,7 +218,7 @@ module.exports = function(grunt) { path = path.replace('../lib/jquery/jquery.js', '../lib/jquery.min.js'); path = path.replace('../lib/jquery-ui/ui/jquery-ui.js', '../lib/jquery-ui.custom.min.js'); path = path.replace('../lib/jquery-ui/themes/cupertino/', '../lib/cupertino/'); - path = path.replace('../build/out/', '../fullcalendar/'); + path = path.replace('../dist/', '../'); path = path.replace('/fullcalendar.js', '/fullcalendar.min.js'); return path; } @@ -209,8 +226,8 @@ module.exports = function(grunt) { // copy license and changelog config.copy.archiveMisc = { files: { - 'build/archive/license.txt': 'license.txt', - 'build/archive/changelog.txt': 'changelog.md' + 'build/temp/archive/license.txt': 'license.txt', + 'build/temp/archive/changelog.txt': 'changelog.md' } }; @@ -220,55 +237,15 @@ module.exports = function(grunt) { archive: 'dist/<%= meta.name %>-<%= meta.version %>.zip' }, expand: true, - cwd: 'build/archive/', + cwd: 'build/temp/archive/', src: '**', dest: '<%= meta.name %>-<%= meta.version %>/' // have a top-level directory in the ZIP file }; - config.clean.archive = 'build/archive/*'; - config.clean.dist = 'dist/*'; - - - - /* Bower Component (http://bower.io/) - ----------------------------------------------------------------------------------------------------*/ - - grunt.registerTask('bower', 'Build the FullCalendar Bower component', [ - 'clean:bower', - 'modules', - 'copy:bowerModules', - 'copy:bowerReadme', - 'bowerConfig' - ]); - - // copy FullCalendar modules into bower component's root - config.copy.bowerModules = { - expand: true, - cwd: 'build/out/', - src: [ '*.js', '*.css' ], - dest: 'build/bower/' - }; - - // copy the bower-specific README - config.copy.bowerReadme = { - src: 'build/bower-readme.md', - dest: 'build/bower/readme.md' - }; - - // assemble the bower config from existing configs - grunt.registerTask('bowerConfig', function() { - var bowerConfig = grunt.file.readJSON('build/bower.json'); - grunt.file.write( - 'build/bower/bower.json', - JSON.stringify( - _.extend({}, pluginConfig, bowerConfig), // combine 2 configs - null, // replacer - 2 // indent - ) - ); - }); - - config.clean.bower = 'build/bower/*'; + config.clean.archive = [ + 'build/temp/archive', + 'dist/*.zip' + ]; @@ -278,21 +255,36 @@ module.exports = function(grunt) { grunt.registerTask('cdnjs', 'Build files for CDNJS\'s hosted version of FullCalendar', [ 'clean:cdnjs', 'modules', + 'languages', 'copy:cdnjsModules', + 'copy:cdnjsLanguages', + 'copy:cdnjsLanguagesAll', 'cdnjsConfig' ]); config.copy.cdnjsModules = { expand: true, - cwd: 'build/out/', + cwd: 'dist/', src: [ '*.js', '*.css' ], - dest: 'build/cdnjs/<%= meta.version %>/' + dest: 'dist/cdnjs/<%= meta.version %>/' + }; + + config.copy.cdnjsLanguages = { + expand: true, + cwd: 'dist/lang/', + src: '*.js', + dest: 'dist/cdnjs/<%= meta.version %>/lang/' + }; + + config.copy.cdnjsLanguagesAll = { + src: 'dist/lang-all.js', + dest: 'dist/cdnjs/<%= meta.version %>/lang-all.js' }; grunt.registerTask('cdnjsConfig', function() { var cdnjsConfig = grunt.file.readJSON('build/cdnjs.json'); grunt.file.write( - 'build/cdnjs/package.json', + 'dist/cdnjs/package.json', JSON.stringify( _.extend({}, pluginConfig, cdnjsConfig), // combine 2 configs null, // replace @@ -301,7 +293,7 @@ module.exports = function(grunt) { ); }); - config.clean.cdnjs = 'build/cdnjs/<%= meta.version %>/*'; + config.clean.cdnjs = 'dist/cdnjs/<%= meta.version %>'; // NOTE: not a complete clean. also need to manually worry about package.json and version folders diff --git a/demos/agenda-views.html b/demos/agenda-views.html index 69a81f2..70f6220 100644 --- a/demos/agenda-views.html +++ b/demos/agenda-views.html @@ -2,12 +2,12 @@ - - + + - + - + - + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - - + + - - + + - - + + - - + + - + - + - + - + - - + + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - - + + - - + + - +