ソースを参照

ref: rename build command

Sv443 1 年間 前
コミット
35b8ea7d02
3 ファイル変更4 行追加4 行削除
  1. 1 1
      .github/CONTRIBUTING.md
  2. 1 1
      .github/workflows/build-and-publish.yml
  3. 2 2
      package.json

+ 1 - 1
.github/CONTRIBUTING.md

@@ -15,7 +15,7 @@ Thanks to Matt Pocock for his video on how to set up a modern TypeScript library
 | :-- | :-- |
 | `npm run lint` | Run TSC and ESLint to lint the code |
 | `npm run build` | Build the project with tsup, outputting CJS and ESM bundles as well as TypeScript declarations to `dist/` |
-| `npm run build-global` | Build the project with tsup, outputting a bundle that exports as a global, including a userscript header to `dist/` (for publishing to greasyfork and OpenUserJS) |
+| `npm run build-all` | Build the project with tsup, outputting a bundle that exports as CJS, ESM and global declaration bundles (for publishing to GreasyFork and OpenUserJS) to `dist/` |
 | `npm run dev` | Watch for changes and build the project with sourcemaps |
 
 <br>

+ 1 - 1
.github/workflows/build-and-publish.yml

@@ -27,7 +27,7 @@ jobs:
       - name: Build package
         run: |
           npm run build
-          npm run build-global
+          npm run build-all
       - name: Create dist folder artifact
         uses: actions/upload-artifact@v3
         with:

+ 2 - 2
package.json

@@ -10,9 +10,9 @@
     "lint": "tsc --noEmit && eslint .",
     "build-types": "tsc --emitDeclarationOnly --declaration --outDir dist",
     "build-common": "tsup lib/index.ts --format cjs,esm --clean --treeshake",
-    "build-global": "tsup lib/index.ts --format cjs,esm,iife --treeshake --onSuccess \"npm run post-build-global && echo Finished building.\"",
+    "build-all": "tsup lib/index.ts --format cjs,esm,iife --treeshake --onSuccess \"npm run post-build-all && echo Finished building.\"",
     "build": "npm run build-common -- && npm run build-types",
-    "post-build-global": "npm run node-ts -- ./tools/post-build-global.mts",
+    "post-build-all": "npm run node-ts -- ./tools/post-build-all.mts",
     "dev": "npm run build-common -- --sourcemap --watch --onSuccess \"npm run build-types && echo Finished building.\"",
     "publish-package": "changeset publish",
     "node-ts": "node --no-warnings=ExperimentalWarning --enable-source-maps --loader ts-node/esm",