Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Development flows #69

Open
momocow opened this issue Apr 17, 2019 · 0 comments
Open

Development flows #69

momocow opened this issue Apr 17, 2019 · 0 comments

Comments

@momocow
Copy link
Owner

momocow commented Apr 17, 2019

Scripts

Clean

Clean all files that match src/**/*.d.ts and src/**/*.js and the .dist folder (which contains local builds).

npm run clean

Commit

Following semantic commit message via commitizen.

npm run commit

Lint

  • Coding style: StandardJS
  • Linter: tslint + tslint-config-standard
npm run lint

Build

Compile all .ts files in place.

Since the main field in package.json is configured to be src/index, either typescript or javascript projects can find their corresponding entry files.

  • Compiler: tsc
npm run build

Webpack

Generate the cq-websocket.min.js and cq-websocket.kaomojified.js as the legacy work did. The output directory is dist on CI servers and .dist at local.

  • Compiler: webpack
npm run webpack

Release

Run semantic-release.

This will do actual release if it is master branch and there is any commit that causes version changed.

npm run release

Test

Run tests with AVA with ts-node/register enabled.

For nyc to correctly report the coverage, in tsconfig.json inlineSourceMap is set to true and source-map-support is installed.

npm test

Coverage

Coverage will be reported to coveralls.

npm run coverage

Docs

API references are generated using Typedoc with typedoc-plugin-external-module-name under /docs/api folder.

npm run docs

Update CQHTTP version in comment blocks

Parse all tsdoc comment blocks under src folder and update CQHTTP version in the CQHTTP document URL according to the minimal version specified by engines.cqhttp field in package.json.

gulp docs:update-cqhttp-version
@momocow momocow added the docs label Apr 17, 2019
@momocow momocow added this to To do in 💥 Embrace Hyper-Driven Development via automation Apr 17, 2019
@momocow momocow moved this from To do to In progress in 💥 Embrace Hyper-Driven Development Apr 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
No open projects
Development

No branches or pull requests

1 participant