From fc77348bebe3fd81966a04bef4353e311ca6f35e Mon Sep 17 00:00:00 2001 From: Raed <abdennadher.raed@gmail.com> Date: Mon, 18 Nov 2019 13:41:52 +0100 Subject: [PATCH] Add project's CI pipeline configuration --- .gitlab-ci.yml | 22 +++++++++++++++++++++ documentation/doc.md | 47 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 documentation/doc.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5c88ec7 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,22 @@ +image: node:latest + +stages: + - test + - doc + +before_script: + - npm install + +test: + stage: test + script: + - npm test + +doc: + stage: doc + artifacts: + paths: + - documentation/doc.md + script: + # Build documentation in md file that will be available from gitlab interface + - npm run docs:md diff --git a/documentation/doc.md b/documentation/doc.md new file mode 100644 index 0000000..c636097 --- /dev/null +++ b/documentation/doc.md @@ -0,0 +1,47 @@ +<!-- Generated by documentation.js. Update this documentation by updating the source code. --> + +### Table of Contents + +- [Compute][1] +- [add][2] + - [Parameters][3] +- [sub][4] + - [Parameters][5] + +## Compute + +Object containing the arithmetic operations + +## add + +Calculate the sum of two numbers + +### Parameters + +- `a` **[Number][6]** First member of the operation +- `b` **[Number][6]** Second member of the operation + +Returns **[Number][6]** Sum of a and b + +## sub + +Calculate the difference between two numbers + +### Parameters + +- `a` **[Number][6]** First member of the operation +- `b` **[Number][6]** Second member of the operation + +Returns **[Number][6]** Difference between a and b (a - b) + +[1]: #compute + +[2]: #add + +[3]: #parameters + +[4]: #sub + +[5]: #parameters-1 + +[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number -- GitLab