Fix build js for travis (#3359)
* Fix build.js * let to var * Added use_strict flag * Add new build system requirements * Fix array includes * Fix indexof
This commit is contained in:
parent
6e3708de80
commit
bb88f30aea
3 changed files with 4 additions and 3 deletions
|
|
@ -35,6 +35,7 @@ before_script:
|
|||
- echo "USE mysql;\nGRANT ALL PRIVILEGES ON \`test_frappe\`.* TO 'test_frappe'@'localhost';\n" | mysql -u root -ptravis
|
||||
|
||||
- cd ~/frappe-bench
|
||||
- npm install babel-core less chokidar babel-preset-es2015 babel-preset-es2016 babel-preset-es2017 babel-preset-babili
|
||||
- bench use test_site
|
||||
- bench reinstall --yes
|
||||
- bench start &
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const build_map = make_build_map();
|
|||
// command line args
|
||||
const action = process.argv[2] || '--build';
|
||||
|
||||
if (!['--build', '--watch'].includes(action)) {
|
||||
if (['--build', '--watch'].indexOf(action) === -1) {
|
||||
console.log('Invalid argument: ', action);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ def bundle(no_compress, make_copy=False, verbose=False):
|
|||
make_asset_dirs(make_copy=make_copy)
|
||||
|
||||
# new nodejs build system
|
||||
command = 'node ../apps/frappe/frappe/build.js --build'
|
||||
command = 'node --use_strict ../apps/frappe/frappe/build.js --build'
|
||||
if not no_compress:
|
||||
command += ' --minify'
|
||||
subprocess.call(command.split(' '))
|
||||
|
|
@ -42,7 +42,7 @@ def watch(no_compress):
|
|||
"""watch and rebuild if necessary"""
|
||||
|
||||
# new nodejs file watcher
|
||||
command = 'node ../apps/frappe/frappe/build.js --watch'
|
||||
command = 'node --use_strict ../apps/frappe/frappe/build.js --watch'
|
||||
subprocess.call(command.split(' '))
|
||||
|
||||
# setup()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue