-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
84 lines (68 loc) · 1.9 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*global module:false*/
'use strict';
module.exports = function(grunt) {
// Load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
//Load our own tasks
grunt.loadTasks('tasks');
//--------------------------------------------------------------------------------------------------
var conf = {
// Is this really needed?
pkg: grunt.file.readJSON('package.json'),
//Check syntax of JavaScript
jshint: {
_watch: {
gruntfile: '<%=jshint.gruntfile.src%>',
},
options: {
/* JsHint settings, remember to put this to your editor too */
"bitwise":true, "camelcase":false, "curly":true, "eqeqeq": true, "forin":false,
"immed": false, "latedef": true, "newcap": true, "noarg": true, "noempty": false,
"nonew": true, "plusplus":false, "regexp": true, "strict":false, "trailing": true,
"undef": true, "unused": false, "white":false, /**/ "es5":true, "sub":true, /**/
"browser": true, "jquery": true
},
gruntfile: {src: 'Gruntfile.js'}
},
"string-replace": {
dist: {
files: {
"./index.js": "./index.js"
},
options: {
replacements: [{
pattern: /exports\.version ?= ?"\d+\.\d+\.\d+";/ig,
replacement: "exports.version = \"<%= pkg.version %>\";"
}]
}
}
},
jsdoc: {
dist: {
src: ['README.md', 'index.js', 'lib/**/*.js'],
options: {
configure: "./jsdoc_settings/conf.json",
template: "./jsdoc_settings/getmestyle/",
tutorials: "./tutorials/",
destination: 'doc'
}
}
},
list_features: {
dist: {
options: {
prefix: "getme",
},
files:{
"./tutorials/features.md": "./index.js"
}
}
}
};
//--------------------------------------------------------------------------------------------------
// Project configuration.
grunt.initConfig(conf);
grunt.registerTask('default', [
'string-replace', 'list_features', 'jsdoc'
]);
};