create-yoshi-app
Advanced tools
Comparing version 3.19.0 to 3.19.1
{ | ||
"name": "create-yoshi-app", | ||
"version": "3.19.0", | ||
"version": "3.19.1", | ||
"description": "create yoshi powered apps", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
const { bootstrapServer, emitConfigs } = require('./test/environment'); | ||
const targetFolder = './target/dev/configs'; | ||
const port = parseInt(process.env.PORT); | ||
const appConfDir = './target/dev/configs'; | ||
(async () => { | ||
const app = bootstrapServer({ | ||
port: process.env.PORT, | ||
managementPort: 3001, | ||
appConfDir: targetFolder, | ||
port, | ||
managementPort: port + 1, | ||
appConfDir, | ||
}); | ||
await emitConfigs({targetFolder}); | ||
await emitConfigs({ targetFolder: appConfDir }); | ||
await app.start(); | ||
})() | ||
})(); |
@@ -0,4 +1,8 @@ | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/bootstrap/wix-bootstrap-testkit | ||
const testkit = require('wix-bootstrap-testkit'); | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/config/wix-config-emitter | ||
const configEmitter = require('wix-config-emitter'); | ||
// take erb configurations from source folder, replace values/functions, | ||
// remove the ".erb" extension and emit files inside the target folder | ||
module.exports.emitConfigs = ({ targetFolder }) => { | ||
@@ -10,5 +14,6 @@ const emitter = configEmitter({ | ||
return emitter.fn('scripts_domain', 'static.parastorage.com').emit(); | ||
return emitter.val('scripts_domain', 'static.parastorage.com').emit(); | ||
}; | ||
// start the server as an embedded app | ||
module.exports.bootstrapServer = ({ port, managementPort, appConfDir }) => { | ||
@@ -15,0 +20,0 @@ return testkit.app('./index', { |
const { bootstrapServer, emitConfigs } = require('./test/environment'); | ||
const targetFolder = './target/dev/configs'; | ||
const port = parseInt(process.env.PORT); | ||
const appConfDir = './target/dev/configs'; | ||
(async () => { | ||
const app = bootstrapServer({ | ||
port: process.env.PORT, | ||
managementPort: 3001, | ||
appConfDir: targetFolder, | ||
port, | ||
managementPort: port + 1, | ||
appConfDir, | ||
}); | ||
await emitConfigs({targetFolder}); | ||
await emitConfigs({ targetFolder: appConfDir }); | ||
await app.start(); | ||
})() | ||
})(); |
@@ -0,4 +1,8 @@ | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/bootstrap/wix-bootstrap-testkit | ||
const testkit = require('wix-bootstrap-testkit'); | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/config/wix-config-emitter | ||
const configEmitter = require('wix-config-emitter'); | ||
// take erb configurations from source folder, replace values/functions, | ||
// remove the ".erb" extension and emit files inside the target folder | ||
module.exports.emitConfigs = ({ targetFolder }) => { | ||
@@ -10,5 +14,6 @@ const emitter = configEmitter({ | ||
return emitter.fn('scripts_domain', 'static.parastorage.com').emit(); | ||
return emitter.val('scripts_domain', 'static.parastorage.com').emit(); | ||
}; | ||
// start the server as an embedded app | ||
module.exports.bootstrapServer = ({ port, managementPort, appConfDir }) => { | ||
@@ -15,0 +20,0 @@ return testkit.app('./index', { |
@@ -0,2 +1,4 @@ | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/bootstrap/wix-bootstrap-testkit | ||
import * as testkit from 'wix-bootstrap-testkit'; | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/config/wix-config-emitter | ||
import * as configEmitter from 'wix-config-emitter'; | ||
@@ -11,2 +13,4 @@ | ||
// take erb configurations from source folder, replace values/functions, | ||
// remove the ".erb" extension and emit files inside the target folder | ||
function emitConfigs() { | ||
@@ -19,2 +23,3 @@ return configEmitter({ | ||
// start the server as an embedded app | ||
function bootstrapServer() { | ||
@@ -21,0 +26,0 @@ return testkit.app('./index', { |
@@ -1,3 +0,5 @@ | ||
import testkit from 'wix-bootstrap-testkit'; | ||
import configEmitter from 'wix-config-emitter'; | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/bootstrap/wix-bootstrap-testkit | ||
const testkit = require('wix-bootstrap-testkit'); | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/config/wix-config-emitter | ||
const configEmitter = require('wix-config-emitter'); | ||
@@ -11,2 +13,4 @@ export const app = bootstrapServer(); | ||
// take erb configurations from source folder, replace values/functions, | ||
// remove the ".erb" extension and emit files inside the target folder | ||
function emitConfigs() { | ||
@@ -19,2 +23,3 @@ return configEmitter({ | ||
// start the server as an embedded app | ||
function bootstrapServer() { | ||
@@ -21,0 +26,0 @@ return testkit.app('./index', { |
@@ -0,2 +1,4 @@ | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/bootstrap/wix-bootstrap-testkit | ||
import * as testkit from 'wix-bootstrap-testkit'; | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/config/wix-config-emitter | ||
import * as configEmitter from 'wix-config-emitter'; | ||
@@ -11,2 +13,4 @@ | ||
// take erb configurations from source folder, replace values/functions, | ||
// remove the ".erb" extension and emit files inside the target folder | ||
function emitConfigs() { | ||
@@ -22,2 +26,3 @@ return configEmitter({ | ||
// start the server as an embedded app | ||
function bootstrapServer() { | ||
@@ -24,0 +29,0 @@ return testkit.app('./index', { |
@@ -1,3 +0,5 @@ | ||
import testkit from 'wix-bootstrap-testkit'; | ||
import configEmitter from 'wix-config-emitter'; | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/bootstrap/wix-bootstrap-testkit | ||
const testkit = require('wix-bootstrap-testkit'); | ||
// https://github.com/wix-platform/wix-node-platform/tree/master/config/wix-config-emitter | ||
const configEmitter = require('wix-config-emitter'); | ||
@@ -11,2 +13,4 @@ export const app = bootstrapServer(); | ||
// take erb configurations from source folder, replace values/functions, | ||
// remove the ".erb" extension and emit files inside the target folder | ||
function emitConfigs() { | ||
@@ -17,3 +21,3 @@ return configEmitter({ | ||
}) | ||
.fn('scripts_domain', 'static.parastorage.com') | ||
.val('scripts_domain', 'static.parastorage.com') | ||
.fn('static_url', 'com.wixpress.{%projectName%}', 'http://localhost:3200/') | ||
@@ -23,2 +27,3 @@ .emit(); | ||
// start the server as an embedded app | ||
function bootstrapServer() { | ||
@@ -25,0 +30,0 @@ return testkit.app('./index', { |
187306
4289