Skip to content

Commit

Permalink
chore(*): improve build setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzofox3 committed Mar 13, 2024
1 parent 941a3a8 commit e32fc3f
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 67 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
with:
version: 8
run_install: true
# - name: Build
# run: pnpm run build
- name: Build
run: pnpm --filter @cofn/* --stream build
- name: Install browsers
run: pnpm exec playwright install --with-deps
- name: Test
run: pnpm t --recursive --if-present
run: pnpm t --recursive --stream --if-present


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
apps/**/dist
.DS_Store
coverage
dist
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"singleQuote": true
},
"keywords": [],
"scripts": {
"test": "pnpm test --recursive --if-present --stream",
"build": "pnpm --filter @cofn/* --stream build",
"size": "pnpm --filter @cofn/* --stream size"
},
"author": "",
"license": "ISC",
"devDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/controllers/dist/cofn-controllers.min.js

This file was deleted.

17 changes: 7 additions & 10 deletions packages/controllers/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
{
"name": "@cofn/controllers",
"version": "1.0.0",
"version": "0.0.1",
"description": "",
"type": "module",
"types": "./src/index.d.ts",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./src/index.d.ts",
"default": "./src/index.js"
"types": "./dist/index.d.ts",
"default": "./dist/cofn-controller.js"
}
},
"./cdn": {
"default": "./cofn-controllers.min.js"
}
},
"prettier": {
"singleQuote": true
},
"files": ["dist", "src"],
"files": ["dist"],
"scripts": {
"dev": "vite",
"test": "node test/run-ci.js",
"build": "rollup -c rollup.config.js > ./dist/cofn-controllers.min.js",
"size": "rollup -c rollup.config.js | brotli | wc -c"
"build": "mkdir -p dist && rollup src/index.js > dist/cofn-controller.js && cp src/index.d.ts dist",
"size": "rollup -p @rollup/plugin-terser src/index.js | gzip | wc -c"
},
"author": "Laurent RENARD",
"peerDependencies": {
Expand Down
5 changes: 0 additions & 5 deletions packages/controllers/rollup.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/dist/cofn-core.min.js

This file was deleted.

20 changes: 9 additions & 11 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
{
"name": "@cofn/core",
"version": "1.0.0",
"description": "",
"version": "0.0.1",
"description": "small library to turn generator function into a web component",
"type": "module",
"types": "./src/index.d.ts",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./src/index.d.ts",
"default": "./src/index.js"
"types": "./dist/index.d.ts",
"default": "./dist/cofn-core.js"
}
},
"./cdn": {
"default": "./cofn-core.min.js"
}
},
"prettier": {
"singleQuote": true
},
"files": ["dist", "src"],
"files": ["dist"],
"scripts": {
"dev": "vite",
"test": "node test/run-ci.js",
"build": "rollup -c rollup.config.js > ./dist/cofn-core.min.js",
"size": "rollup -c rollup.config.js | brotli | wc -c"
"build": "mkdir -p dist && rollup src/index.js > dist/cofn-core.js && cp src/index.d.ts dist",
"size": "rollup -p @rollup/plugin-terser src/index.js | gzip | wc -c"
},
"author": "Laurent RENARD",
"keywords": ["webcomponent", "web component", "ui", "generator", "coroutine"],
"devDependencies": {
"@cofn/test-lib": "workspace:*"
}
Expand Down
5 changes: 0 additions & 5 deletions packages/core/rollup.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/di/dist/cofn-di.min.js

This file was deleted.

11 changes: 7 additions & 4 deletions packages/di/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@cofn/di",
"version": "1.0.0",
"version": "0.0.1",
"description": "DOM as DI container",
"type": "module",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"default": "./src/index.js"
"default": "./dist/cofn-di.js"
}
}
},
"scripts": {
"dev": "vite",
"test": "node test/run-ci.js",
"build": "rollup -c rollup.config.js > ./dist/cofn-di.min.js",
"size": "rollup -c rollup.config.js | brotli | wc -c"
"build": "mkdir -p dist && rollup src/index.js > dist/cofn-di.js",
"size": "rollup -p @rollup/plugin-terser src/index.js | gzip | wc -c"
},
"author": "Laurent RENARD",
"devDependencies": {
Expand All @@ -28,5 +28,8 @@
"web",
"ui"
],
"files": [
"dist"
],
"license": "MIT"
}
5 changes: 0 additions & 5 deletions packages/di/rollup.config.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/view/dist/cofn-view.min.js

This file was deleted.

17 changes: 7 additions & 10 deletions packages/view/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
{
"name": "@cofn/view",
"version": "1.0.0",
"version": "0.0.1",
"description": "",
"type": "module",
"types": "./src/index.d.ts",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./src/index.d.ts",
"default": "./src/index.js"
"types": "./dist/index.d.ts",
"default": "./dist/cofn-view.js"
}
},
"./cdn": {
"default": "./cofn-view.min.js"
}
},
"prettier": {
"singleQuote": true
},
"files": ["dist", "src"],
"files": ["dist"],
"scripts": {
"dev": "vite",
"test": "node test/run-ci.js",
"build": "rollup -c rollup.config.js > ./dist/cofn-view.min.js",
"size": "rollup -c rollup.config.js | brotli | wc -c"
"build": "mkdir -p dist && rollup src/index.js > dist/cofn-view.js && cp src/index.d.ts dist",
"size": "rollup -p @rollup/plugin-terser src/index.js | gzip | wc -c"
},
"author": "Laurent RENARD",
"peerDependencies": {
Expand Down
5 changes: 0 additions & 5 deletions packages/view/rollup.config.js

This file was deleted.

10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

A set of small libraries to build your UI framework converting coroutines into web components

* [core](./packages/core): define web components from a coroutine (574 bytes)
* [view](./packages/view): use declarative template rather than imperative rendering logic (1475 bytes)
* [controllers](./packages/controllers): manage state updates from a controller function (271 bytes)
* [di](./packages/di): define provider elements an inject what they create into children elements (305 bytes)
* [core](./packages/core): define web components from a coroutine (666 bytes)
* [view](./packages/view): use declarative template rather than imperative rendering logic (1645 bytes)
* [controllers](./packages/controllers): manage state updates from a controller function (313 bytes)
* [di](./packages/di): define provider elements an inject what they create into children elements (362 bytes)

Sizes are in bytes (minified and using brotli compression algorithm)
Sizes are in bytes (minified and gzipped)

0 comments on commit e32fc3f

Please sign in to comment.