2015-06-28 22:42:48 +00:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
grunt.initConfig({
|
|
|
|
babel: {
|
|
|
|
scripts: {
|
|
|
|
files: [{
|
|
|
|
expand: true,
|
2016-03-27 20:29:00 +00:00
|
|
|
cwd: 'src',
|
2015-06-28 22:42:48 +00:00
|
|
|
src: '**/*.js',
|
|
|
|
dest: 'build/'
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
eslint: {
|
2016-03-27 20:29:00 +00:00
|
|
|
scripts: ['src/**/*.js']
|
2015-06-28 22:42:48 +00:00
|
|
|
},
|
2016-03-28 06:08:35 +00:00
|
|
|
copy: {
|
|
|
|
classes: {
|
|
|
|
files: [{
|
|
|
|
expand: true,
|
|
|
|
cwd: 'build/types',
|
|
|
|
src: '*',
|
|
|
|
dest: 'types'
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
},
|
2015-06-28 22:42:48 +00:00
|
|
|
watch: {
|
|
|
|
scripts: {
|
2016-03-27 20:29:00 +00:00
|
|
|
files: ['src/**/*.js'],
|
2015-06-28 22:42:48 +00:00
|
|
|
tasks: ['babel']
|
|
|
|
}
|
2016-03-28 06:08:35 +00:00
|
|
|
},
|
|
|
|
clean: ['build', 'types']
|
2015-06-28 22:42:48 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
grunt.loadNpmTasks('grunt-babel');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
|
|
grunt.loadNpmTasks('grunt-eslint');
|
2016-03-28 06:08:35 +00:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
2015-06-28 22:42:48 +00:00
|
|
|
|
2016-03-28 06:08:35 +00:00
|
|
|
grunt.registerTask('default', ['clean', 'babel', 'copy', 'eslint']);
|
2015-06-28 22:42:48 +00:00
|
|
|
};
|