/
Gruntfile.js
61 lines (55 loc) · 1.2 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
module.exports = function(grunt) {
// Just because I can.
Object.defineProperty(String.prototype, 'appPath', {
get: function() {
return "atom-shell/Atom.app/Contents/Resources/app/" + this;
}
});
require("load-grunt-tasks")(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"babel": {
options: {
sourceMap: true,
playground: true
},
dist: {
files: [
{
expand: true,
cwd: 'src',
src: ['**/*.js'],
dest: 'lib'
}
]
}
},
copy: {
all: {
files: [
{
expand: true,
cwd: 'client/',
src: ['**/*.html', '**/*.css'],
dest: 'lib/client'
},
{
expand: true,
cwd: "lib",
src: ["**/*"],
dest: "".appPath
},
{src: "main.js", dest: "main.js".appPath},
{src: "package.json", dest: "package.json".appPath}
]
}
},
watch: {
all: {
files: ["src/**/*.js"],
tasks: ["default"]
}
}
});
grunt.registerTask("default", ["babel", "copy"]);
};