Created
April 18, 2014 13:02
-
-
Save tanmaypatel/11043171 to your computer and use it in GitHub Desktop.
Grunt Configuration
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 = { | |
dist: [ '<%= distLocation %>' ] | |
}; |
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 = { | |
development: { | |
files: [ { | |
src: [ '<%= srcLocation %>/scripts/src/index.js' ], | |
dest: '<%= srcLocation %>/scripts/build/index.js' | |
}, { | |
src: [ '<%= srcLocation %>/scripts/src/Environment.js' ], | |
dest: '<%= srcLocation %>/scripts/build/Environment.js' | |
} ] | |
}, | |
dist: { | |
files: [ { | |
src: '<%= srcLocation %>/components/requirejs/require.min.js', | |
dest: '<%= distLocation %>/components/requirejs/require.js' | |
}, { | |
src: '<%= srcLocation %>/components/jquerymobile/jquery.mobile-1.4.2.css', | |
dest: '<%= distLocation %>/components/jquerymobile/jquery.mobile-1.4.2.css' | |
}, { | |
src: '<%= srcLocation %>/components/jquerymobile/jquery.mobile.theme-1.4.2.css', | |
dest: '<%= distLocation %>/components/jquerymobile/jquery.mobile.theme-1.4.2.css' | |
}, { | |
src: '<%= srcLocation %>/components/jquerymobile/jquery.mobile.structure-1.4.2.css', | |
dest: '<%= distLocation %>/components/jquerymobile/jquery.mobile.structure-1.4.2.css' | |
}, { | |
src: '<%= srcLocation %>/components/jquerymobile/jquery.mobile.icons-1.4.2.css', | |
dest: '<%= distLocation %>/components/jquerymobile/jquery.mobile.icons-1.4.2.css' | |
}, { | |
cwd: '<%= srcLocation %>/components/jquerymobile/images/', | |
src: '**', | |
dest: '<%= distLocation %>/components/jquerymobile/images/', | |
expand: true | |
}, { | |
src: '<%= srcLocation %>/components/fontawesome/css/font-awesome.css', | |
dest: '<%= distLocation %>/components/fontawesome/css/font-awesome.css' | |
}, { | |
cwd: '<%= srcLocation %>/components/fontawesome/fonts/', | |
src: '**', | |
dest: '<%= distLocation %>/components/fontawesome/fonts/', | |
expand: true | |
}, { | |
cwd: '<%= srcLocation %>/pages/', | |
src: '**', | |
dest: '<%= distLocation %>/pages/', | |
expand: true | |
}, { | |
cwd: '<%= srcLocation %>/styles/assets/', | |
src: '**', | |
dest: '<%= distLocation %>/styles/assets/', | |
expand: true | |
}, { | |
src: [ '<%= srcLocation %>/index.html' ], | |
dest: '<%= distLocation %>/index.html' | |
} ] | |
} | |
}; |
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 = { | |
options: { | |
namespace: false, | |
amd: true | |
}, | |
development: { | |
files: { | |
'<%= srcLocation %>/templates/build/pages/SearchResultsTemplate.js': '<%= srcLocation %>/templates/src/pages/SearchResultsTemplate.html' | |
} | |
}, | |
dist: { | |
files: { | |
'<%= distLocation %>/templates/build/pages/SearchResultsTemplate.js': '<%= srcLocation %>/templates/src/pages/SearchResultsTemplate.html' | |
} | |
} | |
}; |
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 = { | |
options: { | |
smarttabs: true, | |
browser: true, | |
globals: { | |
define: true, | |
require: true | |
} | |
}, | |
development: [ '<%= srcLocation %>/scripts/**/*js', '!<%= srcLocation %>/scripts/build/**/*js', '<%= srcLocation %>/models/**/*.js', '<%= srcLocation %>/services/**/*.js', '<%= srcLocation %>/views/**/*.js' ] | |
}; |
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 = { | |
options: { | |
report: 'min' | |
}, | |
development: { | |
options: { | |
dumpLineNumbers: 'comments' | |
}, | |
files: { | |
'<%= srcLocation %>/styles/build/styles.css': '<%= srcLocation %>/styles/src/styles.less' | |
}, | |
}, | |
dist: { | |
options: { | |
compress: true, | |
cleancss: true | |
}, | |
files: { | |
'<%= distLocation %>/styles/build/styles.css': '<%= srcLocation %>/styles/src/styles.less' | |
}, | |
} | |
}; |
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 = { | |
dist: { | |
options: { | |
baseUrl: '<%= srcLocation %>/', | |
paths: { | |
'modernizr': 'components/modernizr/modernizr', | |
'jquery': 'components/jquery/jquery-2.0.3', | |
'jquerymobile': 'components/jquerymobile/jquery.mobile-1.4.2', | |
'fastclick': 'components/fastclick/fastclick', | |
'handlebars': 'components/handlebars/handlebars.runtime', | |
'underscore': 'components/underscore/underscore', | |
'backbone': 'components/backbone/backbone', | |
'amplify': 'components/amplify/amplify', | |
'moment': 'components/moment/moment', | |
'persistence': 'components/persistence/persistence', | |
'persistence.store.sql': 'components/persistence/persistence.store.sql', | |
'persistence.store.websql': 'components/persistence/persistence.store.websql', | |
'persistence.store.cordovasql': 'components/persistence/persistence.store.cordovasql', | |
'persistence.store.memory': 'components/persistence/persistence.store.memory', | |
'underscore.string': 'components/underscore.string/underscore.string', | |
'noty': 'components/noty/jquery.noty', | |
'notificationLayout': 'scripts/src/notificationLayout', | |
'notificationTheme': 'scripts/src/notificationTheme', | |
'Environment': 'scripts/build/Environment' | |
}, | |
shim: { | |
'jquery': { | |
exports: '$' | |
}, | |
'jquerymobile': { | |
deps: [ 'jquery' ] | |
}, | |
'handlebars': { | |
exports: 'Handlebars' | |
}, | |
'underscore': { | |
exports: '_' | |
}, | |
'backbone': { | |
deps: [ 'underscore', 'jquery' ], | |
exports: 'Backbone' | |
}, | |
'amplify': { | |
deps: [ 'jquery' ], | |
exports: 'amplify' | |
}, | |
'moment': { | |
exports: 'moment' | |
}, | |
'noty': { | |
deps: [ 'jquery' ], | |
exports: 'noty' | |
}, | |
'notificationLayout': { | |
deps: [ 'noty' ] | |
}, | |
'notificationTheme': { | |
deps: [ 'noty' ] | |
}, | |
'underscore.string': { | |
deps: [ 'underscore' ] | |
}, | |
'cordovaplugins': { | |
deps: [ 'cordova' ] | |
} | |
}, | |
optimize: 'none', | |
preserveLicenseComments: false, | |
name: 'scripts/src/index', | |
include: [ 'fastclick', 'jquerymobile' ], | |
out: '<%= distLocation %>/scripts/build/index.js' | |
} | |
} | |
}; |
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 = { | |
options: { | |
mangle: false | |
}, | |
development: { | |
files: [] | |
}, | |
dist: { | |
files: [] | |
} | |
}; |
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 = { | |
options: { | |
livereload: true | |
}, | |
configFiles: { | |
files: [ 'Gruntfile.js', 'grunt/*.js' ], | |
options: { | |
livereload: false, | |
reload: true | |
} | |
}, | |
less: { | |
options: { | |
livereload: false | |
}, | |
files: [ '<%= srcLocation %>/styles/src/**/*.less' ], | |
tasks: [ 'less:development' ] | |
}, | |
styles: { | |
files: [ '<%= srcLocation %>/styles/build/**/*.css' ], | |
tasks: [] | |
}, | |
scripts: { | |
options: { | |
livereload: false | |
}, | |
files: [ '<%= srcLocation %>/scripts/src/index.js', | |
'<%= srcLocation %>/scripts/src/Environment.js', | |
'<%= srcLocation %>/models/**/*.js', | |
'<%= srcLocation %>/services/**/*.js', | |
'<%= srcLocation %>/views/**/*.js' ], | |
tasks: [ 'jshint:development', 'copy:development' ] | |
} | |
}; |
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) | |
{ | |
require('time-grunt')(grunt); | |
require('load-grunt-config')(grunt, { | |
config: { | |
srcLocation: 'src', | |
distLocation: 'dist' | |
} | |
}); | |
// Default Task(s) | |
grunt.registerTask('default', [ 'react:development', 'less:development', 'jshint:development', 'uglify:development', 'copy:development' ]); | |
grunt.registerTask('dist', [ 'clean:dist', 'react:dist', 'less:dist', 'requirejs:dist', 'uglify:dist', 'copy:dist' ]); | |
}; |
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
{ | |
"name": "ApplicationName", | |
"version": "0.0.0", | |
"description": "", | |
"dependencies": {}, | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-contrib-clean": "~0.5.0", | |
"grunt-contrib-jshint": "~0.7.2", | |
"grunt-contrib-less": "~0.8.2", | |
"grunt-contrib-handlebars": "~0.6.0", | |
"requirejs": "~2.1.9", | |
"grunt-contrib-requirejs": "~0.4.1", | |
"grunt-contrib-copy": "~0.4.1", | |
"grunt-contrib-watch": "~0.5.3", | |
"grunt-contrib-uglify": "~0.2.7", | |
"time-grunt": "~0.2.10", | |
"load-grunt-tasks": "~0.4.0", | |
"load-grunt-config": "~0.7.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment