-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: drop support for Node.js 14 * build: use yarn 3.4.1 * build: make scripts use yarn * docs: add CONTRIBUTING.md * build: enable corepack in ci * build: bump to Node.js 18 and Yarn 4
- Loading branch information
1 parent
b8f121a
commit 557cd41
Showing
7 changed files
with
7,814 additions
and
5,366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
This page contains several pointers for people that want to contribute to this project. | ||
|
||
## Setup development environment | ||
|
||
Start by cloning this repository. | ||
|
||
```bash | ||
$ git clone [email protected]:LinkedSoftwareDependencies/Components-Generator.js.git | ||
``` | ||
|
||
This project requires [Node.js](https://nodejs.org/en/) `>=18.12` and [Yarn](https://yarnpkg.com/) `>=4` to be installed. Preferable, use the Yarn version provided and managed by Node.js' integrated [CorePack](https://yarnpkg.com/corepack) by running `corepack enable`. | ||
|
||
After that, you can install the project by running `yarn install`. This will automatically also run `yarn build`, which you can run again at any time to compile any changed code. | ||
|
||
## Continuous integration | ||
|
||
Given the critical nature of this project, we require a full (100%) test coverage. | ||
Additionally, we have configured strict linting rules. | ||
|
||
These checks are run automatically upon each commit, and via continuous integration. | ||
|
||
You can run them manually as follows: | ||
```bash | ||
$ yarn test | ||
$ yarn lint | ||
``` | ||
|
||
## Code architecture | ||
|
||
The architecture is decomposed into 5 main packages: | ||
|
||
1. [`config`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js/tree/master/lib/config): Loading a generator from configuration files. | ||
2. [`generate`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js/tree/master/lib/generate): Generating component files by parsing type information from TypeScript and serializing it into JSON-LD. | ||
3. [`parse`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js/tree/master/lib/parse): Parsing components from TypeScript. | ||
4. [`resolution`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js/tree/master/lib/resolution): Resolution of dependencies. | ||
5. [`serialize`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js/tree/master/lib/serialize): Serializing components to JSON-LD. | ||
6. [`util`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js/tree/master/lib/util): Various utilities. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
test_files/ | ||
output/ | ||
.eslintcache | ||
.yarn/ | ||
|
||
**/lib/**/*.js | ||
**/lib/**/*.js.map | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,15 @@ | |
"version": "3.1.2", | ||
"description": "Automatically generate component files from TypeScript classes for the Components.js dependency injection framework", | ||
"main": "index.js", | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">=14" | ||
"node": ">=18.12" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"test": "jest ${1}", | ||
"test": "jest", | ||
"lint": "eslint . --ext .ts --cache", | ||
"prepare": "husky install && npm run build", | ||
"postinstall": "husky install && yarn build", | ||
"version": "manual-git-changelog onversion" | ||
}, | ||
"jest": { | ||
|
@@ -54,9 +55,7 @@ | |
}, | ||
"homepage": "https://github.com/LinkedSoftwareDependencies/Components-Generator.js#readme", | ||
"license": "MIT", | ||
"bin": { | ||
"componentsjs-generator": "bin/componentsjs-generator.js" | ||
}, | ||
"bin": "bin/componentsjs-generator.js", | ||
"files": [ | ||
"bin/**/*.d.ts", | ||
"bin/**/*.js", | ||
|
Oops, something went wrong.