Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dist/spark/DevLauncher.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ux from "./src/ux.mjs";
import lng from 'wpe-lightning-spark';
import lng from 'wpe-lightning/src/lightning.mjs';
import fetch from "node-fetch";
import keyboard from "./src/keyboard.mjs";

Expand All @@ -12,6 +12,9 @@ export default class DevLauncher {
}

launch(appType, lightningOptions, options = {}) {
if (undefined != global.LIGHTNING_PLATFORM) {
lng.Stage.platform = global.LIGHTNING_PLATFORM;
}
this._appType = appType;
this._options = options;
return this._start(lightningOptions);
Expand Down
3 changes: 2 additions & 1 deletion dist/spark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"postinstall": "rollup -c"
},
"dependencies": {
"rollup": "^1.10.0",
"esm": "^3.2.11",
"wpe-lightning-spark": "https://github.com/pxscene/Lightning-Spark.git",
"wpe-lightning": "https://github.com/pxscene/Lightning.git#spark",
"node-fetch": "^1.7.3"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions dist/spark/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const resolve = require('rollup-plugin-node-resolve');
export default {
input: 'start.mjs',
plugins: [resolve({
only: [ 'wpe-lightning-spark', 'wpe-lightning' ]
only: [ 'wpe-lightning' ]
})],
output: {
file: './lightning-demo-spark.js',
format: 'cjs',
file: './lightning-demo-spark.mjs',
format: 'esm',
name: 'lng'
}
};
};
6 changes: 3 additions & 3 deletions scripts/release-spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function getDependencies() {
function bundleApp() {
console.log("Generate rollup bundle for app (src/App.js)");
return rollup.rollup({input: "./src/App.js"}).then(bundle => {
return bundle.generate({format: 'esm', banner: 'import ux from "./ux";\nimport lng from "wpe-lightning-spark";\n' + getDependencies()}).then(content => {
return bundle.generate({format: 'esm', banner: 'import ux from "./ux";\nimport lightning from "wpe-lightning/src/lightning.mjs";\nconst lng = lightning;\n' + getDependencies()}).then(content => {
const location = "./dist/" + info.dest + "/src/app.mjs";
fs.writeFileSync(location, content.code);
});
Expand All @@ -88,7 +88,7 @@ function bundleApp() {
function bundleUx() {
console.log("Generate rollup bundle for ux");
return rollup.rollup({input: dir + "/js/src/ux.js"}).then(bundle => {
return bundle.generate({format: 'esm', banner: 'import lng from "wpe-lightning-spark";\n' + getDependencies()}).then(content => {
return bundle.generate({format: 'esm', banner: 'import lightning from "wpe-lightning/src/lightning.mjs";\nconst lng = lightning;\n' + getDependencies()}).then(content => {
const location = "./dist/" + info.dest + "/src/ux.mjs";
fs.writeFileSync(location, content.code);
});
Expand All @@ -114,4 +114,4 @@ function exec(command, opts) {
resolve(stdout);
});
});
}
}