requirejs: {
compile: {
options: {
- baseUrl: '',
- mainConfigFile: 'entrypoint.js',
+ baseUrl: 'src/editor',
+ mainConfigFile: 'src/editor/entrypoint.js',
out: 'build/rng.js',
name: 'entrypoint',
include: ['libs/require']
yuicompress: true
},
files: {
- 'build/rng.css': 'styles/main.less'
+ 'build/rng.css': 'src/editor/styles/main.less'
},
},
+ },
+ jshint: {
+ all: ['Gruntfile.js', 'src/**/*.js'],
+ options: {
+ jshintrc: '.jshintrc'
+ }
}
});
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-less');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.registerTask('default', ['requirejs']);
+ grunt.registerTask('build', ['requirejs', 'less:production']);
+ grunt.registerTask('lint', ['jshint']);
+ grunt.registerTask('default', ['build']);
};
\ No newline at end of file