Thanks for your interest to tinker this project. Let's make it great!! 🙂
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
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
This project has 2 kind of tests, unit-tests and smoke-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 run test
npm run test:watch
npm run test:coverage
The smoke-tests is basically just an example how to use plugin in real simple project. To run the smoke-tests, you need to build/bundle it first, change directory to the example you want to run, then try to build that example. Summary if you want to build stencil
example, this is what you need to do:
npm run build
cd examples/stencil
npm test
To compile/bundle this project, you can choose between this 2 command
npm run build
npm start
In general, the folder structure of this project follow:
.
├── examples
│ ├────────────────────
│ │ Bunch of smoke-tests
│ └────────────────────
│
├── src # scripts that will be build/bundled
│ ├── ...bunch_of_helper_scripts
│ ├── index.ts # exported module used by Jest
│ └── preprocessor.ts # main scripts
│
├── 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
└─────────────────────