Want to Hackโ
October 6, 2018 ยท View on GitHub
Thanks for your interest to improve this project. Let's make it great!! ๐
Basic Overview
This project use rollup to bundle the final result while maintain the code format and it's comments block. Overall, the technology stack that this project uses are (you don't need to install this tools beforehand because it's already in dependecy list):
- static-type checker: typescript
- code-style checker (linter): tslint + prettier
- bundler: rollup + babel
- git hooks: husky + commitlint + lint-staged + standard-version
- test framework: jest
Start Hacking
Setup
First, install all dependencies by running
npm install
and if you got message about security vulnurability, you can use this command to fix it
npm audit fix
Test
This project has only unit-tests. The unit-tests will use jest which basically will run in node.js environment. Run this command to start the unit-tests (choose which one):
npm test # watch mode
npm run test:once # run only once (just like `jest --notify`)
npm run test:coverage # run once and output the coverage
Build
To compile/bundle this project, you can choose between this 2 command
To build once
npm run build
To run live build
npm start
That command is suitable if you want to live experiment the cli (src/main.ts)
Project Structure
In general, the folder structure of this project follow:
.
โโโ src # scripts that will be build/bundled
โ โโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Bunch of helper scripts
โ โโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ index.ts # exported module
โ
โโโ test
โ โโโ fixtures
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ Bunch of sample to be tested
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โโโ utils.js # helper script used in various fixtures
โ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Few test-cases with file-extension *.test.ts
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ utils.ts # helper script used in various test-cases
โ
โโโโโโโโโโโโโโโโโโโโโโ
โ Bunch of config files
โโโโโโโโโโโโโโโโโโโโโโ