@polylith/builder 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.js +6 -1
- package/package.json +1 -1
package/App.js
CHANGED
|
@@ -121,7 +121,7 @@ export default class App {
|
|
|
121
121
|
try {
|
|
122
122
|
let module = await import(this.modulePath)
|
|
123
123
|
let router = module.default;
|
|
124
|
-
await router(appRouter);
|
|
124
|
+
await router(appRouter, this);
|
|
125
125
|
return true;
|
|
126
126
|
} catch(e) {
|
|
127
127
|
console.error('error while building router', this.modulePath);
|
|
@@ -129,6 +129,11 @@ export default class App {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
async sendIndex(res) {
|
|
133
|
+
var path = path.join(this.root, this.htmlTemplate.destination);
|
|
134
|
+
res.sendFile(path)
|
|
135
|
+
}
|
|
136
|
+
|
|
132
137
|
/**
|
|
133
138
|
* Call this method to add a code variable to the output html file. This
|
|
134
139
|
* variable will be added the namsespace for the app.
|