From: Aleksander Ɓukasz Date: Wed, 11 Dec 2013 16:23:32 +0000 (+0100) Subject: integration wip: configurable output dir path for grunt build task X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/90a2d19833e4b88f1987d6ec54b71d246506d693 integration wip: configurable output dir path for grunt build task --- diff --git a/Gruntfile.js b/Gruntfile.js index 4d929f6..f338192 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,13 +3,18 @@ module.exports = function(grunt) { 'use strict'; + var build_output_dir = grunt.option('output-dir') || 'build', + less_files = {}; + + less_files[build_output_dir + '/rng.css'] = 'src/editor/styles/main.less'; + grunt.initConfig({ requirejs: { compile: { options: { baseUrl: 'src/editor', mainConfigFile: 'src/editor/entrypoint.js', - out: 'build/rng.js', + out: build_output_dir + '/rng.js', name: 'entrypoint', include: ['libs/require'] } @@ -21,9 +26,7 @@ module.exports = function(grunt) { paths: [''], yuicompress: true }, - files: { - 'build/rng.css': 'src/editor/styles/main.less' - }, + files: less_files, }, }, jshint: {