diff --git a/scripts/tasks.bash b/scripts/tasks.bash index 8a5a2039abd1998495552ca56be18066993d6f04..29af27a78becf556415914041472bbd240698ca5 100755 --- a/scripts/tasks.bash +++ b/scripts/tasks.bash @@ -83,6 +83,17 @@ function build-code-server() { cd "${buildPath}/out/vs/server" && yarn --production --ignore-scripts rm "${buildPath}/out/vs/server/"{package.json,yarn.lock} + # onigasm 2.2.2 has a bug that makes it broken for PHP files so use 2.2.1. + # https://github.com/NeekSandhu/onigasm/issues/17 + local onigasmPath="${buildPath}/node_modules/onigasm-umd" + rm -rf "${onigasmPath}" + git clone "https://github.com/alexandrudima/onigasm-umd" "${onigasmPath}" + cd "${onigasmPath}" && yarn && yarn add --dev onigasm@2.2.1 && yarn package + mkdir "${onigasmPath}-temp" + mv "${onigasmPath}/"{release,LICENSE} "${onigasmPath}-temp" + rm -rf "${onigasmPath}" + mv "${onigasmPath}-temp" "${onigasmPath}" + prepend-loader "out/vs/server/main.js" prepend-loader "out/bootstrap-fork.js"