Skip to content

Commit 9ab017a

Browse files
authored
Create version 1.0.1 for public release (#3)
Context: The initial 1.0.0 release revealed some problems in the build process: - The `dist` directory included two copies of the source code; one directly inside `dist/` and the other in `dist/src`. - The `dist` directory mistakenly included the `test` directory. - When installed as a package, the code in `node_modules` could not be navigated using TypeScript-enabled editor features because there was no `tsconfig.json` in the root directory. Changes: The installed package is now structured as follows: - `dist/`: Contains a compiled JavaScript version of the package's `src` directory, along with type definitions and mappings. - `src/`: Contains the original TypeScript source code. - `LICENSE.md` - `package.json` - `README.md` - `tsconfig.build.json`: Included to help document the built package. - `tsconfig.json`: Included so that editors can navigate the TypeScript source code, since most imports use path aliases. This new structure solves the issues outlined in the Context section.
1 parent 0a0eac5 commit 9ab017a

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
dist/
12
node_modules/

.npmignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@
44
.prettierrc.js
55
jest.config.ts
66
test/
7-
tsconfig.build.json
8-
tsconfig.json

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@
5151
"format-check": "prettier -c .",
5252
"lint": "npm run eslint && npm run format",
5353
"lint-check": "npm run eslint-check && npm run format-check",
54-
"test": "jest"
54+
"test": "jest",
55+
"verify": "npm run lint-check && npm run test && npm run build"
5556
},
5657
"types": "dist/index.d.ts",
57-
"version": "1.0.0"
58+
"version": "1.0.1"
5859
}

tsconfig.build.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
22
"compilerOptions": {
33
"alwaysStrict": true,
4-
"baseUrl": ".",
4+
"rootDir": "./src",
5+
"baseUrl": "./src",
56
"declaration": true,
67
"declarationMap": true,
78
"esModuleInterop": true,
89
"module": "commonjs",
910
"noErrorTruncation": true,
1011
"outDir": "./dist",
1112
"paths": {
12-
"@": ["src/index"],
13-
"@/*": ["src/*"]
13+
"@": ["./index"],
14+
"@/*": ["./*"]
1415
},
1516
"sourceMap": true,
1617
"strict": true,
1718
"target": "ES2019"
1819
},
19-
"exclude": ["node_modules", "test"],
2020
"include": ["src"]
2121
}

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818
"strict": true,
1919
"target": "ES2019"
2020
},
21-
"exclude": ["node_modules"],
22-
"include": ["src", "test"]
21+
"exclude": ["dist", "node_modules"]
2322
}

0 commit comments

Comments
 (0)