mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-20 01:12:38 +01:00
Run build script via tools/make-nodejs.sh (#3808)
This commit is contained in:
parent
76abd04898
commit
ab9f5ae100
@ -85,8 +85,8 @@ function pslInit(raw) {
|
|||||||
// Use loadJSON() because require() would keep the string in memory.
|
// Use loadJSON() because require() would keep the string in memory.
|
||||||
serialized = loadJSON('build/publicsuffixlist.json');
|
serialized = loadJSON('build/publicsuffixlist.json');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if ( process.env.npm_lifecycle_event !== 'install' ) {
|
if ( process.env.npm_lifecycle_event !== 'build' ) {
|
||||||
// This should never happen except during package installation.
|
// This should never happen except during package building.
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install": "node install.js",
|
"build": "node build.js",
|
||||||
"test": "node test.js"
|
"test": "node test.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -57,6 +57,10 @@ cp platform/nodejs/*.json $DES/
|
|||||||
cp platform/nodejs/README.md $DES/
|
cp platform/nodejs/README.md $DES/
|
||||||
cp LICENSE.txt $DES/
|
cp LICENSE.txt $DES/
|
||||||
|
|
||||||
|
cd $DES
|
||||||
|
npm run build
|
||||||
|
cd -
|
||||||
|
|
||||||
if [ "$1" = all ]; then
|
if [ "$1" = all ]; then
|
||||||
echo "*** uBlock0.nodejs: Creating plain package..."
|
echo "*** uBlock0.nodejs: Creating plain package..."
|
||||||
pushd $(dirname $DES/) > /dev/null
|
pushd $(dirname $DES/) > /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user