55ee1c86b0dc787be49fa506892aa770a2b6d337
[fnpeditor.git] / Gruntfile.js
1 module.exports = function(grunt) {
2
3     grunt.initConfig({
4         requirejs: {
5           compile: {
6             options: {
7               baseUrl: 'src/editor',
8               mainConfigFile: 'src/editor/entrypoint.js',
9               out: 'build/rng.js',
10               name: 'entrypoint',
11               include: ['libs/require']
12             }
13           }
14         },
15         less: {
16             production: {
17                 options: {
18                     paths: [''],
19                     yuicompress: true
20                 },
21                 files: {
22                     'build/rng.css': 'src/editor/styles/main.less'
23                 },
24             },
25         },
26         jshint: {
27             all: ['Gruntfile.js', 'src/**/*.js'],
28             options: {
29                 jshintrc: '.jshintrc'
30             }
31         }
32     });
33
34     grunt.loadNpmTasks('grunt-contrib-requirejs');
35     grunt.loadNpmTasks('grunt-contrib-less');
36     grunt.loadNpmTasks('grunt-contrib-jshint');
37
38     grunt.registerTask('build', ['requirejs', 'less:production']);
39     grunt.registerTask('lint', ['jshint']);
40     grunt.registerTask('default', ['build']);
41 };