Skip to content

Commit

Permalink
fix(integration): fix intergration/stencil-toolkit-nx build error
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #52
  • Loading branch information
Jimmysh committed Jan 9, 2020
1 parent 3e85786 commit 4bddf64
Show file tree
Hide file tree
Showing 13 changed files with 2,037 additions and 53 deletions.
1 change: 1 addition & 0 deletions .cz-config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const base = {
scopes: [
{ name: 'aiao' },
{ name: 'integration' },
{ name: 'color' },
{ name: 'elements' },
{ name: 'elements-angular' },
Expand Down
15 changes: 15 additions & 0 deletions integration/stencil-toolkit-nx/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# Add files here to ignore them from prettier formatting

tmp
libs/*/build
apps/*/build
node_modules
/dist
/coverage
*.log
!*.config.js

**/*.en.md
libs/stencil-lib/hydrate/
libs/stencil-lib/vendors/
libs/stencil-lib/loader/
dist/
vendors/
assets/
react-component-lib/
6 changes: 6 additions & 0 deletions integration/stencil-toolkit-nx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ yarn install
yarn ng build stencil-lib
```

## build libs

```console
yarn build:libs
```

## angular 演示

```console
Expand Down
5 changes: 5 additions & 0 deletions integration/stencil-toolkit-nx/lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"npmClient": "yarn",
"packages": ["libs/*"],
"version": "independent"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"dest": "../../dist/libs/angular-lib",
"lib": {
"entryFile": "src/index.ts"
}
},
"whitelistedNonPeerDependencies": ["@stencil-toolkit-nx/stencil-lib"]
}
6 changes: 6 additions & 0 deletions integration/stencil-toolkit-nx/libs/angular-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@stencil-toolkit-nx/angular-lib",
"version": "0.0.1",
"scripts": {
"build": "ng build angular-lib"
},
"dependencies": {
"@stencil-toolkit-nx/stencil-lib": "*"
},
"peerDependencies": {
"@angular/common": "^8.2.11",
"@angular/core": "^8.2.11"
Expand Down
8 changes: 7 additions & 1 deletion integration/stencil-toolkit-nx/libs/react-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "react-lib",
"name": "@stencil-toolkit-nx/react-lib",
"version": "0.0.1",
"scripts": {
"build": "ng build react-lib"
},
"dependencies": {
"@stencil-toolkit-nx/stencil-lib": "*"
},
"peerDependencies": {
"react": "*",
"react-dom": "*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build": "ng build stencil-lib && node scripts/build-clean"
},
"devDependencies": {
"@stencil/core": "^1.8.1"
"@stencil/core": "*"
},
"license": "MIT"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { join } = require('path');
const { unlinkSync, writeFileSync } = require('fs');

const elelementsReactProject = join(__dirname, '../../elements-react');
const elelementsReactProject = join(__dirname, '../../react-lib');

try {
unlinkSync(join(elelementsReactProject, 'src/lib/react-component-lib/createControllerComponent.tsx'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export const config: Config = {
],
copy: [
{
src: resolve('node_modules/@ionic/core'),
dest: resolve('libs/stencil-lib/vendors/ionic')
src: resolve(__dirname, '../../', 'node_modules/@ionic/core'),
dest: resolve(__dirname, 'vendors/ionic')
}
],
tsconfig: 'tsconfig.json',
Expand Down
4 changes: 3 additions & 1 deletion integration/stencil-toolkit-nx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"update:check": "ng update",
"workspace-schematic": "nx workspace-schematic",
"dep-graph": "nx dep-graph",
"help": "nx help"
"help": "nx help",
"build:libs": "lerna run build --scope @stencil-toolkit-nx/* && yarn format"
},
"private": true,
"dependencies": {
Expand Down Expand Up @@ -75,6 +76,7 @@
"eslint": "6.8.0",
"jest": "24.9.0",
"jest-preset-angular": "7.0.0",
"lerna": "^3.20.2",
"ng-packagr": "^5.4.0",
"prettier": "1.19.1",
"ts-jest": "24.2.0",
Expand Down
Loading

0 comments on commit 4bddf64

Please sign in to comment.