diff --git a/platform/nodejs/install.js b/platform/nodejs/install.js index e3fb85ac2..7c3ceb854 100644 --- a/platform/nodejs/install.js +++ b/platform/nodejs/install.js @@ -29,5 +29,6 @@ import { pslInit } from './index.js'; /******************************************************************************/ +fs.mkdirSync('./build', { recursive: true }); fs.writeFileSync('./build/publicsuffixlist.json', JSON.stringify(pslInit().toSelfie())); diff --git a/tools/make-nodejs.sh b/tools/make-nodejs.sh index 1dedfefb2..fe66805a9 100755 --- a/tools/make-nodejs.sh +++ b/tools/make-nodejs.sh @@ -6,6 +6,8 @@ set -e DES=dist/build/uBlock0.nodejs +rm -rf $DES + mkdir -p $DES/js cp src/js/base64-custom.js $DES/js cp src/js/biditrie.js $DES/js @@ -47,9 +49,6 @@ node -pe "JSON.stringify(fs.readFileSync('$THIRDPARTY/easylist.txt', 'utf8'))" \ node -pe "JSON.stringify(fs.readFileSync('$THIRDPARTY/easyprivacy.txt', 'utf8'))" \ > $DES/data/easyprivacy.json -rm -rf $DES/build -mkdir -p $DES/build - cp platform/nodejs/*.js $DES/ cp platform/nodejs/*.json $DES/ cp LICENSE.txt $DES/