e5c25bd9c1
remove grunt from dependencies, and use transformed code instead using babel/register. change API a litte
30 lines
565 B
JavaScript
30 lines
565 B
JavaScript
module.exports = function(grunt) {
|
|
grunt.initConfig({
|
|
babel: {
|
|
scripts: {
|
|
files: [{
|
|
expand: true,
|
|
cwd: 'src',
|
|
src: '**/*.js',
|
|
dest: 'build/'
|
|
}]
|
|
}
|
|
},
|
|
eslint: {
|
|
scripts: ['src/**/*.js']
|
|
},
|
|
watch: {
|
|
scripts: {
|
|
files: ['src/**/*.js'],
|
|
tasks: ['babel']
|
|
}
|
|
}
|
|
});
|
|
|
|
grunt.loadNpmTasks('grunt-babel');
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
grunt.loadNpmTasks('grunt-eslint');
|
|
|
|
grunt.registerTask('default', ['babel', 'eslint']);
|
|
};
|