Closed hhzl closed 7 years ago
Implemented https://github.com/hhzl/LearnWords2/blob/master/Grunt_config_object.js
path = require('path');
var p = {"INPUT_DIR" : 'data',
"WEB_ROOT": 'public',
"BUILD_DIR" : path.join('public','js'),
"DIST_DIR" : 'dist'};
module.exports = p;
This needs to be replaced by a JSON object read from a file and
set_input_data_directory:mydata
has to replace the data
part in that file.
Moved to a YAML file https://github.com/hhzl/LearnWords2/blob/master/Grunt_parameters_ini.yml
---
# --------------------------------------------------------
# Define paths for the grunt task runner
# 7th February 2017
#
# This is a YAML file
# http://yaml.org/
#
# Main advantage over JSON is that it may have
# comments.
#
# https://www.json2yaml.com/convert-yaml-to-json
#
# The content is read with
# http://gruntjs.com/api/grunt.file#grunt.file.readyaml
# --------------------------------------------------------
# The LearnWords data is taken from
INPUT_DIR: data
# The directory for the GUI demo
WEB_ROOT: public
BUILD_DIR: public/js
# The distribution directory for the library LW.js
DIST_DIR: dist
The YAML file may be edited, no longer a need for this task.
The current variable INPUT_DIR is defined as
Still use
data
as default directory but allow the following grunt commandto set