Skip to content

Commit 2981a28

Browse files
committed
fix(serve): update item and info so that the pass through the elementModels
Closes #103
1 parent a1f1b39 commit 2981a28

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"marked-terminal": "^2.0.0",
104104
"node-github": "0.0.3",
105105
"npm-registry-client": "^7.4.5",
106-
"pie-catalog-client": "PieLabs/pie-catalog-client#v0.1.0",
106+
"pie-catalog-client": "PieLabs/pie-catalog-client#v0.2.0",
107107
"pug": "^2.0.0-beta9",
108108
"raw-loader": "^0.5.1",
109109
"resolve": "^1.3.2",
@@ -116,4 +116,4 @@
116116
"webpack-dev-middleware": "^1.10.1",
117117
"winston": "^2.3.1"
118118
}
119-
}
119+
}

src/apps/info/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export default class InfoApp implements App, Servable {
156156

157157
demo: {
158158
config: {
159+
elementModels: this.config.elementModels,
159160
models: this.config.pieModels
160161
},
161162
markup: jsesc(this.config.markup),

src/apps/item/entry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function js(
88
sockPath: string) {
99

1010

11-
let controllerDep = (value, key) => `controllers['${key}'] = require('${key}-controller');`
11+
const controllerDep = (value, key) => `controllers['${key}'] = require('${key}-controller');`;
1212

1313
return `
1414
/** Auto generated by ${__filename} */

src/apps/item/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ import AllInOneBuild, { ControllersBuild, SupportConfig } from '../../question/b
99
import { App, Servable, ServeOpts } from '../types';
1010
import AppServer, { utils as su } from '../../server';
1111
import { Names, getNames } from "../common";
12-
import { existsSync, readFileSync, readJsonSync } from 'fs-extra';
1312
import { join, resolve } from 'path';
1413

14+
import { ElementDeclaration } from './../../code-gen/declaration';
1515
import { JsonConfig } from '../../question/config';
1616
import { buildLogger } from 'log-factory';
1717
import entryJs from './entry';
18-
import { writeConfig } from '../../code-gen/webpack-write-config';
1918

2019
const logger = buildLogger();
2120
const templatePath = join(__dirname, 'views/index.pug');
@@ -122,6 +121,7 @@ export default class ItemApp implements App, Servable {
122121

123122
demo: {
124123
config: {
124+
elementModels: this.config.elementModels,
125125
models: this.config.pieModels
126126
},
127127
markup: jsesc(this.config.markup),

0 commit comments

Comments
 (0)