@@ -1,3 +0,6 @@ | ||
== 0.1.1 | ||
== 0.1.1 2015-09-22 | ||
* Running cpr in main process to avoid pipe errors. | ||
* Working gallery. | ||
== 0.1.0 2015-09-02 | ||
@@ -4,0 +7,0 @@ |
@@ -21,18 +21,19 @@ 'use strict' | ||
const live = require('lucy-live') | ||
// Only used in development | ||
// const live = require('lucy-live') | ||
// | ||
// let init = false | ||
// live.path('./gallery.css', function() { | ||
// if (init) { | ||
// console.log("PATH CHANGED") | ||
// require('remote').getCurrentWindow().restart(); | ||
// } | ||
// init = true | ||
// }) | ||
// | ||
// live.watch('.') | ||
let init = false | ||
live.path('./gallery.css', function() { | ||
if (init) { | ||
console.log("PATH CHANGED") | ||
require('remote').getCurrentWindow().restart(); | ||
} | ||
init = true | ||
}) | ||
live.watch('.') | ||
Gallery.prototype.load = function(p) { | ||
let mainWindow = remote.getGlobal('mainWindow') | ||
// FIXME: Should we need to choose between 'edit' and 'load' ? | ||
// FIXME: We need a way to choose between 'edit' and 'load'. | ||
mainWindow.webContents.executeJavaScript(`Lucy.app.edit('${p}')`) | ||
@@ -60,3 +61,3 @@ // mainWindow.webContents.executeJavaScript(`Lucy.app.load('${p}')`) | ||
if (statPath(path.join(spath, f, 'snapshot.png'))) { | ||
let src = `lucy/scene/${f}/snapshot.png` | ||
let src = `${ spath }/${f}/snapshot.png` | ||
let div = ` | ||
@@ -73,5 +74,8 @@ <div class='scene' data-name='${f}' onclick="Lucy.gallery.load('${spath}/${f}')" style='background-image:url(${src})'> | ||
let gallery = new Gallery(__dirname + '/lucy/scene') | ||
let nodeapp = require ( 'remote' ).require ( 'app' ) | ||
const rootpath = nodeapp.getAppPath () | ||
let gallery = new Gallery ( `${ rootpath }/gallery` ) | ||
Lucy.gallery = gallery | ||
gallery.reload() |
@@ -8,2 +8,3 @@ /* | ||
'use strict' | ||
const cpr = require ( 'cpr' ) | ||
@@ -238,1 +239,6 @@ const Booter = function () | ||
} | ||
Booter.prototype.cpr = function () | ||
{ cpr.apply ( cpr, arguments ) | ||
} | ||
{ | ||
"name": "lucy-boot", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Bootstrap Lucidity, an electron application.", | ||
"main": "index.js", | ||
"main": "lib/index.js", | ||
"license": "MIT", | ||
@@ -28,3 +28,6 @@ "scripts": { | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"cpr": "^0.4.1", | ||
"jquery": "^2.1.4" | ||
}, | ||
"homepage": "https://github.com/lucidogen/lucy-boot#readme", | ||
@@ -31,0 +34,0 @@ "directories": { |
@@ -15,4 +15,2 @@ # Lucy Boot [](https://travis-ci.org/lucidogen/lucy-boot) | ||
Currently only works with [**io.js**](https://iojs.org). | ||
```Shell | ||
@@ -57,2 +55,3 @@ npm install lucy-boot --save | ||
* 0.1.1 (2015-09-22) Fixed pipe errors, working gallery. | ||
* 0.1.0 (2015-09-02) Initial release. |
@@ -10,3 +10,3 @@ 'use strict' | ||
, function () | ||
{ let booter = require ( '../index' ) | ||
{ let booter = require ( '../lib/index' ) | ||
@@ -13,0 +13,0 @@ it |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
98455
1.48%18
12.5%395
3.67%2
Infinity%56
-1.75%2
100%