You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeScript project with modern tooling (March 2021) to get started quickly and right-footed. Ideal for quick projects as well as npm packages.
3
+
[](https://github.com/metachris/micropython-ctl/actions?query=workflow%3A%22Build+and+test%22)
TypeScript project boilerplate with modern tooling, targetting for Node.js and browser.
8
+
9
+
*[TypeScript](https://www.typescriptlang.org/) 4
10
+
* Optionally [esbuild](https://esbuild.github.io/) - to bundle for browsers and Node.js
8
11
* Linting with [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) ([tslint](https://palantir.github.io/tslint/) is deprecated)
9
-
*Tests with [Jest](https://jestjs.io/docs/getting-started) (and [ts-jest](https://www.npmjs.com/package/ts-jest))
10
-
*CI for testing and linting ([GitHub Actions](https://docs.github.com/en/actions) / [Gitlab CI](https://docs.gitlab.com/ee/ci/))
11
-
*Automatic API documentation with [typedoc](https://typedoc.org/guides/doccomments/)
12
-
*Building a browser-compatible module with [esbuild](https://esbuild.github.io/) or [webpack](https://webpack.js.org/)
12
+
*Testing with [Jest](https://jestjs.io/docs/getting-started) (and [ts-jest](https://www.npmjs.com/package/ts-jest))
*Automatic API documentation with [TypeDoc](https://typedoc.org/guides/doccomments/)
13
16
14
-
See also the [introduction blog post](https://www.metachris.com/2021/03/bootstrapping-a-typescript-node.js-project/).
17
+
See also the introduction blog post: [Starting a TypeScript Project in 2021](https://www.metachris.com/2021/03/bootstrapping-a-typescript-node.js-project/).
15
18
16
19
17
20
## Getting Started
18
21
19
22
* Clone the repository (you can also click "Use this template")
20
23
* Edit `package.json` and `tsconfig.json` to your liking
21
24
* Now you can run `yarn run`, `yarn lint`, `yarn test`, `yarn build` and `yarn ts-node <filename>`.
25
+
* Take a look at all the scripts in [`package.json`](https://github.com/metachris/typescript-boilerplate/blob/master/package.json)
22
26
* For publishing to npm, use `yarn publish` (or `npm publish`)
23
27
24
-
### Want documentation, published to GitHub or GitLab pages?
25
-
26
-
You can auto-generate API documentation from the TyoeScript source files using [typedoc](https://typedoc.org/guides/doccomments/). The generated documentation can be published to GitHub / GitLab pages through the CI:
* Add `docs` script to `package.json`: `"docs": "typedoc --entryPoints src/main.ts"`
30
-
* You can now generate the documentation with `yarn docs`. The resulting HTML is saved in `docs/`.
31
-
* Publish to pages through CI:
32
-
*[GitHub pages](https://pages.github.com/): uncomment content of `.github/workflows/deploy-gh-pages.yml` and enable pages in GitHub repo settings
33
-
*[GitLab pages](https://docs.gitlab.com/ee/user/project/pages/): uncomment deploy task in `.gitlab-ci.yml`
34
-
35
-
### esbuild
36
-
37
-
You can use [esbuild](https://esbuild.github.io/) instead of the default TypeScript compiler (`tsc`) to build and bundle the output for node and browsers.
30
+
You can use [esbuild](https://esbuild.github.io/) to bundle for browsers (and Node.js if you want).
38
31
`esbuild` is an extremely fast bundler that supports a [large part of the TypeScript syntax](https://esbuild.github.io/content-types/#typescript).
You can build everything with `yarn build`. Read more about the esbuild setup [here](TODO).
45
+
46
+
## Documentation, published to GitHub or GitLab pages
47
+
48
+
You can auto-generate API documentation from the TyoeScript source files using [typedoc](https://typedoc.org/guides/doccomments/). The generated documentation can be published to GitHub / GitLab pages through the CI:
0 commit comments