0.5.0 ā€¢ Published 3 years ago

@0wv/nodejs-ultimate-template v0.5.0

Weekly downloads
-
License
Unlicense
Repository
github
Last release
3 years ago

license .github/workflows/main.yml github-pages Gitpod ready-to-code GitHub tag npm

Node.js Ultimate Template

nodejs-parcel-typescript

A ultimate starter template for Node.js with TypeScript + Jest + ESLint + Parcel + TypeDoc (+ Gitpod)! šŸ˜„ There's also automated testing, linting, and documentation generation using GitHub Actions! āš”
Let's get started development at the fastest speed! šŸŽļø


āœØ Features

  • TypeScript

ā™»ļø Lint and Test

šŸ”Ø Development

  • Parcel

šŸ“ Documentation

  • TypeDoc
  • Code coverage report by Jest

šŸŒŒ Others

  • Automated testing, linting and generating documentation using GitHub Actions
  • Gitpod support

šŸŽØ App structure

field in ./package.jsonvalue
sourcesrc/index.ts
maindist/index.js
typesdist/index.d.ts
$ tree src
src
ā”œā”€ā”€ index.ts
ā”œā”€ā”€ main.test.ts
ā””ā”€ā”€ main.ts

0 directories, 3 files

šŸŽ‰ Get started (automatic if using Gitpod)

Requires:

  • tmux (used by npm run dev and npm run docs:serve)
npx degit sakkke/nodejs-ultimate-template [project-name]
cd [project-name]
npm i
npm run dev

Stop npm run dev

  1. Press <C-b>:killw<CR>
  2. Done!

Manually lint and test instead of npm run dev

Compile on change

npm run watch

Run Jest in watch mode

npm run test:watch

Run ESLint in watch mode

npm run lint:watch

Run TypeDoc in watch mode

npm run docs:watch

Serve _docs

npx serve _docs

šŸ”° Checklist

  • Check or update ./LICENSE
  • Update name, version, description, author in ./package.json
  • Change env.PUBLISH_*_SCOPE fields in ./.github/workflows/main.yml (see #Scope)
  • Set GitHub Pages source to gh-pages branch
  • Update ./README.md

šŸš€ Deploy with GitHub Actions

Overview

This template supports publishing to GitHub Package Registry and npm Registry with GitHub Actions. To publish, you push the commit that starts with :bookmark:. Also, you can use the commit that starts with :bug:, :sparkles: or :boom:. They are incrementing version field in ./package.json and publishing at the same time.

Start withWhat kind of increment
:bug:It increments patch version (like npm version patch)
:sparkles:It increments minor version (like npm version minor)
:boom:It increments major version (like npm version major)

Important

You must need secrets.PAT. This is GitHub Personal Access Token.

Scope

RegistryDefault scope
GitHub Package Registry@sakkke
npm Registry@0wv

To change, you must edit env.PUBLISH_*_SCOPE fields in ./.github/workflows/main.yml.

Example

First publish

$ git commit --allow-empty -m ':bookmark: v0.1.0'
$ git tag v0.1.0
$ git push --follow-tags

Publish package as v0.42.0

$ git commit --allow-empty -m ':bookmark: v0.42.0'
$ git tag v0.42.0
$ git push --follow-tags

Publish package with incrementing minor version

$ git commit --allow-empty -m ':sparkles: release'
$ git push

šŸ Related

šŸ“„ License

Unlicense

0.5.0

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago