This repository has been archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
97 lines (95 loc) · 2.99 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
91
92
93
94
95
96
97
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch:
{
dev:
{
files: [ 'frontend/src/**/*' ],
tasks: ['concat:sass','concat:coffee','pug','sass','coffee','uglify:js'],
}
},
pug:
{
compile:
{
files: { 'dist/index.html': 'frontend/src/pug/index.pug' }
}
},
sass:
{
compile:
{
options:
{
sourcemap: 'none',
style: 'compressed',
noCache: true
},
files: { 'dist/css/alfred.min.css': 'build/alfred.sass' }
}
},
coffee:
{
compile:
{
options:
{
bare: true
},
files:
{
'main.js': 'frontend/src/coffee/electron.coffee.md', // Dev
'dist/main.js': 'frontend/src/coffee/electron.coffee.md',
'build/alfred.js': 'build/alfred.coffee.md'
}
}
},
concat:
{
coffee:
{
dest: 'build/alfred.coffee.md',
src: [
'frontend/src/coffee/variables.coffee.md',
'frontend/src/coffee/methods.coffee.md',
'frontend/src/coffee/path.coffee.md',
'frontend/src/coffee/output.coffee.md',
'frontend/src/coffee/node.coffee.md',
'frontend/src/coffee/work2node.coffee.md',
// 'frontend/src/coffee/python2js.coffee.md',
'frontend/src/coffee/main.coffee.md'
]
},
sass:
{
dest: 'build/alfred.sass',
src: [
'frontend/src/sass/variables.sass',
'frontend/src/sass/colors.sass',
'frontend/src/sass/app.sass',
'frontend/src/sass/windowbar.sass',
'frontend/src/sass/modal.sass',
'frontend/src/sass/node-editor.sass',
'frontend/src/sass/gui.sass'
]
}
},
uglify:
{
js:
{
files: { 'dist/js/alfred.min.js': 'build/alfred.js' }
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-pug');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('dev', ['watch:dev']);
grunt.registerTask('compile', ['concat:sass','concat:coffee','pug','sass','coffee','uglify:js']);
};