Skip to content

Commit

Permalink
feat: make use of lerna nx (#1462)
Browse files Browse the repository at this point in the history
* feat: make use of lerna nx

Signed-off-by: Steffen van den Driest <[email protected]>

* chore: added project.json and corrected scripts

Signed-off-by: Steffen van den Driest <[email protected]>

* chore: removed not working test scripts

Signed-off-by: Steffen van den Driest <[email protected]>

* Update packages/open-scd/project.json

* Update packages/plugins/project.json

---------

Signed-off-by: Steffen van den Driest <[email protected]>
Co-authored-by: Juan Munoz <[email protected]>
Co-authored-by: Pascal Wilbrink <[email protected]>
  • Loading branch information
3 people authored Mar 19, 2024
1 parent a6c5d3e commit 94d68d7
Show file tree
Hide file tree
Showing 14 changed files with 16,072 additions and 7,238 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,22 @@ jobs:
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: '18.x'

- name: Install and build Core
run: |
cd packages/core
npm clean-install
npm run-script build
npm run-script doc
node-version: "18.x"

- name: Install and Build OpenSCD
run: |
cd packages/open-scd
npm clean-install
npm run-script build
npm run-script doc
- name: Copy Core Docs to OpenSCD
run: |
cp -R packages/core/doc packages/open-scd/build/core-doc
- name: Copy Plugin Docs to OpenSCD
run: |
cp -R packages/plugins/doc packages/open-scd/build/plugin-doc
- name: Deploy
uses: JamesIves/[email protected]
with:
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,7 @@ jobs:
with:
node-version: "18.x"

- name: Install and build Core
run: |
cd packages/core
npm clean-install
npm run-script build
- name: Install and Build OpenSCD
run: |
cd packages/open-scd
npm clean-install
npm run-script build
- name: Install and Bundle Plugins
run: |
cd packages/plugins
npm clean-install
npm run-script test
npm run-script bundle
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,5 @@ jobs:

- name: Install and Test
run: |
cd packages/open-scd
npm clean-install
npm run-script test
- name: Install and Test
run: |
cd packages/plugins
npm clean-install
npm run-script test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ node_modules/
/.tsbuildinfo
/.rollup.cache

# lerna
/lerna-debug.log
6 changes: 6 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent",
"packages": ["packages/*"],
"useNx": true
}
25 changes: 25 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build"]
}
}
},
"targetDefaults": {
"lint": {
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/.eslintignore"
]
},
"test": {
"inputs": ["default", "^default"]
},
"build": {
"dependsOn": ["clean", "^clean", "^build"]
}
}
}
Loading

0 comments on commit 94d68d7

Please sign in to comment.