0.4.3 • Published 5 years ago

@dannyfranca/typescript-boilerplate v0.4.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Getting Started

  • Clone repository
git clone https://github.com/dannyfranca/typescript-boilerplate.git {{project_name}}
  • Install dependencies
cd {{project_name}}
yarn

Warnings

  • Experimental environment. Could change many times between versions, at least until v1.0 arrives.
  • If you don't want to use yarn, change yarn run for npm run in package.json commands and .lintstagedrc

Libs

  • Compiler - TypeScript
  • Linting - TypeScript ESLint
  • Code Formatter - Prettier
  • Bundler - Parcel JS
  • E2E/Unit/CI Suite - Cypress
  • Coverage Reports - Istanbul
  • Continuous Integration - CircleCI / TravisCI
  • Code Coverage - Codecov
  • Git Hooks - Husky + lint-staged

Usage

Start writing in src folder. modify any project files that fits you needs.

In package.json you have commands to dev, test, compile and build.

NPM Commands

Test

Commands to test you application

  • dev: Start developing with Parcel, Cypress and code coverage, all hot reloading
  • test: If you want to test and generate code coverage reports, use before publish
  • cy:open: Open cypress to test (server must be already running). Useful if you are already developing and just need to make some tests, without reload the whole process
  • cy:run: Run tests in terminal, without UI. Useful the same way cypress:open is
  • coverage: You don't need to run this command, it's for Circle CI perform Continuous Integration after git push

Bundle

Commands to help you bundling you front-end application

  • start: to develop only with Parcel, without tests and code coverage
  • build: Generate production bundles from public to dist folder
  • doc: Generate documentation from comments with Typedoc

Module

Commands to help you compile your TypeScript application to interoperable modules.

  • compile: Compile your TypeScript files in "src" to "lib" folder, with types, making your module interoperable with JavaScript
  • compile:watch: Same as compile, but keeps a process watching and recompiling the changes
  • compile:types: Only emits the type declaration files
  • type-check: Only check the types, good to run between commits to get errors when working with multiple files (If using built in git hooks with Husky, executed automatically before any commit)

Conclusion

Have a Nice Coding! 🤓

License

MIT License

Copyright (c) Danny França contato@dannyfranca.com