aidebuild
Builds multi-language compilation packages and related documentation.
Description
This packages provides utilities to develop and publish modular tools for web based applications.
- It is based on the npmjs package system
Technical choices
The code is expected to be a set of C/C++ and JavaScript source files, and a Python wrapper is available.
As a web service, it implements a local node.js server, and wrap C/C++ code using the node-addon-api, as defined the aideweb package.
The documentation uses markdown syntax and JsDoc tags, with the jsdoc mechanism and the docdash theme. Documentation generation includes source files normalization (i.e., beautifying or uncrustification), multi-language documentation generation and production of images or PDF from LaTeX formula or latex or libreoffice drawing files.
Coding rules
A few simple coding rules allows multi-language development to be smooth and easy.
Notion of factory
When object oriented programming is not necessary, static methods are encapsulated in "factories", i.e., group of functions, accessible via the factory name, e.g., aidesys::regexMatch(string, regex);
in C++ or slugstring.fill(dictionary);
in JavaScript, thus without class object instance.
-
Naming conventions:
- Factory names are all in lower-case.
- Static method names are verbs, in lower-case. Compounded names use the camelCase convention.
- Static methods parameters names are nouns. Compounded parameters names hyphenation use the underscore
_
hyphen, including JSON tuples data names.
-
Parameters type:
- Boolean
bool
, integerint
(oruint
if unsigned),double
(for floating point values) andstring
are the used scalar values (i.e. literals). - Otherwise, parameters are objects, defined via classes.
- Boolean
Notion of Classes
-
For multi-language call, classes better use:
- Parameter-less constructor (which is fine also for internal language use).
- Setters: i.e.,
set(value)
method to set the whole object, andset(name, value)
to set an object parameter. - Getters: i.e.,
get(name)
orgetName()
method to get an object parameter orisName()
to get a boolean value parameter.- The
at(name)
method does not create a default value while theget(name)
may create an entry for this parameter (in coherence with a subscript[]
operator. - The object
size()
orcount()
methods are not prefixed by get in coherence with the main usage.
- The
- Casters: e.g.,
asString()
to get the whole representation as a string (with similar convention for other convention).
-
Naming conventions:
- Class names are nouns, instance names are verbs. Compounded names use the camelCase convention, methods parameters are nouns, using underscore
_
hyphen. - The
toString()
method is prohibited, because of Python wrapping.
- Class names are nouns, instance names are verbs. Compounded names use the camelCase convention, methods parameters are nouns, using underscore
Package repository
- Package files: https://gitlab.inria.fr/line/aide-group/aidebuild
- Package documentation: https://line.gitlabpages.inria.fr/aide-group/aidebuild
- Source files: https://gitlab.inria.fr/line/aide-group/aidebuild/-/tree/master/src
- Saved on softwareherirage.org
- Version
1.1.2
- License
CECILL-C
Installation
User simple installation
npm install git+https://gitlab.inria.fr/line/aide-group/aidebuild.git
Co-developper installation
- See the related documentation
Please refer to the installation guide for installation.
Usage
npm script usage
npm install --quiet : installs all package dependencies and sources.
npm run build: builds the different compiled, documentation and test files.
npm test : runs functional and non-regression tests.
npm run clean: cleans installation files.
Dependencies
- docdash: A clean, responsive documentation template theme for JSDoc 3 inspired by lodash and minami
- js-beautify: beautifier.io for node
- jsdoc: An API documentation generator for JavaScript.
- uglify-js: JavaScript parser, mangler/compressor and beautifier toolkit
Author
- Thierry ViƩville thierry.vieville@inria.fr