-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
90 lines (83 loc) · 2.91 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
85
86
87
88
89
90
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';',
banner: '/*! <%= pkg.name %> v<%= pkg.version %> */\n/*! build <%= grunt.template.today("yyyy-mm-dd_HH:MM") %> */\n/*! author Christian Marienfeld - http://chrisland.com */\n'
},
dist: {
src: [ //'source/js/jquery-2.0.3.min.js',
// 'source/js/jquery-ui-1.10.3.custom.min.js',
//'source/assets/jquery.cl.spinner/jquery.cl.spinner.js',
//'source/assets/jquery.cl.unit/jquery.cl.unit.js',
//'source/assets/spectrum/spectrum.js',
//'source/js/cssjson.js',
//'source/assets/codemirror-3.20/lib/codemirror.js',
//'source/assets/codemirror-3.20/mode/css/css.js',
//'source/assets/codemirror-3.20/mode/javascript/javascript.js',
//'source/assets/codemirror-3.20/mode/htmlmixed/htmlmixed.js',
//'source/assets/codemirror-3.20/mode/xml/xml.js',
'source/js/app.js'
],
dest: 'source/shellui.min.js',
},
},
cssmin: {
add_banner: {
options: {
banner: '/*! <%= pkg.name %> v<%= pkg.version %> */\n/*! build <%= grunt.template.today("yyyy-mm-dd_HH:MM") %> */\n/*! author Christian Marienfeld - http://chrisland.com */\n'
},
files: {
'source/style/style.min.css': [
'source/style/style.css'
//'source/style/normal/ui-lightness/jquery-ui-1.10.3.custom.min.css',
//'source/assets/jpicker/jPicker.css',
//'source/assets/spectrum/spectrum.css',
//'source/assets/codemirror-3.20/lib/codemirror.css',
//'source/assets/codemirror-3.20/theme/paraiso-light.css'
]
}
}
},
nodewebkit: {
options: {
version: '0.9.2',
app_name: '<%= pkg.name %>',
app_version: '<%= pkg.version %>',
build_dir: './release', // Where the build version of my node-webkit app is saved
mac: true, // We want to build it for mac
win: false, // We want to build it for win
linux32: false, // We don't need linux32
linux64: false, // We don't need linux64
mac_icns: 'icon.icns',
credits: 'credits.html'
},
src: ['./source/**/*'] // Your node-wekit app
},
watch: {
scripts: {
files: ['source/*.html','source/js/*.js','source/lib/*.js','source/style/*.css','source/templates/*'],
tasks: ['default'],
options: {
spawn: false,
}
}
},
open : {
default : {
path: './release/releases/ShellUi/mac/ShellUi.app'
}
}
});
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
//grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-node-webkit-builder');
//grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['concat','cssmin','nodewebkit','open']);
};