Skip to content

Commit b13e919

Browse files
committed
Prepare to npm publish
1 parent 29f3cc7 commit b13e919

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/
2+
tsconfig.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Moreover, using enums in TypeScript has a lot of caveats and edge cases to keep
2121
- https://maxheiber.medium.com/alternatives-to-typescript-enums-50e4c16600b1
2222
- https://stackoverflow.com/questions/40275832/typescript-has-unions-so-are-enums-redundant/60041791#60041791
2323

24-
Additionally, if you have been using [@babel/plugin-transform-typescript](https://babeljs.io/docs/en/babel-plugin-transform-typescript.html), you might already know that one of the caveats is to avoid using `const enum`s, as those require type information to compile.
24+
Additionally, if you have been using [@babel/plugin-transform-typescript](https://babeljs.io/docs/en/babel-plugin-transform-typescript.html), you might already notice that one of the caveats is to avoid using `const enum`s, as those require type information to compile.
2525

2626
Nonetheless, TypeScript is still a very fantastic and powerful programming language that I love very much. Enums may have been a very good feature to have back in the early days (2011) when good alternatives did not yet exist.
2727

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
"description": "ESLint rules for TypeScript enums.",
55
"main": "dist",
66
"scripts": {
7-
"build": "rimraf dist && tsc",
8-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"prebuild": "rimraf dist",
9+
"build": "tsc",
10+
"prepublishOnly": "npm run build"
911
},
1012
"repository": {
1113
"type": "git",

0 commit comments

Comments
 (0)