diff --git a/.travis.yml b/.travis.yml index e9e5c0e183..77e3c6662f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 & diff --git a/frappe/build.js b/frappe/build.js index e0b0a5f8db..4d14b933c5 100644 --- a/frappe/build.js +++ b/frappe/build.js @@ -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; } diff --git a/frappe/build.py b/frappe/build.py index 56339f7c76..9e7f928d03 100644 --- a/frappe/build.py +++ b/frappe/build.py @@ -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()