3 module.exports = function(grunt) {
6 var build_output_dir = grunt.option('output-dir') || 'build',
9 less_files[build_output_dir + '/rng.css'] = 'src/editor/styles/main.less';
16 baseUrl: 'src/editor',
17 mainConfigFile: 'src/editor/entrypoint.js',
18 out: build_output_dir + '/rng.js',
20 include: ['libs/require'],
21 generateSourceMaps: true,
23 // The following two settings are required for source maps to work,
24 // see: http://requirejs.org/docs/optimization.html#sourcemaps
25 preserveLicenseComments: false,
26 optimize: grunt.option('optimize') || 'uglify2'
36 rootpath: 'src/editor/styles/'
42 all: ['Gruntfile.js', 'src/**/*.js'],
50 {src: ['libs/bootstrap/img/**'], dest: build_output_dir+'/'},
56 grunt.loadNpmTasks('grunt-contrib-requirejs');
57 grunt.loadNpmTasks('grunt-contrib-less');
58 grunt.loadNpmTasks('grunt-contrib-jshint');
59 grunt.loadNpmTasks('grunt-contrib-copy');
61 grunt.registerTask('build', ['requirejs', 'less:production', 'copy:resources']);
62 grunt.registerTask('lint', ['jshint']);
63 grunt.registerTask('default', ['build']);