-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added watchers and better static sites
- Loading branch information
Showing
28 changed files
with
7,787 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
"clean": "lerna run clean --stream", | ||
"test": "lerna run test --stream", | ||
"build-static": "lerna run storybook:build-static --stream", | ||
"deploy-static": "gh-pages -d static-site" | ||
"deploy-static": "gh-pages -d static-site -u [email protected] -m \"Storybook static site\"" | ||
}, | ||
"devDependencies": { | ||
"gh-pages": "3.1.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"modules": [ | ||
{ | ||
"dir" : "src" | ||
}, | ||
{ | ||
"npm": "lwc-library" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { html } from 'lit-html'; | ||
|
||
export default { | ||
title: "Application Main", | ||
component: 'app-main' | ||
}; | ||
|
||
export const default_ = () => html` | ||
<app-main></app-main> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
"modules": [ | ||
{ | ||
"dir" : "src" | ||
}, | ||
{ | ||
"dir" : "stories" | ||
} | ||
], | ||
"expose": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<template> | ||
<div>{greetings}</div> | ||
<div>It is now: {time}</div> | ||
<div>It is now: <hello-time time={time}></hello-time></div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<template> | ||
<template if:false={invalid}> | ||
{time.hours}:{time.minutes}:{time.seconds} | ||
</template> | ||
<template if:true={invalid}> | ||
<span style="color: red">Ouch, the time is invalid</span> | ||
</template> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { LightningElement, api, wire, buildCustomElementConstructor } from 'lwc'; | ||
|
||
import { Time } from '../../wire/time' | ||
|
||
/** | ||
* Display the time coming from a complex object containing 3 number members. | ||
* { | ||
* hours: 21, | ||
* minutes: 18, | ||
* seconds: 44 | ||
* } | ||
* | ||
* @element hello-time | ||
*/ | ||
export default class DisplayTime extends LightningElement { | ||
|
||
/** | ||
* Time passed as a complex object. | ||
* @attr | ||
*/ | ||
@api time = {hours:0,minutes:0,seconds:0} | ||
|
||
get invalid() { | ||
if(!this.time) { | ||
return true; | ||
} | ||
if(typeof this.time.hours!=="number" || (this.time.hours<0 || this.time.hours>23) ) { | ||
return true; | ||
} | ||
if(typeof this.time.minutes!=="number" || (this.time.minutes<0 || this.time.minutes>59) ) { | ||
return true; | ||
} | ||
if(typeof this.time.seconds!=="number" || (this.time.seconds<0 || this.time.seconds>59) ) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
} | ||
|
||
//customElements.define("hello-time", buildCustomElementConstructor(DisplayTime)); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import { html } from 'lit-html'; | ||
|
||
export default { | ||
title: 'Display time', | ||
component: 'hello-time', | ||
decorators: [withKnobs], | ||
}; | ||
|
||
export const default_ = () => html` | ||
<hello-time></hello-time> | ||
`; | ||
|
||
export const nullTime = () => html` | ||
<wc-time></wc-time> | ||
`; | ||
|
||
export const emptyTime = () => html` | ||
<wc-time data='1'></wc-time> | ||
`; | ||
|
||
export const fixedTime = () => html` | ||
<wc-time data='2'></wc-time> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<hello-time time={time}></hello-time> | ||
</template> |
Oops, something went wrong.