0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-24 16:29:46 +01:00

work around publishing issue with npm v7 (#5983)

This commit is contained in:
Conduitry 2021-02-17 16:07:26 -05:00 committed by GitHub
parent 5e293f9b0f
commit 9a9b934a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

4
check_publish_env.js Normal file
View File

@ -0,0 +1,4 @@
if (!process.env.PUBLISH) {
console.error('npm publish must be run with the PUBLISH environment variable set');
process.exit(1);
}

View File

@ -73,7 +73,7 @@
"dev": "rollup -cw",
"pretest": "npm run build",
"posttest": "agadoo internal/index.mjs",
"prepublishOnly": "npm run lint && PUBLISH=true npm test",
"prepublishOnly": "node check_publish_env.js && npm run lint && npm test",
"tsd": "tsc -p src/compiler --emitDeclarationOnly && tsc -p src/runtime --emitDeclarationOnly",
"lint": "eslint \"{src,test}/**/*.{ts,js}\""
},