File tree 14 files changed +48
-33
lines changed
packages/uni-virtualizer-examples 14 files changed +48
-33
lines changed Original file line number Diff line number Diff line change 1
1
node_modules
2
- build
2
+ build
3
+ gh-pages
Original file line number Diff line number Diff line change 12
12
},
13
13
"scripts" : {
14
14
"bootstrap" : " lerna bootstrap --hoist" ,
15
- "start" : " http-server & (cd packages/uni-virtualizer-examples; npm run build-and-watch)"
15
+ "start" : " http-server & (cd packages/uni-virtualizer-examples; npm run build-and-watch)" ,
16
+ "deploy-examples" : " ./scripts/deploy-examples.sh"
16
17
},
17
18
"dependencies" : {}
18
19
}
Original file line number Diff line number Diff line change 6
6
"repository" : " PolymerLabs/uni-virtualizer" ,
7
7
"private" : true ,
8
8
"scripts" : {
9
+ "build" : " rollup -c" ,
9
10
"build-and-watch" : " rollup -c -w"
10
11
},
11
12
"author" : " The Polymer Authors" ,
Original file line number Diff line number Diff line change 10
10
<!doctype html>
11
11
< html >
12
12
< head >
13
- < script src ="../../ shared/boot.js "> </ script >
13
+ < script src ="../shared/boot.js "> </ script >
14
14
< style >
15
15
body {
16
16
display : grid;
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class ContactList extends LitElement {
59
59
}
60
60
61
61
async firstUpdated ( ) {
62
- const resp = await fetch ( '../../ shared/contacts.json' ) ;
62
+ const resp = await fetch ( '../shared/contacts.json' ) ;
63
63
this . data = await resp . json ( ) ;
64
64
}
65
65
Original file line number Diff line number Diff line change 10
10
<!doctype html>
11
11
< html >
12
12
< head >
13
- < script src ="../../ shared/boot.js "> </ script >
13
+ < script src ="../shared/boot.js "> </ script >
14
14
</ head >
15
15
< body >
16
16
</ body >
Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ const example = (contacts) => html`
13
13
` ;
14
14
15
15
( async function go ( ) {
16
- const contacts = await ( await fetch ( '../../ shared/contacts.json' ) ) . json ( ) ;
16
+ const contacts = await ( await fetch ( '../shared/contacts.json' ) ) . json ( ) ;
17
17
render ( example ( contacts ) , document . body ) ;
18
18
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ async function boot() {
5
5
if ( unbundled ) {
6
6
const importmap = document . createElement ( 'script' ) ;
7
7
importmap . setAttribute ( 'type' , 'importmap' ) ;
8
- importmap . textContent = await ( await fetch ( '../../ shared/importmap.json' ) ) . text ( ) ;
8
+ importmap . textContent = await ( await fetch ( '../shared/importmap.json' ) ) . text ( ) ;
9
9
document . head . appendChild ( importmap ) ;
10
10
}
11
11
const example = document . createElement ( 'script' ) ;
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 10
10
<!doctype html>
11
11
< html >
12
12
< head >
13
- < script src ="../../ shared/boot.js "> </ script >
13
+ < script src ="../shared/boot.js "> </ script >
14
14
</ head >
15
15
< body >
16
16
< hey-yo > </ hey-yo >
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class Yo extends LitElement {
73
73
}
74
74
75
75
async firstUpdated ( ) {
76
- const resp = await fetch ( '../../ shared/contacts.json' ) ;
76
+ const resp = await fetch ( '../shared/contacts.json' ) ;
77
77
this . data = await resp . json ( ) ;
78
78
}
79
79
Original file line number Diff line number Diff line change @@ -17,31 +17,23 @@ export default [
17
17
]
18
18
} ,
19
19
{
20
- input : [
21
- 'lit-html' ,
22
- 'lit-virtualizer/lib/scroll.js' ,
23
- 'public/basic-lit-html/index.js'
24
- ] ,
25
- output : {
26
- dir : 'public/basic-lit-html/build' ,
27
- format : 'esm'
28
- } ,
29
- plugins : [
30
- resolve ( ) ,
31
- ]
20
+ input : 'public/basic-lit-html/index.js' ,
21
+ output : {
22
+ dir : 'public/basic-lit-html/build' ,
23
+ format : 'esm'
24
+ } ,
25
+ plugins : [
26
+ resolve ( ) ,
27
+ ]
32
28
} ,
33
29
{
34
- input : [
35
- // 'lit-element',
36
- // 'lit-virtualizer/src/lit-virtualizer.js',
37
- 'public/basic-lit-element/index.js'
38
- ] ,
39
- output : {
40
- dir : 'public/basic-lit-element/build' ,
41
- format : 'esm'
42
- } ,
43
- plugins : [
44
- resolve ( ) ,
45
- ]
30
+ input : 'public/basic-lit-element/index.js' ,
31
+ output : {
32
+ dir : 'public/basic-lit-element/build' ,
33
+ format : 'esm'
34
+ } ,
35
+ plugins : [
36
+ resolve ( ) ,
37
+ ]
46
38
} ,
47
39
] ;
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Create a new worktree at `gh-pages/`
4
+ if ! git worktree add gh-pages ; then
5
+ git worktree remove gh-pages
6
+ git worktree add gh-pages
7
+ fi
8
+
9
+ # Clean it out
10
+ rm -rf gh-pages/*
11
+
12
+ # Build uni-virtualizer-examples and copy the build into the gh-pages worktree
13
+ npm run build --prefix packages/uni-virtualizer-examples/
14
+ cp -r packages/uni-virtualizer-examples/public/* gh-pages
15
+
16
+ # Commit and push to deploy
17
+ cd gh-pages
18
+ if ! { git add -A && git commit -m " deploy examples" && git push origin HEAD:gh-pages; } ; then
19
+ echo $' \n Nothing to deploy.'
20
+ fi
You can’t perform that action at this time.
0 commit comments