File tree Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 1- name : Publish Docs on Push to main
1+ name : Lint on Push to main
22on :
33 push :
44 branches :
Original file line number Diff line number Diff line change @@ -13,27 +13,22 @@ const commonOptions = {
1313 '.otf' : 'file' ,
1414 '.html' : 'copy' ,
1515 '.json' : 'copy' ,
16- }
16+ } ,
17+ logLevel : 'info' ,
1718} ;
1819
1920if ( process . env . NODE_ENV === 'production' ) {
2021 await esbuild . build ( {
2122 ...commonOptions ,
2223 minify : true ,
2324 sourcemap : false ,
24- define : {
25- 'process.env.NODE_ENV' : '"production"' ,
26- } ,
2725 } ) . catch ( ( ) => process . exit ( 1 ) ) ;
2826} else {
2927 commonOptions . entryPoints . push ( 'example/index.html' , 'example/data.json' ) ;
3028 let ctx = await esbuild . context ( {
3129 ...commonOptions ,
3230 minify : false ,
3331 sourcemap : true ,
34- define : {
35- 'process.env.NODE_ENV' : '"development"' ,
36- } ,
3732 } )
3833
3934 let { host, port } = await ctx . serve ( {
Original file line number Diff line number Diff line change 1313 < js-container >
1414 < js-tag transform ="uppercase "> Data</ js-tag >
1515 <!-- where the data comes from -->
16- < js-provider id ="provider " path ="data.json " interval ="5 "> </ js-provider >
16+ < js-provider id ="provider " origin =" http://localhost:8080/ " path ="aktek/sync " interval ="5 "> </ js-provider >
1717
1818 <!-- model -->
1919 < js-array id ="array " provider ="#provider "> </ js-array >
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ export class ProviderElement extends LitElement {
120120
121121 #pathChanged( newVal , oldVal ) {
122122 if ( newVal ) {
123- if ( newVal !== oldVal ) {
123+ if ( newVal !== oldVal ) {
124124 this . fetch ( ) ;
125125 }
126126 } else {
@@ -130,7 +130,7 @@ export class ProviderElement extends LitElement {
130130
131131 #intervalChanged( newVal , oldVal ) {
132132 if ( newVal ) {
133- if ( newVal !== oldVal ) {
133+ if ( newVal !== oldVal ) {
134134 this . fetch ( ) ;
135135 }
136136 } else {
@@ -193,12 +193,12 @@ export class ProviderElement extends LitElement {
193193 #fetchdata( data ) {
194194 if ( typeof data == "string" ) {
195195 this . #fetchtext( data ) ;
196- } else if ( data instanceof Array ) {
197- data . forEach ( ( item ) => {
198- this . #fetchobject( data ) ;
199- } ) ;
196+ } else if ( Array . isArray ( data ) ) {
197+ data . forEach ( ( item ) => {
198+ this . #fetchobject( item ) ;
199+ } ) ;
200200 } else if ( data instanceof Object ) {
201- this . #fetchobject( data ) ;
201+ this . #fetchobject( data ) ;
202202 } else {
203203 this . #fetchblob( data ) ;
204204 }
You can’t perform that action at this time.
0 commit comments