Skip to content

Instantly share code, notes, and snippets.

@aaronshaf
Created May 20, 2013 20:21
Show Gist options
  • Save aaronshaf/5615182 to your computer and use it in GitHub Desktop.
Save aaronshaf/5615182 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.initConfig({
clean: ['public/js/'],
type: {
'default': {
files: [
{
src: 'public/ts/app.ts',
dest: 'public/js/app.js'
}
],
options: {
sourcemap: true,
target: 'es5'
}
}
},
useminPrepare: {
html: 'public/index.dev.html',
dest: 'public/index.html'
},
usemin: {
html: 'public/index.html'
},
watch: {
files: ['public/ts/**/*.ts'],
tasks: ['type']
}
});
grunt.registerTask('default', [
'clean',
'type',
'useminPrepare',
'concat',
'uglify',
'usemin',
'watch'
]);
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-type');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-usemin');
//grunt.loadNpmTasks('grunt-karma');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment