[TASK] Seperate dev and default for requirejs

This commit is contained in:
Xaver Maierhofer 2016-05-23 00:13:21 +02:00 committed by Milan Paessler
parent 88f43bc57c
commit 231bfcedd7
4 changed files with 22 additions and 7 deletions

View file

@ -1,8 +1,9 @@
module.exports = function (grunt) {
grunt.loadTasks("tasks");
grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass", "postcss", "requirejs", "inline"]);
grunt.registerTask("default", ["bower-install-simple", "lint", "copy", "sass", "postcss", "requirejs:default", "inline"]);
grunt.registerTask("lint", ["eslint"]);
grunt.registerTask("dev", ["default", "connect:server", "watch"]);
grunt.registerTask("dev", ["bower-install-simple", "lint", "copy", "sass", "requirejs:dev"]);
grunt.registerTask("serve", ["dev", "connect:server", "watch"]);
};

View file

@ -46,6 +46,10 @@ Just run the following command from the hopglass directory:
This will generate `build/` containing all required files.
## Development
Use `grunt serve` for development.
# Configure
Copy `config.json.example` to `build/config.json` and change it to match your community.

View file

@ -109,15 +109,25 @@ module.exports = function (grunt) {
}
},
requirejs: {
compile: {
default: {
options: {
baseUrl: "lib",
name: "../bower_components/almond/almond",
mainConfigFile: "app.js",
include: "../app",
wrap: true,
optimize: "uglify",
out: "build/app.js"
out: "build/app.js",
build: false
}
},
dev: {
options: {
baseUrl: "lib",
name: "../bower_components/almond/almond",
mainConfigFile: "app.js",
include: "../app",
optimize: "none",
out: "build/app.js",
build: false
}
}
}

View file

@ -19,7 +19,7 @@ module.exports = function (grunt) {
livereload: true
},
files: ["*.css", "app.js", "lib/**/*.js", "*.html"],
tasks: ["default"]
tasks: ["dev"]
},
config: {
options: {