Skip to content

Commit

Permalink
Shift to NPM NDNts
Browse files Browse the repository at this point in the history
  • Loading branch information
zjkmxy committed Feb 16, 2025
1 parent 986fe73 commit a835f80
Show file tree
Hide file tree
Showing 18 changed files with 1,069 additions and 1,579 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/lint-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install dependencies
run: pnpm install
run: deno install --allow-scripts
- name: Deno lint
run: pnpm lint
run: deno lint
- name: Deno test
run: pnpm test
run: deno test --no-check
- name: Deno format check
run: deno fmt --check
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
with:
deno-version: v2.x
- name: Install dependencies
run: pnpm install
run: deno install --allow-scripts
- name: DNT build
run: pnpm build
run: deno run -A ./build.ts
- name: Login
run: |
pnpm set registry "http://npm.pkg.github.com/"
Expand Down
4 changes: 2 additions & 2 deletions build.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { build, emptyDir } from 'https://deno.land/x/[email protected]/mod.ts';
import pnpmPkg from './package.json' with { type: 'json' };
import npmPkg from './package.json' with { type: 'json' };

const OUTPUT_DIR = './dist';

Expand Down Expand Up @@ -56,7 +56,7 @@ if (import.meta.main) {
typeCheck: false,
packageManager: 'pnpm',
// package.json properties
package: pnpmPkg,
package: npmPkg,
postBuild() {
// steps to run after building and before running the tests
Deno.copyFileSync('LICENSE', `${OUTPUT_DIR}/LICENSE`);
Expand Down
7 changes: 6 additions & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,10 @@
"dist/"
]
},
"nodeModulesDir": "manual"
"imports": {
"assert": "https://deno.land/[email protected]/assert/mod.ts",
"hex": "https://deno.land/[email protected]/encoding/hex.ts",
"sleep": "https://deno.land/x/[email protected]/mod.ts",
},
"nodeModulesDir": "auto"
}
Loading

0 comments on commit a835f80

Please sign in to comment.