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