We use Visual Studio Code for developing LoopBack and recommend the same to our users.
Install the following extensions:
-
Start the build task (Cmd+Shift+B) to run TypeScript compiler in the background, watching and recompiling files as you change them. Compilation errors will be shown in the VSCode's "PROBLEMS" window.
-
Execute "Run Rest Task" from the Command Palette (Cmd+Shift+P) to re-run the test suite and lint the code for both programming and style errors. Linting errors will be shown in VSCode's "PROBLEMS" window. Failed tests are printed to terminal output only.
-
Open a new terminal window/tab and start the continous build process via
npm run build:watch
. It will run TypeScript compiler in watch mode, recompiling files as you change them. Any compilation errors will be printed to the terminal. -
In your main terminal window/tab, run
npm run test:dev
to re-run the test suite and lint the code for both programming and style errors. You should run this command manually whenever you have new changes to test. Test failures and linter errors will be printed to the terminal.
A good commit message should describe what changed and why.
Our commit messages are formatted according to Conventional Commits, we use commitlint to verify and enforce this convention. These rules lead to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate change logs when publishing new versions.
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, an optional scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The type must be one of the following:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing or correcting existing tests
- build: Changes that affect the build system or external dependencies
- ci: Changes to our CI configuration files and scripts
- chore: Changes to the auxiliary tools and libraries such as documentation generation
- revert: Reverts a previous commit
The scope must be a list of one or more modules contained in this repo.
The subject contains succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no dot (.) at the end
The body provides more details, it should include the motivation for the change and contrast this with previous behavior.
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes"a
Paragraphs or bullet points are ok (must not exceed 100 characters per line). Typically a hyphen or asterisk is used for the bullet, followed by a single space, with blank lines in between.
Its mandatory to add references to JIRA ticket you are resolving as part of the commit.
The footer should contain any information about Breaking Changes introduced by this commit.
This section must start with the upper case text BREAKING CHANGE
followed by a
colon (:
) and a space (``). A description must be provided, describing what
has changed and how to migrate from older versions.
This repository has commitizen support enabled. Commitizen can help you generate your commit messages automatically.
And to use it, simply call git commit
. The tool will help
you generate a commit message that follows the above guidelines.