Skip to content

Commit ce11a92

Browse files
authored
Merge pull request #121 from umbraco/feature/turborepo
2 parents abac12d + da1ebf8 commit ce11a92

File tree

7 files changed

+322
-6
lines changed

7 files changed

+322
-6
lines changed

.github/workflows/azure-static-web-apps-delightful-beach-055ecb503.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ jobs:
2828
uses: actions/setup-node@v2
2929
with:
3030
node-version: ${{ matrix.node-version }}
31-
- run: npm ci
31+
cache: 'npm'
32+
- run: npm install
3233
- run: npm run lint
34+
- run: npm run test
3335
- run: npm run build:prod
3436

3537
build_and_deploy_job:

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
uses: actions/setup-node@v2
3131
with:
3232
node-version: ${{ matrix.node-version }}
33+
cache: 'npm'
3334
- run: npm install
3435
- run: npm run lint
36+
- run: npm run test
3537
- run: npm run build:prod

package-lock.json

Lines changed: 285 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
"test:coverage": "web-test-runner --node-resolve --coverage",
3434
"test:coverage-for": "node ./scripts/test-coverage-package.js",
3535
"dev": "npm run clean && npm run storybook",
36-
"build": "lerna run --scope @umbraco-ui/uui-css build && lerna run build",
37-
"build:prod": "npm run clean && npm run build && npm run test",
38-
"clean": "lerna run clean --parallel",
36+
"build": "lerna run --scope @umbraco-ui/uui-css build && turbo run build",
37+
"build:prod": "npm run clean && npm run build",
38+
"clean": "turbo run clean --parallel",
3939
"lerna:publish": "npm run build:prod && npm whoami && lerna publish from-package --yes && npm run lerna-fix",
4040
"lerna:version": "lerna version --no-push --exact --no-git-tag-version && rimraf package-lock.json && npm i",
4141
"lerna:diff": "lerna diff",
@@ -103,6 +103,7 @@
103103
"rollup-plugin-minify-html-literals": "1.2.6",
104104
"rollup-plugin-postcss": "4.0.2",
105105
"storybook-builder-vite": "0.1.13",
106+
"turbo": "*",
106107
"tsc-files": "1.1.2",
107108
"typescript": "4.5.2",
108109
"vite": "2.6.14",
@@ -116,5 +117,6 @@
116117
"*.ts": "tsc-files --project tsconfig-lint-staged.json",
117118
"*.{js,ts,mjs,cjs,html}": "eslint --cache --fix -c .eslintrc.js",
118119
"*": "prettier --ignore-unknown --write"
119-
}
120+
},
121+
"packageManager": "[email protected]"
120122
}

packages/rollup-package.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const createEsModulesConfig = (entryPoints = []) => {
2424
file: `./lib/${name}.js`,
2525
format: 'es',
2626
},
27+
external: [/^lit/, /^@umbraco-ui/],
2728
plugins: [
2829
importCss({ from: undefined }),
2930
processLitCSSPlugin(),

packages/uui-css/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"build": "npm run build:cssprops && npm run build:rootcss && tsc --build --force && rollup -c rollup.config.js",
3636
"build:cssprops": "postcss lib/custom-properties.css --base lib/ --dir dist && npm run custom-properties-cache",
3737
"build:rootcss": "postcss lib/uui-css.css --base lib/ --dir dist",
38-
"clean": "tsc --build --clean && rimraf dist lib/*.js lib/**/*.js custom-elements.json custom-properties.js",
38+
"clean": "tsc --build --clean && rimraf dist lib/*.js lib/**/*.js custom-elements.json custom-properties.js custom-properties.module.js",
3939
"analyze": "web-component-analyzer **/*.element.ts --outFile custom-elements.json",
4040
"custom-properties-cache": "node ./scripts/update-custom-properties-cache.mjs"
4141
},

turbo.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"pipeline": {
3+
"build": {
4+
"dependsOn": ["^build"],
5+
"outputs": [
6+
"lib/**/*.js",
7+
"lib/**/*.d.ts",
8+
"dist/**",
9+
"custom-elements.json"
10+
]
11+
},
12+
"test": {
13+
"outputs": []
14+
},
15+
"dev": {
16+
"cache": false
17+
},
18+
"clean": {
19+
"cache": false
20+
}
21+
},
22+
"baseBranch": "origin/dev",
23+
"globalDependencies": ["tsconfig.json"]
24+
}

0 commit comments

Comments
 (0)