Explanation of usage of scripts in package.json
.
Build this project in dist
folder.
Fix betterdocs template for jsdoc and make it work.
Generate documentation with jsdoc.
Start a sample integration vue dev server.
npm warn reify The "linked" install strategy is EXPERIMENTAL and may contain bugs.
npm error Cannot read properties of undefined (reading 'path')
You have to configure npm with:
npm config set install-strategy hoisted
Run eslint check on the project.
Apply default fix for eslint in project.
Generate report of lint issues for sonar.
To use in development, to see current lint errors with auto-refresh.
Run all the unit tests.
Generate coverage report of the unit tests.
This is the default directory structure we use for this project:
leto-modelizer-plugin-core
├ cypress ⇨ Contains all the cypress related files
│ ├ e2e ⇨ Contains all the e2e tests
│ └ support ⇨ Contains all support files for e2e tests
│ └ step_definitions ⇨ Contains all step definitions for e2e tests
├ demo ⇨ Contains a vue demo application
├ dist ⇨ Contains the built application
├ docs ⇨ Contains all files generated by esdoc
├ public ⇨ Contains all public files, like favicon
├ reports ⇨ Contains all the report files for sonar
├ guides ⇨ Contains all the guides
├ └ docs ⇨ Contains all plugin-core documentation
│ └ migrations ⇨ Contains all migration guides
│ └ svg ⇨ Contains the guide to build a component svg
├ src ⇨ Contains all files for modeling tools
│ ├ assets ⇨ Contains all the assets
│ ├ draw ⇨ Contains all files related to the Class that draws components in a graphical representation
│ ├ error ⇨ Contains all files related to the Class that represents a parsing error
│ ├ metadata ⇨ Contains all files related to the Class that represents the metadata of a specific implementation
│ ├ models ⇨ Contains all files related to the Class that represents default plugin structure
│ ├ parser ⇨ Contains the Class used for parsing
│ └ render ⇨ Contains the Class that compile components to data
└ tests ⇨ Contains all files related to the tests
We use Semantic Versioning as guideline for the version management.
Steps to release:
- Checkout a branch
release/vX.Y.Z
from the latestdev
. - Increase your version number in
package.json
,package-lock.json
andchangelog.md
. - Verify the content of the
changelog.md
. - Build the project
- Commit your modification (with the
dist
content) with this commit's nameRelease version X.Y.Z
. - Create a pull request on github to this branch in
dev
. - After the previous PR is merged, create a pull request on github to
dev
inmain
. - After the previous PR is merged, tag the
main
branch withvX.Y.Z
- After the tag is push, make the release on the tag in GitHub
The default branch is main
, we can't commit on it and we can only make a pull request to add some code.
Release tags are only on the main
branch.
There is the branch naming policy: [BRANCH_TYPE]/[BRANCH_NAME]
BRANCH_TYPE
is a prefix to describe the purpose of the branch, accepted prefix are:feature
, used for feature developmentbugfix
, used for bug fiximprovement
, used for refactolibrary
, used for updating libraryprerelease
, used for preparing the branch for the releaserelease
, used for releasing projecthotfix
, used for applying a hotfix on main
BRANCH_NAME
is managed by this regex:[a-z0-9_-]
(_
is used as space character).
Examples:
# BAD
add_some_test
# GOOD
improvement/unit_test
# BAD
feature/adding-some-feature
# GOOD
feature/adding_some_feature