Fix ezq toast timeout and fix yarn build command for Python 3 (#1266)

* Fix `ezToast()` timeout
* Force `yarn build` to use Python 3
* Closes #1265
This commit is contained in:
Kevin Chung
2020-02-29 15:21:22 -05:00
committed by GitHub
parent 7ee47b0abe
commit 2f46f61ed0
25 changed files with 28 additions and 26 deletions

View File

@@ -140,7 +140,7 @@ function getJSConfig(root, type, entries, mode) {
// Pretty nasty hack, would be a little better if this was purely JS
new WebpackShellPlugin({
onBuildEnd:[
mode == 'development' ? 'echo Skipping JS stub generation' : 'python -c \'exec(\"\"\"\nimport glob\nimport os\n\nstatic_js_dirs = [\n "CTFd/themes/core/static/js/**/*.dev.js",\n "CTFd/themes/admin/static/js/**/*.dev.js",\n]\n\nfor js_dir in static_js_dirs:\n for path in glob.glob(js_dir, recursive=True):\n if path.endswith(".dev.js"):\n path = path.replace(".dev.js", ".min.js")\n if os.path.isfile(path) is False:\n open(path, "a").close()\n\"\"\")\''
mode == 'development' ? 'echo Skipping JS stub generation' : 'python3 -c \'exec(\"\"\"\nimport glob\nimport os\n\nstatic_js_dirs = [\n "CTFd/themes/core/static/js/**/*.dev.js",\n "CTFd/themes/admin/static/js/**/*.dev.js",\n]\n\nfor js_dir in static_js_dirs:\n for path in glob.glob(js_dir, recursive=True):\n if path.endswith(".dev.js"):\n path = path.replace(".dev.js", ".min.js")\n if os.path.isfile(path) is False:\n open(path, "a").close()\n\"\"\")\''
],
safe: true,
}),