fix: build components with dependencies (#1132)
* fix: build components with dependencies * fix: exclude @standardnotes/components-meta * chore: update yarn.lock * fix: remove compile script from VERSION.sh * fix: skip lint script * fix: components script names * fix: build script for components * fix: run tsc within build script Co-authored-by: Johnny Almonte <johnny243@users.noreply.github.com>
This commit is contained in:
8
.github/workflows/pr.components.yml
vendored
8
.github/workflows/pr.components.yml
vendored
@@ -21,13 +21,13 @@ jobs:
|
||||
run: yarn install
|
||||
|
||||
- name: Lint components
|
||||
run: yarn components:lint
|
||||
run: yarn lint
|
||||
working-directory: packages/components
|
||||
- name: Compile components
|
||||
run: yarn components:compile
|
||||
- name: Build components
|
||||
run: yarn build
|
||||
working-directory: packages/components
|
||||
- name: Test components
|
||||
run: yarn components:test
|
||||
run: yarn test
|
||||
working-directory: packages/components
|
||||
|
||||
- name: Lint all
|
||||
|
||||
15
package.json
15
package.json
@@ -13,14 +13,15 @@
|
||||
"node": ">=12.19.0 <17.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "yarn workspaces foreach -pt --parallel --jobs 10 --verbose run lint",
|
||||
"test": "yarn workspaces foreach -pt --parallel --jobs 10 --verbose run test",
|
||||
"lint": "yarn workspaces foreach -pt --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run lint",
|
||||
"test": "yarn workspaces foreach -pt --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run test",
|
||||
"clean": "lerna run clean",
|
||||
"build:all": "yarn workspaces foreach -pt --verbose run build",
|
||||
"build:web": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/web run build",
|
||||
"build:desktop": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/desktop run build",
|
||||
"build:mobile": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/mobile run build",
|
||||
"build:web-server": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/web-server run build",
|
||||
"build:all": "yarn workspaces foreach -pt --verbose --exclude @standardnotes/components-meta run build",
|
||||
"build:components": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/components-meta run build",
|
||||
"build:web": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/web --exclude @standardnotes/components-meta run build",
|
||||
"build:desktop": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/desktop --exclude @standardnotes/components-meta run build",
|
||||
"build:mobile": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/mobile --exclude @standardnotes/components-meta run build",
|
||||
"build:web-server": "yarn workspaces foreach -pt --verbose -R --from @standardnotes/web-server --exclude @standardnotes/components-meta run build",
|
||||
"start:server:web": "lerna run start --scope=@standardnotes/web-server",
|
||||
"start:server:web:localhost": "lerna run start:no-binding --scope=@standardnotes/web-server",
|
||||
"prepare": "husky install",
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --project tsconfig.json",
|
||||
"components:clean": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:clean",
|
||||
"components:lint": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:lint",
|
||||
"components:test": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:test",
|
||||
"components:compile": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:compile",
|
||||
"clean": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:clean",
|
||||
"lint": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:lint",
|
||||
"test": "yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:test",
|
||||
"build": "tsc --project tsconfig.json && yarn workspaces foreach --parallel --jobs 10 --verbose --exclude @standardnotes/components-meta run components:compile",
|
||||
"package": "node scripts/package.mjs",
|
||||
"version": "./scripts/VERSION.sh"
|
||||
},
|
||||
@@ -22,6 +21,7 @@
|
||||
"@standardnotes/deterministic-zip": "^1.2.0",
|
||||
"@standardnotes/eslint-config-extensions": "^1.0.4",
|
||||
"@standardnotes/features": "^1.45.1",
|
||||
"@standardnotes/styles": "workspace:*",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"mini-css-extract-plugin": "^2.6.0",
|
||||
"minimatch": "^5.1.0",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo 'Compiling components from' $(pwd)
|
||||
echo 'Building components from' $(pwd)
|
||||
|
||||
yarn components:clean && yarn components:compile
|
||||
yarn clean && yarn build
|
||||
|
||||
echo "Packaging component assets and zips..."
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"scripts": {
|
||||
"start": "http-server . --cors -p8001 & webpack --progress --config webpack.dev.js",
|
||||
"components:compile": "webpack --config webpack.prod.js",
|
||||
"skip:components:lint": "eslint src --ext .js",
|
||||
"skip:components:lint": "eslint ./src --ext .js",
|
||||
"components:lint:fix": "yarn lint --fix",
|
||||
"components:clean": "rm -rf ./vendor"
|
||||
},
|
||||
|
||||
@@ -5059,6 +5059,7 @@ __metadata:
|
||||
"@standardnotes/deterministic-zip": ^1.2.0
|
||||
"@standardnotes/eslint-config-extensions": ^1.0.4
|
||||
"@standardnotes/features": ^1.45.1
|
||||
"@standardnotes/styles": "workspace:*"
|
||||
copy-webpack-plugin: ^11.0.0
|
||||
mini-css-extract-plugin: ^2.6.0
|
||||
minimatch: ^5.1.0
|
||||
|
||||
Reference in New Issue
Block a user