chore: build cli.js
This commit is contained in:
parent
bb6eba5fdb
commit
b6cd50450a
3 changed files with 25 additions and 9 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -67,3 +67,4 @@ typings/
|
||||||
|
|
||||||
dist/cache
|
dist/cache
|
||||||
dist/ext*
|
dist/ext*
|
||||||
|
dist/cli.js
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
"version": "0.15.20",
|
"version": "0.15.20",
|
||||||
"description": "download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱",
|
"description": "download sheet music from musescore.com for free, no login or Musescore Pro required | 免登录、免 Musescore Pro,免费下载 musescore.com 上的曲谱",
|
||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
|
"bin": "dist/cli.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/Xmader/musescore-downloader.git"
|
"url": "git+https://github.com/Xmader/musescore-downloader.git"
|
||||||
|
@ -40,14 +41,13 @@
|
||||||
"@librescore/sf3": "^0.3.0",
|
"@librescore/sf3": "^0.3.0",
|
||||||
"detect-node": "^2.0.4",
|
"detect-node": "^2.0.4",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"pdfkit": "git+https://github.com/Xmader/pdfkit.git",
|
|
||||||
"svg-to-pdfkit": "^0.1.8",
|
|
||||||
"webmscore": "^0.10.4"
|
"webmscore": "^0.10.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-json": "^4.0.0",
|
"@rollup/plugin-json": "^4.0.0",
|
||||||
"@types/file-saver": "^2.0.1",
|
"@types/file-saver": "^2.0.1",
|
||||||
"@types/pdfkit": "^0.10.4",
|
"@types/pdfkit": "^0.10.4",
|
||||||
|
"pdfkit": "git+https://github.com/Xmader/pdfkit.git",
|
||||||
"rollup": "^1.26.3",
|
"rollup": "^1.26.3",
|
||||||
"rollup-plugin-commonjs": "^10.1.0",
|
"rollup-plugin-commonjs": "^10.1.0",
|
||||||
"rollup-plugin-node-builtins": "^2.1.2",
|
"rollup-plugin-node-builtins": "^2.1.2",
|
||||||
|
@ -55,6 +55,7 @@
|
||||||
"rollup-plugin-node-resolve": "^5.2.0",
|
"rollup-plugin-node-resolve": "^5.2.0",
|
||||||
"rollup-plugin-string": "^3.0.0",
|
"rollup-plugin-string": "^3.0.0",
|
||||||
"rollup-plugin-typescript": "^1.0.1",
|
"rollup-plugin-typescript": "^1.0.1",
|
||||||
|
"svg-to-pdfkit": "^0.1.8",
|
||||||
"tslib": "^1.10.0",
|
"tslib": "^1.10.0",
|
||||||
"typescript": "^4.1.1-rc"
|
"typescript": "^4.1.1-rc"
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,7 +15,7 @@ const getBannerText = () => {
|
||||||
return bannerText
|
return bannerText
|
||||||
}
|
}
|
||||||
|
|
||||||
const plugins = [
|
const basePlugins = [
|
||||||
typescript({
|
typescript({
|
||||||
target: "ES6",
|
target: "ES6",
|
||||||
sourceMap: false,
|
sourceMap: false,
|
||||||
|
@ -37,12 +37,6 @@ const plugins = [
|
||||||
string({
|
string({
|
||||||
include: "**/*.css",
|
include: "**/*.css",
|
||||||
}),
|
}),
|
||||||
builtins(),
|
|
||||||
nodeGlobals({
|
|
||||||
dirname: false,
|
|
||||||
filename: false,
|
|
||||||
baseDir: false,
|
|
||||||
}),
|
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* remove tslib license comments
|
* remove tslib license comments
|
||||||
|
@ -60,6 +54,17 @@ const plugins = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const plugins = [
|
||||||
|
...basePlugins,
|
||||||
|
builtins(),
|
||||||
|
nodeGlobals({
|
||||||
|
dirname: false,
|
||||||
|
filename: false,
|
||||||
|
baseDir: false,
|
||||||
|
process: false,
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
input: "src/worker.ts",
|
input: "src/worker.ts",
|
||||||
|
@ -84,4 +89,13 @@ export default [
|
||||||
},
|
},
|
||||||
plugins,
|
plugins,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
input: "src/cli.ts",
|
||||||
|
output: {
|
||||||
|
file: "dist/cli.js",
|
||||||
|
format: "cjs",
|
||||||
|
sourcemap: false,
|
||||||
|
},
|
||||||
|
plugins: basePlugins,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue