Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Commit 7b2f074

Browse files
committed
Add a guide and fix a few things
1 parent 6e12338 commit 7b2f074

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ This is an example project for shipping typescript using the rules layed out by
77
It gives you a library in UMD and ESM that's rolled up with rollup and includes rolled up types. It makes browser users, node users and me very happy.
88

99
Also includes eslint, mocha, semantic-release and github actions. Now updated to include the exports directive in the package.json.
10+
11+
12+
## Guide
13+
14+
- Set the repo secret `NPM_TOKEN` before your first push so that you can publish to npm.
15+
- Change all references in package.json to your own project name
16+
- If you want external dependencies, add them to the `external` section in the `rollup.config.js` otherwise they will be bundled in the library.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"homepage": "https://github.com/reconbot/typescript-library-template",
1515
"scripts": {
1616
"test": "mocha",
17-
"lint": "tsc && eslint lib/*.ts",
18-
"format": "eslint lib/*.ts --fix",
17+
"lint": "tsc && eslint lib/**/*.ts",
18+
"format": "eslint lib/**/*.ts --fix",
1919
"clean": "rm -rf dist-ts dist",
2020
"build": "npm run clean && tsc -p tsconfig-build.json && rollup -c && ts-eager bundle-types",
2121
"prepublishOnly": "npm run build",

rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ export default {
99
{ format: 'esm', file: './dist/index-esm.mjs' },
1010
{ format: 'umd', name: 'streamingIterables', file: './dist/index.js' },
1111
],
12+
external: [],
1213
}

0 commit comments

Comments
 (0)