-
Notifications
You must be signed in to change notification settings - Fork 6
/
Gruntfile.js
55 lines (51 loc) · 1.78 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
watch: {
scripts: {
files: [
"src/MajorApi/AppBundle/Resources/public/javascript/major.js",
"src/MajorApi/AppBundle/Resources/public/javascript/major/**/*"
],
tasks: ["requirejs"]
},
styles: {
files: [
"src/MajorApi/AppBundle/Resources/public/css/*.scss"
],
tasks: ["styles"]
}
},
sass: {
dist: {
files: {
"src/MajorApi/AppBundle/Resources/public/css/majorapi.css": "src/MajorApi/AppBundle/Resources/public/css/majorapi.scss"
}
}
},
requirejs: {
compile: {
options: {
baseUrl: "src/MajorApi/AppBundle/Resources/public/javascript/",
mainConfigFile: "src/MajorApi/AppBundle/Resources/public/javascript/major.js",
paths: {
requireLib: "components/requirejs/require"
},
name: "major",
include: "requireLib",
out: "src/MajorApi/AppBundle/Resources/public/javascript/major-built.js"
}
}
}
});
// r.js plugin
grunt.loadNpmTasks("grunt-contrib-requirejs");
// watch plugin
grunt.loadNpmTasks("grunt-contrib-watch");
// sass plugin
grunt.loadNpmTasks("grunt-contrib-sass");
// grunt tasks
grunt.registerTask("default", ["requirejs", "sass"]);
grunt.registerTask("scripts", ["requirejs"]);
grunt.registerTask("styles", ["sass"]);
};