Skip to content

Commit 76ce0ee

Browse files
authored
build(all): switch to NPM workspace and Lerna-Lite
1 parent 93d5df5 commit 76ce0ee

8 files changed

Lines changed: 26 additions & 16 deletions

File tree

.github/workflows/node.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node: [ '16', '18' ]
13+
node: [ '20', '22' ]
1414
name: Node ${{ matrix.node }} test
1515
steps:
1616
- uses: actions/checkout@v2

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This may take some time... relax... have some coffee.
5151

5252
If the tests ran successfully then changes can be made to any package. See the 'packages' directory.
5353

54-
NOTE: All packages and dependencies have been linked together by Lerna. No other magic is required.
54+
NOTE: All packages and dependencies have been linked together by NPM and Lerna-Lite. No other magic is required.
5555

5656
If you intend to contribute changes back to JSCAD then please follow these guides.
5757
- follow the [JavaScript Standard Style](https://standardjs.com/index.html) when making changes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ There are many ways to use JSCAD:
66

77
An [online version](https://openjscad.xyz/), [self hostable web based ui](./packages/web), as [CLI](./packages/cli) (command-line interface) for server-side computations with Node.js, as well as an experimental [desktop app](./packages/desktop) or [individual Node.js packages](./packages/README.md)!!
88

9-
This repository is a [monorepo](https://medium.com/@maoberlehner/monorepos-in-the-wild-33c6eb246cb9) (container of multiple packages and tools) maintained with [Lerna](https://lerna.js.org/)
9+
This repository is a [monorepo](https://medium.com/@maoberlehner/monorepos-in-the-wild-33c6eb246cb9) (container of multiple packages and tools) maintained with [Lerna-Lite](https://github.com/lerna-lite/lerna-lite/)
1010

1111
[![Build Status](https://travis-ci.org/jscad/OpenJSCAD.org.svg?branch=master)](https://travis-ci.org/jscad/OpenJSCAD.org)
1212
[![Stability](https://img.shields.io/badge/stability-stable-success)](https://github.com/emersion/stability-badges#stable)
1313
[![All Dependencies](https://img.shields.io/librariesio/github/jscad/OpenJSCAD.org)](https://github.com/jscad/OpenJSCAD.org)
1414

1515
[![User Group](https://img.shields.io/badge/maintained%20by-user%20group-blue)](https://openjscad.nodebb.com/)
16-
[![Lerna](https://img.shields.io/badge/maintained%20with-lerna-blue)](https://lerna.js.org/)
16+
[![Lerna--Lite](https://img.shields.io/badge/maintained%20with-lerna--lite-e137ff)](https://github.com/lerna-lite/lerna-lite)
1717
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-blue)](https://standardjs.com)
1818

1919
[![Backers](https://img.shields.io/opencollective/backers/openjscad)](https://opencollective.com/openjscad)

package.json

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@
66
"repository": "https://github.com/jscad/OpenJSCAD.org",
77
"scripts": {
88
"docs": "jsdoc --configure jsdoc.json",
9-
"coverage": "npm run bootstrap && lerna run --concurrency 1 --stream coverage",
10-
"test": "npm run bootstrap && lerna run --stream test",
9+
"coverage": "lerna run --concurrency 1 --stream coverage",
10+
"postinstall": "lerna run postinstall",
11+
"test": "lerna run --stream test",
1112
"test:tsd": "lerna run test:tsd",
1213
"lint": "standardx 'packages/**/*.js'",
13-
"bootstrap": "lerna bootstrap --hoist nyc --hoist ava --ignore-prepublish --no-ci",
1414
"changed": "lerna changed",
15-
"clean": "lerna clean",
1615
"graph": "lerna list --graph",
1716
"list": "lerna ls",
18-
"cli": "npm run bootstrap && cd ./packages/cli",
19-
"web": "npm run bootstrap && cd ./packages/web && npm run dev",
20-
"desktop": "npm run bootstrap && cd ./packages/desktop && npm run dev",
17+
"web": "cd ./packages/web && npm run dev",
2118
"preversion": "npm run test && npm run docs",
2219
"publish": "lerna publish --include-merged-tags --no-private --no-push --conventional-commits",
2320
"publish-dryrun": "lerna version --include-merged-tags --no-private --no-push --conventional-commits"
@@ -38,12 +35,25 @@
3835
],
3936
"license": "MIT",
4037
"dependencies": {},
38+
"workspaces": [
39+
"packages/cli",
40+
"packages/core",
41+
"packages/examples",
42+
"packages/io/*",
43+
"packages/modeling",
44+
"packages/utils/*",
45+
"packages/web"
46+
],
4147
"devDependencies": {
4248
"@jscad/sample-files": "github:jscad/sample-files#master",
4349
"ava": "3.15.0",
4450
"docdash": "1.2.0",
4551
"jsdoc": "3.6.10",
46-
"lerna": "4.0.0",
52+
"@lerna-lite/changed": "^2.7.2",
53+
"@lerna-lite/cli": "^2.7.2",
54+
"@lerna-lite/publish": "^2.7.2",
55+
"@lerna-lite/run": "^2.7.2",
56+
"@lerna-lite/version": "^2.7.2",
4757
"nyc": "15.1.0",
4858
"standardx": "7.0.0",
4959
"tsd": "0.19.1"

packages/cli/cli.js

100644100755
File mode changed.

packages/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"scripts": {
1010
"build": "browserify src/index.js -o dist/jscad-web.min.js -g uglifyify --standalone jscadWeb",
1111
"dev": "budo demo.js --port=8081 --css ./css/demo.css --live -- -b",
12-
"postinstall": "node postInstall.js && node -e \"console.log('\\u001b[35m\\u001b[1mLove JSCAD? You can now donate to our open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[34mhttps://opencollective.com/openjscad/donate\\u001b[0m')\"",
12+
"postinstall": "node postInstall.js",
1313
"test": "ava 'src/**/*.test.js' --verbose --timeout 2m",
1414
"version": "npm run build && git add dist"
1515
},

packages/web/postInstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// this copies the examples folder from the @jscad/examples repository locally
22
const path = require('path')
3-
const examplesSrc = path.resolve('./node_modules/@jscad/examples')
3+
const examplesSrc = path.resolve('../examples')
44
const copydir = require('copy-dir')
55
const fs = require('fs')
66
const DocBlock = require('docblock')

packages/web/src/most-gestures/gestures.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ test.cb('zooms (from mousewheel event) direct element', (t) => {
272272
})
273273
})
274274

275-
test.cb('zooms (from pinch)', (t) => {
275+
test.skip('zooms (from pinch)', (t) => {
276276
const zooms = pointerGestures(t.context.baseStreams).zooms
277277

278278
const div = t.context.div
@@ -296,7 +296,7 @@ test.cb('zooms (from pinch)', (t) => {
296296
})
297297
})
298298

299-
test.cb('zooms (from pinch) direct element', (t) => {
299+
test.skip('zooms (from pinch) direct element', (t) => {
300300
const div = t.context.div
301301
const zooms = pointerGestures(div).zooms
302302

0 commit comments

Comments
 (0)