This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Gruntfile.js
57 lines (54 loc) · 1.56 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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
// Project configuration.
grunt.initConfig({
jshint: {
all: ['Gruntfile.js', 'browser/editor.js', 'browser/web.js'],
options: {
browser: true,
globals: {
jQuery: true,
$: true,
CodeMirror: true
}
}
},
uglify: {
editor: {
src: 'browser/editor.js',
dest: 'tmp/editor-min.js'
},
web: {
src: 'browser/web.js',
dest: 'tmp/web-min.js'
},
codemirror_core: {
src: 'browser/codemirror/codemirror.js',
dest: 'tmp/codemirror-min.js'
},
codemirror_markdown: {
src: 'browser/codemirror/markdown.js',
dest: 'tmp/markdown-min.js'
}
},
concat: {
codemirror: {
src: ['tmp/codemirror-min.js', 'tmp/markdown-min.js'],
dest: 'tmp/codemirror-full-min.js'
},
web: {
src: ['browser/deps/modernizr-2.6.2.min.js', 'browser/deps/showdown.min.js', 'browser/deps/bootstrap.min.js', 'tmp/codemirror-full-min.js', 'tmp/editor-min.js', 'tmp/web-min.js'],
dest: 'public/javascripts/varnam.js'
},
addon: {
src: ['tmp/codemirror-full-min.js', 'tmp/editor-min.js'],
dest: 'public/javascripts/addon.js'
}
}
});
// Default task.
grunt.registerTask('default', ['jshint', 'uglify', 'concat']);
grunt.registerTask('concatonly', ['jshint', 'concat']);
};