@artisan-commerce/auth v0.8.19
Node Library Boilerplate
This boilerplate was made to facilitate the creation of server-side or client-side node application. It comes with a powerful webpack & typescript configuration out of the box.
New Project Configuration steps:
- Change your project name and description in package.json.
- Change default constants value in
src/config/constants.ts
. - In .env.ENV change the ENV variable to the environment you are currently developing for.
- If you want to support the require syntax instead of import, change the module field in the tsconfig.json file to commonjs
- Update the readme.md file
File Structure
General representation of the building pieces
Available Scripts
In the project directory, you can run:
yarn start
Runs the app in the development mode.
yarn dev
Alias of yarn start, for some developers convinience.
yarn test
Launches the test runner in the interactive watch mode. See the section about running tests for more information.
yarn test:all
Run every test in a none interactive mode and create a coverage report.
This command is perfect for pre push hooks.
yarn test:ci
Simulates a CI environment before running all tests
yarn check-types
Will attempt to compile the whole project including test files that are normally excluded.
This command is perfect for verifing the project's integrity before commiting changes
yarn lint
Runs the configured linter to check for any lints in your code before deploying, developers must clean any lint before commiting or commints will not go through.
yarn prettier
Configure prettier, the files that should be included and excluded. This command should not be used by itself.
yarn format
Uses the prettier configuration to run prettier in write mode to all selected files. It will fix all format errors.
yarn check-format
Uses the prettier configuration to run prettier in read mode to all selected files. If any is bad formated, it will display a warning.
yarn build
Builds the app for production to the build
folder.
It correctly bundles the project in production mode and optimizes the build for the best performance.
yarn validate
It validates the integrity of the project by running many of the static testing, unit/integration testing and e2e testing commands.
yarn validate:ci
Run a different series of commands than validate, the selected commands that are run are the ones appropiate to be run on CI. This command is not met to be run locally.
Publishing your library
To publish your library you will only need to run yarn publish
. We will take care of the rest. Things like creating a new build of your code will be done automatically. Just take into consideration to bump the project version following the semver methodology.
Previewing your library
When you are in the middle of the development of your new library, you find your self needing to test the current features you are developing. We recommend using npm link
and a separte project for those purposes.
If you want to test your app on a real app, then we recommend using yarn publish
. This method should be avoided during development.
Hope you are enjoying this boilerplate
We are happy to add/update any additional request you may have. For intering ideas, please submit a new issue and we will take care of it.
Happy coding! 🚀
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago