Skip to content

Commit 0ad9d95

Browse files
committed
fix(bin):add npm file list, node require style to node:xx
1 parent a8077fa commit 0ad9d95

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ pnpm-lock.yaml
1414
# ignore compiled files
1515
build
1616
types
17-
index.js
18-
!**/index.js
17+
*.js
18+
!template-*/*.js
1919

2020
# ignore ide settings
2121
.idea

index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import * as fs from 'fs'
2-
import * as path from 'path'
1+
import * as fs from 'node:fs'
2+
import * as path from 'node:path'
3+
import * as process from 'node:process'
34
import minimist from 'minimist'
45
import prompts from 'prompts'
56
import mustache from 'mustache'
6-
import { fileURLToPath } from 'url'
7+
import { fileURLToPath } from 'node:url'
78
import { red, ansi256, reset } from 'kolorist'
89

910
const argv = minimist(process.argv.slice(2), { string: ['_'] })

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"files": [
1717
"mustache",
1818
"template-*",
19+
"bin.js",
1920
"index.js",
2021
"README.md"
2122
],

0 commit comments

Comments
 (0)