Skip to content

Commit 4ccdec1

Browse files
authored
Merge pull request #61 from raxjs/feat/access-ice-pkg
Feat/access ice pkg
2 parents 6eddb4f + a1d5ca5 commit 4ccdec1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5723
-1139
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ packages/*/cjs/
3434
packages/*/esm/
3535
packages/*/es2017/
3636

37+
# Examples
38+
examples/*/esm/
39+
examples/*/es2017/
40+
examples/*/dist/
41+
3742
# Dist
3843
dist/
3944
!**/frameworks/**/dist

examples/edit-word/build.config.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineConfig } from '@ice/pkg';
2+
// import pwc from 'build-plugin-pwc';
3+
4+
export default defineConfig({
5+
bundle: {
6+
formats: ['umd']
7+
},
8+
plugins:[
9+
[
10+
'@ice/pkg-plugin-docusaurus',
11+
{
12+
mobilePreview: true
13+
}
14+
],
15+
'build-plugin-pwc'
16+
]
17+
});

examples/edit-word/docs/index.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Edit Word
3+
sidebar_position: 0
4+
---
5+
6+
## Demo
7+
8+
```jsx preview
9+
import 'pwc-example-edit-word';
10+
11+
export default () => <edit-word />
12+
```

examples/edit-word/package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"name": "edit-word",
2+
"name": "pwc-example-edit-word",
33
"version": "0.0.0",
4+
"module": "./esm/index.js",
5+
"exports": {
6+
"es2017": "./es2017/index.js",
7+
"import": "./esm/index.js"
8+
},
49
"scripts": {
5-
"start": "rollup -c -w",
6-
"build": "rollup -c",
7-
"serve": "sirv public --no-clear"
10+
"start": "ice-pkg start",
11+
"build": "ice-pkg build"
812
},
913
"devDependencies": {
10-
"@rollup/plugin-commonjs": "^21.0.2",
11-
"@rollup/plugin-node-resolve": "^13.1.3",
12-
"@rollup/plugin-replace": "^4.0.0",
14+
"@ice/pkg": "^1.0.0-rc.4",
15+
"@ice/pkg-plugin-docusaurus": "^1.0.0-rc.4",
16+
"build-plugin-pwc": "workspace:*",
1317
"pwc": "workspace:*",
14-
"rollup": "^2.69.0",
15-
"rollup-plugin-css-only": "^3.1.0",
16-
"rollup-plugin-livereload": "^2.0.5",
17-
"rollup-plugin-pwc": "workspace:*",
18-
"rollup-plugin-sourcemaps": "^0.6.3",
19-
"sirv-cli": "^2.0.2"
18+
"react": "^17.0.0",
19+
"react-dom": "^17.0.0"
2020
}
2121
}

examples/edit-word/rollup.config.js

-57
This file was deleted.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineConfig } from '@ice/pkg';
2+
// import pwc from 'build-plugin-pwc';
3+
4+
export default defineConfig({
5+
bundle: {
6+
formats: ['umd']
7+
},
8+
plugins:[
9+
[
10+
'@ice/pkg-plugin-docusaurus',
11+
{
12+
// mobilePreview: true
13+
}
14+
],
15+
'build-plugin-pwc'
16+
]
17+
});

examples/nest-component/docs/index.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Simple Usage
3+
sidebar_position: 0
4+
---
5+
6+
## Demo
7+
8+
```jsx preview
9+
import 'pwc-example-nest-component';
10+
11+
export default () => <nest-component />
12+
```

examples/nest-component/package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"name": "next-component",
2+
"name": "pwc-example-nest-component",
33
"version": "0.0.0",
4+
"module": "./esm/index.js",
5+
"exports": {
6+
"es2017": "./es2017/index.js",
7+
"import": "./esm/index.js"
8+
},
49
"scripts": {
5-
"start": "rollup -c -w",
6-
"build": "rollup -c",
7-
"serve": "sirv public --no-clear"
10+
"start": "ice-pkg start",
11+
"build": "ice-pkg build"
812
},
913
"devDependencies": {
10-
"@rollup/plugin-commonjs": "^21.0.2",
11-
"@rollup/plugin-node-resolve": "^13.1.3",
12-
"@rollup/plugin-replace": "^4.0.0",
14+
"@ice/pkg": "^1.0.0-rc.4",
15+
"@ice/pkg-plugin-docusaurus": "^1.0.0-rc.4",
16+
"build-plugin-pwc": "workspace:*",
1317
"pwc": "workspace:*",
14-
"rollup": "^2.69.0",
15-
"rollup-plugin-css-only": "^3.1.0",
16-
"rollup-plugin-livereload": "^2.0.5",
17-
"rollup-plugin-pwc": "workspace:*",
18-
"rollup-plugin-sourcemaps": "^0.6.3",
19-
"sirv-cli": "^2.0.2"
18+
"react": "^17.0.0",
19+
"react-dom": "^17.0.0"
2020
}
2121
}

examples/nest-component/rollup.config.js

-57
This file was deleted.

examples/nest-component/src/index.pwc

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<script>
1111
import ChildComponent from './components/child.pwc';
1212

13-
export default class CustomComponent extends HTMLElement {
13+
export default class NestComponent extends HTMLElement {
1414
#data = {
1515
count: 0
1616
};

examples/project/build.config.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineConfig } from '@ice/pkg';
2+
// import pwc from 'build-plugin-pwc';
3+
4+
export default defineConfig({
5+
bundle: {
6+
formats: ['umd']
7+
},
8+
plugins:[
9+
[
10+
'@ice/pkg-plugin-docusaurus',
11+
{
12+
mobilePreview: true
13+
}
14+
],
15+
'build-plugin-pwc'
16+
]
17+
});

examples/project/docs/index.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Simple Usage
3+
sidebar_position: 0
4+
---
5+
6+
## Demo
7+
8+
```jsx preview
9+
import 'pwc-example-project';
10+
11+
export default () => <custom-component />
12+
```

examples/project/package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"name": "project",
2+
"name": "pwc-example-project",
33
"version": "0.0.0",
4+
"module": "./esm/index.js",
5+
"exports": {
6+
"es2017": "./es2017/index.js",
7+
"import": "./esm/index.js"
8+
},
49
"scripts": {
5-
"start": "rollup -c -w",
6-
"build": "rollup -c",
7-
"serve": "sirv public --no-clear"
10+
"start": "ice-pkg start",
11+
"build": "ice-pkg build"
812
},
913
"devDependencies": {
10-
"@rollup/plugin-commonjs": "^21.0.2",
11-
"@rollup/plugin-node-resolve": "^13.1.3",
12-
"@rollup/plugin-replace": "^4.0.0",
14+
"@ice/pkg": "^1.0.0-rc.4",
15+
"@ice/pkg-plugin-docusaurus": "^1.0.0-rc.4",
16+
"build-plugin-pwc": "workspace:*",
1317
"pwc": "workspace:*",
14-
"rollup": "^2.69.0",
15-
"rollup-plugin-css-only": "^3.1.0",
16-
"rollup-plugin-livereload": "^2.0.5",
17-
"rollup-plugin-pwc": "workspace:*",
18-
"rollup-plugin-sourcemaps": "^0.6.3",
19-
"sirv-cli": "^2.0.2"
18+
"react": "^17.0.0",
19+
"react-dom": "^17.0.0"
2020
}
2121
}

examples/project/rollup.config.js

-57
This file was deleted.

0 commit comments

Comments
 (0)