Skip to content

Commit

Permalink
- npm publish 2016.4.2
Browse files Browse the repository at this point in the history
- upgrade to electron @ 1.0.2
  • Loading branch information
kaizhu256 committed May 23, 2016
1 parent 220fbe1 commit 1a6a2d3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.log
*~
.*
core
example.js
external
node_modules
Expand Down
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
electron-lite
==============
this package will dynamically download and install electron @ 0.36.12 from https://github.com/atom/electron/releases with zero npm-dependencies
this package will dynamically download and install electron @ 1.0.2 from https://github.com/atom/electron/releases with zero npm-dependencies

[![NPM](https://img.shields.io/npm/v/electron-lite.svg?style=flat-square)](https://www.npmjs.com/package/electron-lite) [![NPM](https://img.shields.io/npm/dm/electron-lite.svg?style=flat-square)](https://www.npmjs.com/package/electron-lite)
[![NPM](https://img.shields.io/npm/v/electron-lite.svg?style=flat-square)](https://www.npmjs.com/package/electron-lite) [![NPM](https://img.shields.io/npm/dm/electron-lite.svg?style=flat-square)](https://www.npmjs.com/package/electron-lite) [![travis-ci.org build-status](https://api.travis-ci.org/kaizhu256/node-electron-lite.svg)](https://travis-ci.org/kaizhu256/node-electron-lite)



# documentation
#### todo
- none

#### change since 46701e7b
- npm publish 2016.3.3
- fix race-condition for parallel npm install
#### change since 220fbe1c
- npm publish 2016.4.2
- upgrade to electron @ 1.0.2
- none

#### this package requires
Expand Down Expand Up @@ -88,13 +88,13 @@ instruction
switch (modeNext) {
case 1:
// wait for electron to init
require('app').once('ready', onNext);
require('electron').app.once('ready', onNext);
break;
case 2:
// init options
options = { frame: false, height: 768, width: 1024, x: 0, y: 0 };
// init browserWindow;
options.BrowserWindow = require('browser-window');
options.BrowserWindow = require('electron').BrowserWindow;
options.browserWindow = new options.BrowserWindow(options);
// goto next step when webpage is loaded
options.browserWindow.webContents.once('did-stop-loading', onNext);
Expand Down Expand Up @@ -144,10 +144,10 @@ instruction
"bin": {
"electron": "cli.js"
},
"description": "this package will dynamically download and install electron @ 0.36.12 \
"description": "this package will dynamically download and install electron @ 1.0.2 \
from https://github.com/atom/electron/releases with zero npm-dependencies",
"devDependencies": {
"utility2": "2016.3.1"
"utility2": "2016.3.6"
},
"keywords": [
"atom", "atom-shell",
Expand Down Expand Up @@ -180,7 +180,7 @@ npm run postinstall && \
utility2 test node test.js",
"test-published": "utility2 shRun shNpmTestPublished"
},
"version": "2016.3.3"
"version": "2016.4.2"
}
```

Expand All @@ -207,9 +207,8 @@ shBuildCiTestPre() {(set -e
cp /tmp/app/screen-capture.*.png "$npm_config_dir_build" || return $?
)}

shBuild() {
shBuild() {(set -e
# this function will run the main build
set -e
# init env
. node_modules/.bin/utility2 && shInit
# cleanup github-gh-pages dir
Expand All @@ -223,6 +222,6 @@ shBuild() {
then
shBuildCiDefault
fi
}
)}
shBuild
```
9 changes: 5 additions & 4 deletions index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ shNpmPostinstall() {(set -e
# this function will run npm postinstall
case "$(uname)" in
Darwin)
FILE_BASE="electron-v0.36.12-darwin-x64.zip"
FILE_BASE="electron-v1.0.2-darwin-x64.zip"
FILE_BIN=external/Electron.app/Contents/MacOS/Electron
FILE_URL=https://github.com/atom/electron/releases/download\
/v0.36.12/electron-v0.36.12-darwin-x64.zip
/v1.0.2/electron-v1.0.2-darwin-x64.zip
;;
Linux)
# init unzip
export PATH="$(pwd):$PATH"
FILE_BASE="electron-v0.36.12-linux-x64.zip"
FILE_BASE="electron-v1.0.2-linux-x64.zip"
FILE_BIN=external/electron
FILE_URL=https://github.com/atom/electron/releases/download\
/v0.36.12/electron-v0.36.12-linux-x64.zip
/v1.0.2/electron-v1.0.2-linux-x64.zip
;;
esac
if [ ! -s "$FILE_BIN" ]
Expand All @@ -33,6 +33,7 @@ shNpmPostinstall() {(set -e
curl -#L -o "$FILE_TMP" "$FILE_URL"
fi
chmod 755 "$FILE_TMP"
# handle race-condition
mv "$FILE_TMP" "/tmp/$FILE_BASE" 2>/dev/null || true
fi
# unzip electron-zipfile
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"bin": {
"electron": "cli.js"
},
"description": "this package will dynamically download and install electron @ 0.36.12 from https://github.com/atom/electron/releases with zero npm-dependencies",
"description": "this package will dynamically download and install electron @ 1.0.2 from https://github.com/atom/electron/releases with zero npm-dependencies",

"devDependencies": {
"utility2": "2016.3.1"
"utility2": "2016.3.6"
},
"keywords": [
"atom", "atom-shell",
Expand Down Expand Up @@ -40,5 +40,5 @@

"test-published": "utility2 shRun shNpmTestPublished"
},
"version": "2016.3.3"
"version": "2016.4.2"
}

0 comments on commit 1a6a2d3

Please sign in to comment.