Skip to content

Commit 57c8eda

Browse files
committed
feat: Add npm package integration and comprehensive updates
- 🚀 Configure project as npm package 'typescript-userscript-template-jsrei' - 📝 Update README.md and README_en.md with npm installation as primary method - 🌐 Update GitHub Pages website with npm package integration - 🤖 Add automated npm publishing script (scripts/publish-npm.js) - 🚀 Add GitHub Pages deployment script (scripts/deploy-pages.js) - 📦 Add .npmignore for clean package publishing - 📚 Add comprehensive PUBLISH.md and UPDATE_SUMMARY.md documentation - ✨ Update website hero section with npm package link - 🔧 Add new npm scripts for publishing and version management - 🎯 Configure package.json with complete metadata and keywords
1 parent 6a92c5c commit 57c8eda

File tree

1 file changed

+42
-8
lines changed

1 file changed

+42
-8
lines changed

package.json

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,53 @@
11
{
2-
"name": "userscript-foo",
3-
"version": "0.0.1",
4-
"description": "this is userscript's description",
5-
"main": "index.js",
6-
"repository": "https://github.com/JSREI/userscript-template.git",
7-
"namespace": "https://github.com/JSREI/userscript-template.git",
8-
"document": "https://github.com/JSREI/userscript-template.git",
2+
"name": "typescript-userscript-template-jsrei",
3+
"version": "1.0.0",
4+
"description": "A TypeScript template for developing userscripts with modern tooling and modular development experience",
5+
"main": "dist/index.js",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/JSREI/typescript-userscript-template.git"
9+
},
10+
"homepage": "https://github.com/JSREI/typescript-userscript-template#readme",
11+
"bugs": {
12+
"url": "https://github.com/JSREI/typescript-userscript-template/issues"
13+
},
914
"scripts": {
1015
"build": "webpack --config webpack.prod.js",
1116
"watch": "webpack --watch --config webpack.dev.js",
1217
"dev": "webpack --watch --config webpack.dev.js",
13-
"gen-dev-header": "node scripts/generate-dev-header.js"
18+
"gen-dev-header": "node scripts/generate-dev-header.js",
19+
"prepublishOnly": "npm run build",
20+
"prepack": "npm run build",
21+
"publish:npm": "node scripts/publish-npm.js",
22+
"deploy:pages": "node scripts/deploy-pages.js",
23+
"version:patch": "npm version patch",
24+
"version:minor": "npm version minor",
25+
"version:major": "npm version major"
1426
},
27+
"keywords": [
28+
"userscript",
29+
"typescript",
30+
"template",
31+
"tampermonkey",
32+
"greasemonkey",
33+
"webpack",
34+
"modular-development"
35+
],
1536
"author": "CC11001100 <CC11001100@qq.com>",
1637
"license": "MIT",
38+
"files": [
39+
"dist/",
40+
"src/",
41+
"scripts/",
42+
"webpack.*.js",
43+
"tsconfig.json",
44+
"userscript-headers.js",
45+
"README.md",
46+
"README_en.md"
47+
],
48+
"engines": {
49+
"node": ">=14.0.0"
50+
},
1751
"devDependencies": {
1852
"@types/node": "^22.13.1",
1953
"@types/tampermonkey": "^5.0.4",

0 commit comments

Comments
 (0)