Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
c-client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.8.2.
Show more breadcrumbs
concordant
Software
c-client
Commits
b7540377
Commit
b7540377
authored
4 years ago
by
Florent Coriat
Browse files
Options
Downloads
Patches
Plain Diff
README: add build and usage instructions
parent
c2fa10e6
No related branches found
No related tags found
1 merge request
!12
Resolve "Deliver NPM package to GitLab registry"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+60
-5
60 additions, 5 deletions
README.md
with
60 additions
and
5 deletions
README.md
+
60
−
5
View file @
b7540377
...
...
@@ -14,12 +14,67 @@ The code of the version v0 is in the directory *src/*.
The pseudo code of the version v1 is in the directory
*pseudo-code-v1/*
.
## Usage
This library is delivered as an NPM package and a Maven in
[
Gitlab Packages
](
https://gitlab.inria.fr/concordant/software/c-client/-/packages
)
(as a private registry).
### NPM install
Get a deploy token or personal access token from Gitlab,
with at least the read_package_registry scope.
Then setup authentication:
```
shell
$
npm config
set
@concordant:registry
"https://gitlab.inria.fr/api/v4/packages/npm/"
$
npm config
set
'//gitlab.inria.fr/api/v4/packages/npm/:_authToken'
"<deployOrPersonalToken>"
```
Install the package:
```
shell
$
npm i @concordant/c-client
```
And use it:
```
typescript
import
*
from
@
concordant
/c-client;
```
## Build project
The building is managed through the use of Gradle.
The build is managed by Gradle.
Kotlin sources (code and tests) are compiled to JVM Bytecode
and to Javascript as a Node.js package.
`gradle assemble`
:
-
compiles code and tests to JVM Bytecode;
-
compiles code and tests to Javascript (Node.js package);
-
creates a TypeScript interface
-
assembles a NPM package
`gradle allTests`
:
-
runs JVM test suite;
-
runs Node.js test suite in a server like manner;
-
a report containing all tests results can be found in the file
`build/reports/tests/allTests/index.html`
.
`gradle build`
:
-
compiles code and test.
`gradle pack`
:
-
pack the NPM package
`gradle publish`
:
-
publish the NPM package to the Gitlab Packages registry
(requires authentication ; better use it via CI pipelines).
`gradle dokkaHtml`
:
-
creates the documentation from code comments;
-
documentation is accessible at
`build/dokka/html/crdtlib/index.html`
.
See
`gradle tasks`
for variants other than HTML.
Build depends on the C-CRDTLib Maven registry package see
[
here
](
https://gitlab.inria.fr/concordant/software/c-crdtlib/-/blob/master/README.md
)
how to install it.
`gradle clean`
:
-
cleans the project.
*gradle build*
: compiles code.
`gradle tasks`
:
-
show all available tasks with descriptions.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment