Skip to content

Commit 2a5bcc3

Browse files
authored
Merge pull request #77 from abraham/update
Update Nutmeg and lit-html
2 parents f942583 + 97e95d4 commit 2a5bcc3

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
},
3939
"dependencies": {
4040
"@abraham/remotedata": "0.8.0",
41-
"@nutmeg/seed": "0.13.0",
42-
"lit-html": "0.10.2"
41+
"@nutmeg/seed": "0.17.0",
42+
"lit-html": "1.1.2"
4343
},
4444
"devDependencies": {
45-
"@nutmeg/cli": "0.15.0"
45+
"@nutmeg/cli": "0.17.0"
4646
}
4747
}

src/api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export class Api {
99
const data = await response.json();
1010
return data;
1111
} else {
12-
throw response.text();
12+
throw await response.text();
1313
}
1414
}
1515

src/node-package.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Failure, fold, Initialized, Pending, RemoteData, Success } from '@abraham/remotedata';
2-
import { html, Property, Seed, svg, TemplateResult } from '@nutmeg/seed';
2+
import { html, property, Seed, svg, TemplateResult } from '@nutmeg/seed';
33
import { Api } from './api';
4-
import { Pkg, InstallSource, DEFAULT_INSTALL_SOURCE } from './pkg';
5-
import { SuccessView } from './success.view';
64
import { FailureView } from './failure.view';
75
import { PendingView } from './pending.view';
6+
import { DEFAULT_INSTALL_SOURCE, InstallSource, Pkg } from './pkg';
7+
import { SuccessView } from './success.view';
88

99
interface SuccessData {
1010
pkg: Pkg,
@@ -14,8 +14,8 @@ interface SuccessData {
1414
type State = RemoteData<string, SuccessData>;
1515

1616
export class NodePackage extends Seed {
17-
@Property() public global: boolean = false;
18-
@Property() public name?: string;
17+
@property({ type: Boolean }) public global: boolean = false;
18+
@property({ type: String }) public name?: string;
1919

2020
private api = new Api();
2121
private state: State = new Initialized();

src/success.view.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { html, svg, TemplateResult } from '@nutmeg/seed';
2-
import { repeat } from 'lit-html/lib/repeat';
2+
import { repeat } from 'lit-html/directives/repeat';
33
import { NodePackage } from './node-package';
44
import { InstallCommand, InstallSource, Pkg } from './pkg';
55

@@ -63,8 +63,8 @@ export class SuccessView {
6363
private installTab(command: InstallCommand): TemplateResult {
6464
const classes = `item tab ${this.selectedInstallCommand === command.id ? 'selected' : ''}`;
6565
return html`
66-
<a class$="${classes}" href="#" on-click=${(event: MouseEvent) => this.selectInstallCommand(event, command)}>
67-
<label for$="${command.id}">
66+
<a class="${classes}" href="#" @click=${(event: MouseEvent) => this.selectInstallCommand(event, command)}>
67+
<label for="${command.id}">
6868
${command.id}
6969
</label>
7070
</a>
@@ -73,7 +73,7 @@ export class SuccessView {
7373

7474
private installCommand(command: InstallCommand): TemplateResult {
7575
return html`
76-
<input id="${command.id}" class$="command fixed-width ellipsis item ${this.selectedInstallCommand !== command.id ? 'hidden' : ''}" readonly value$="${command.command}">
76+
<input id="${command.id}" class="command fixed-width ellipsis item ${this.selectedInstallCommand !== command.id ? 'hidden' : ''}" readonly value="${command.command}">
7777
`;
7878
}
7979

@@ -86,7 +86,7 @@ export class SuccessView {
8686
<div id="commands" class="row-horizontal">
8787
${repeat(this.pkg.installCommands(this.component.global), command => command.id, (command, _index) => this.installCommand(command))}
8888
<div class="item">
89-
<a id="copy" href="#" title="Copy command" on-click=${(event: MouseEvent) => this.copyInstallCommand(event)}>${this.copy}</a>
89+
<a id="copy" href="#" title="Copy command" @click=${(event: MouseEvent) => this.copyInstallCommand(event)}>${this.copy}</a>
9090
</div>
9191
</div>
9292
</div>

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"extends": "./tsconfig.production",
33
"include": [
44
"src",
5-
"test",
6-
],
5+
"test"
6+
]
77
}

tsconfig.production.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
"sourceMap": true,
1717
"sourceRoot": "src",
1818
"strict": true,
19-
"target": "esnext",
19+
"target": "esnext"
2020
},
21-
"exclude": [
22-
"node_modules",
23-
"dist",
24-
],
2521
"include": [
26-
"src",
22+
"src"
2723
],
24+
"exclude": [
25+
"node_modules",
26+
"dist"
27+
]
2828
}

0 commit comments

Comments
 (0)