-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
56 lines (53 loc) · 1.47 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
46
47
48
49
50
51
52
53
54
55
56
'use strict';
var mountFolder;
mountFolder = function(connect, dir) {
return connect['static'](require('path').resolve(dir));
};
module.exports = function(grunt) {
var yeomanConfig;
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
yeomanConfig = {
src: 'src',
dist: 'dist'
};
return grunt.initConfig({
yeoman: yeomanConfig,
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: ['<%= yeoman.src %>/init.js', '<%= yeoman.src %>/*.js', '<%= yeoman.src %>/**/*.js'],
dest: '<%= yeoman.dist %>/rest.js',
},
},
yuidoc: {
compile: {
name: '<%= pkg.name %>',
description: '<%= pkg.description %>',
version: '<%= pkg.version %>',
url: '<%= pkg.homepage %>',
options: {
paths: '<%= yeoman.src %>',
themedir : 'node_modules/yuidoc-bootstrap-theme',
helpers : ['node_modules/yuidoc-bootstrap-theme/helpers/helpers.js'],
outdir: 'docs/'
}
}
},
// Test settings
karma: {
unit: {
configFile: 'test/karma.conf.js'
},
travis: {
configFile: 'test/karma.conf.js',
singleRun: true
}
}
},
grunt.registerTask('doc', ['yuidoc']),
grunt.registerTask('default', ['concat']),
grunt.registerTask('build', ['concat']),
grunt.registerTask('test', ['build', 'karma:unit']),
grunt.registerTask('test-travis', ['build', 'karma:travis'])
);
};