This repository contains starter files for the week 6 Class Activity on Structural and Behavioral Design Patterns.
This is a customized Typescript project starter which includes the following features:
- Webpack bunding
- Webpack bundle analyzer
- Unit test with jest (with code coverage)
- ESLint (with HTML report)
- Code Duplicity (with git integration and html report)
- Documentation with Typedoc
Run npm run start to execute the code.
This command will first build the project using npm run build (see below).
Then, the the generated code will be executed as node dist/week-4-tdd-starter.js.
Note: The default Entry point for project is set to index.ts and can be modified in package.json.
Run npm run build to build the project with Webpack.
The build artifacts will be stored in the dist/ directory.
To execute the code, run node dist/week-4-tdd-starter.js.
Note: The default Entry point for project is set to index.ts and can be modified in package.json.
Run npm run build:debug to build the project with Webpack.
The build artifacts will be stored in the build/ directory.
This command generates an individual .js file for every .ts file in ./src/ along with the source maps, which is helpful for debugging.
To execute the code, run node build/<file-path>.js.
Run npm run build:prod to build the project for production with Webpack.
The build artifacts will be stored in the dist/ directory.
To execute the code, run node dist/week-4-tdd-starter.js.
Note: The default Entry point for project is set to index.ts and can be modified in package.json.
Run npm run test to execute the unit tests via Jest.
Coverage report for the tests is generated automatically.
Additionally, one can use Chai assertions and Sinon mocks for a richer testing ecosystem.
Report location: reports/coverage/lcov-report.
Run npm run build:analysis to generate Webpack bundle Analysis report using Webpack Bundle Analyzer.
Report location: reports/build-analysis.
Run npm run lint to generate a json and html lint report using ESLint and ESLint-Html-Reporter.
Report location: reports/eslint-report
Run npm run lint:fix to auto-fix certain lint errors.
Run npm run jscpd to generate a json and html duplicity report using JSCPD-Html-report.
Report location: reports/code-duplicity
Run npm run docs to generate documentation for the code using Typedoc.
Information for Params and Returns of functions is generated automatically.
Use JSDoc comment format to provide description for functions:
/**
* This is the description for my method
* */ Report location: documentation
Run npm run zip to create a zip file from the contents of src/ called "submission.zip".
This file should be submitted to gradescope.