Developer documentation
Read this if you want to contribute to RosaeNLG. Alternatively, as the author, this is my own personal doc when I forget how things work.
The repo
On Gitlab:
It is a multi package repo (lerna) which is a fork of Pug @2.0.3 (forked the 06/04/2018). 03/06/2019, @2.0.3 is still the official released version of Pug. 29/09/2019 @2.0.4 has been publshed.
-
rosaenlg
is the main package. Derived frompug
. -
rosaenlg-pug-xxx
are forks of the originalpug-xxx
packages:-
Some of them are are unchanged, but I needed to fork them because they carry dependancies with changed packages:
rosaenlg-pug-filters
rosaenlg-pug-linker
rosaenlg-pug-load
-
Some of them are changed to handle specific structures like
synz > syn
:rosaenlg-pug-lexer
rosaenlg-pug-parser
rosaenlg-pug-walk
pug-code-gen
-
-
rosaenlg-yseop
is an Yseop template generator for RosaeNLG templates, derived fromrosaenlg-pug-code-gen
(itself a fork ofpug-code-gen
). -
and multiple packages that each contain a set of features
Pre instal
-
lerna:
npm install -global lerna
-
yarn:
npm install -global yarn
-
mocha:
npm install --global mocha
Install
-
Linking:
lerna bootstrap
. -
Build the linguistic resources and the typescript files:
lerna run build
. -
Run the tests:
-
lerna run test
-
I also use
npm test
directly inpackages/rosaenlg
folder -
and also
mocha test-rosaenlg/unit.js _lang_fr_FR
etc. to run a specific test
-
Linking a RosaeNLG project with the local copy of the repo
In your project: do not run npm install
as it will download each RosaeNLG package. And do not use npm link
.
-
just install the other dependancies: for instance
npm install junit
-
make a symbolic link in your project to your local copy of RosaeNLG:
mklink /D node_modules\rosaenlg c:\rosaenlg\rosaenlg\packages\rosaenlg
Publishing a new version
this doc is just for me
-
RosaeNLG:
-
check non regression on another project
-
check
changelog.adoc
-
update target version in
antora.yml
-
merge with master
-
local environment:
lerna version --no-push --no-git-tag-version --exact patch
(orminor
etc. instead of patch) -
commit
-
make a
vXX.XX.XX
branch (to be seen by the doc project + to publish) -
push:
git push origin master
-
also push branch:
git push origin vXX.XX.XX
-
Gitlab CI should build
-
npm publish: trigger manually on gitlab once build & tests are ok
-
-
update each sibling project:
-
rosaenlg-java
,docker-cli-rosaenlg
-
update their
antora.yml
-
-
Doc:
-
trigger the
antora-ui
project CI on gitlab -
trigger the
antora-playbook
CI on gitlab-
and trigger manually the publication
-
-
-
remove old branches on Gitlab
Packages are on npm: https://www.npmjs.com/package/rosaenlg