-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
45 lines (40 loc) · 1.12 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
module.exports = function (grunt) {
// Use dir arg from command line
var dir = grunt.option('dir') || 'build';
var publicjs = ['public/js/views/**/*.js', 'public/js/*.js'];
var libjs = ['lib/**.js'];
var islandjs = ['node_modules/island-*/*.js', 'node_modules/island-*/lib/*.js'];
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: publicjs.concat(libjs, islandjs),
public: publicjs,
lib: libjs,
island: islandjs,
options: {
jshintrc: 'linters/.jshintrc'
}
},
requirejs: {
std: {
options: {
appDir: 'public',
mainConfigFile: 'public/js/main.js',
baseUrl: 'js',
optimize: 'uglify2',
inlineText: true,
findNestedDependencies: true,
preserveLicenseComments: false,
wrap: true,
name: 'main',
include: 'lib/require/almond',
dir: dir
}
}
}
});
grunt.loadNpmTasks('grunt-requirejs');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('build', 'requirejs');
};