Skip to content

Instantly share code, notes, and snippets.

@tomwayson
Last active August 29, 2015 14:11
Show Gist options
  • Save tomwayson/d2c797b5520ab822e2eb to your computer and use it in GitHub Desktop.
Save tomwayson/d2c797b5520ab822e2eb to your computer and use it in GitHub Desktop.
grunt-amdcheck config
/*global module*/
module.exports = function(grunt) {
grunt.initConfig({
amdcheck: {
dev: {
options: {
// set this to true when you're ready to pull the trigger
removeUnusedDependencies: false, // justpreview changes that will be made in console
saveFilesWithUnusedDependenciesOnly: true,
excepts: [],
// exclude modules that are referenced in Dijit templates
exceptsPaths: [/^dojo\/(i18n|store)/, /^dijit\/(form|layout|Dialog|TitlePane|ProgressBar|InlineEditBox|TooltipDialog)/, /^dojox\/charting/]
},
files: [
{
expand: true,
cwd: 'js/',
src: ['**/*.js', '!libs/**'],
dest: 'js/' // overwrite the existing files
}
]
}
}
});
// load tasks downloaded w/ npm
grunt.loadNpmTasks('grunt-amdcheck');
// register commands for running tasks
grunt.registerTask('default', ['amdcheck']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment