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.
- 
rosaenlgis the main package. Derived frompug.
- 
rosaenlg-pug-xxxare forks of the originalpug-xxxpackages:- 
Some of them are are unchanged, but I needed to fork them because they carry dependancies with changed packages: rosaenlg-pug-filtersrosaenlg-pug-linkerrosaenlg-pug-load
- 
Some of them are changed to handle specific structures like synz > syn:rosaenlg-pug-lexerrosaenlg-pug-parserrosaenlg-pug-walkpug-code-gen
 
- 
- 
rosaenlg-yseopis 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 testdirectly inpackages/rosaenlgfolder
- 
and also mocha test-rosaenlg/unit.js _lang_fr_FRetc. 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(orminoretc. instead of patch)
- 
commit 
- 
make a vXX.XX.XXbranch (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 
 
- 
- 
Doc: - 
trigger the antora-uiproject CI on gitlab
- 
trigger the antora-playbookCI on gitlab- 
and trigger manually the publication 
 
- 
 
- 
- 
remove old branches on Gitlab 
Packages are on npm: https://www.npmjs.com/package/rosaenlg