editor: nodePane handles meta/unregistered node attributes
[fnpeditor.git] / Gruntfile.js
1 /* global module */
2
3 module.exports = function(grunt) {
4     'use strict';
5
6     var build_output_dir = grunt.option('output-dir') || 'build',
7         less_files = {};
8
9     less_files[build_output_dir + '/rng.css'] = 'src/editor/styles/main.less';
10
11     grunt.initConfig({
12         requirejs: {
13           compile: {
14             options: {
15               baseUrl: 'src/editor',
16               mainConfigFile: 'src/editor/entrypoint.js',
17               out: build_output_dir + '/rng.js',
18               name: 'entrypoint',
19               include: ['libs/require']
20             }
21           }
22         },
23         less: {
24             production: {
25                 options: {
26                     paths: [''],
27                     cleancss: true,
28                     relativeUrls: true,
29                     rootpath: 'src/editor/styles/'
30                 },
31                 files: less_files,
32             },
33         },
34         jshint: {
35             all: ['Gruntfile.js', 'src/**/*.js'],
36             options: {
37                 jshintrc: '.jshintrc'
38             }
39         },
40         copy: {
41           resources: {
42             files: [
43               {src: ['libs/bootstrap/img/**'], dest: build_output_dir+'/'},
44             ]
45           }
46         }
47     });
48
49     grunt.loadNpmTasks('grunt-contrib-requirejs');
50     grunt.loadNpmTasks('grunt-contrib-less');
51     grunt.loadNpmTasks('grunt-contrib-jshint');
52     grunt.loadNpmTasks('grunt-contrib-copy');
53
54     grunt.registerTask('build', ['requirejs', 'less:production', 'copy:resources']);
55     grunt.registerTask('lint', ['jshint']);
56     grunt.registerTask('default', ['build']);
57 };