mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Reorg (#386)
* Step 1: move electorn into `app/`. This is to comply with the suggested directory format of `electron-builder`: https://github.com/electron-userland/electron-builder#two-packagejson-structure * Step 2: add build directory with icon files for mac / windows * Step 3: move all development (web) assets into main directory * Step 4: add `build` namespace to dev `package.json` * Step 5: move all dev dependencies into dev file and get rid of old electron packagers in favor of `eletorn-builder` * Step 6: target build inside `app/` as everything else is excluded at build time * Step 7: remove old stuff! * Step 8: update README * turn off asar for `child_pty`
This commit is contained in:
parent
bacb60193f
commit
aaed99abac
66 changed files with 87 additions and 173 deletions
|
|
@ -1,4 +1 @@
|
|||
app/dist
|
||||
app/node_modules
|
||||
build
|
||||
dist
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,5 @@
|
|||
# build output
|
||||
dist
|
||||
build
|
||||
|
||||
# dependencies
|
||||
node_modules
|
||||
|
|
|
|||
25
README.md
25
README.md
|
|
@ -21,27 +21,24 @@ brew cask install hyperterm
|
|||
|
||||
## Contribute
|
||||
|
||||
To install `package.json` dependencies in a way where the native
|
||||
modules are built with `electron`, run:
|
||||
To test a certain git tree, clone and then run:
|
||||
|
||||
```bash
|
||||
./scripts/install.sh
|
||||
npm install
|
||||
npm run pack
|
||||
```
|
||||
|
||||
Then, you want to make sure `app/dist` is populated. I recommend
|
||||
running `webpack` with `--watch` so that any changes you make
|
||||
to the app are detected.
|
||||
then open the `./dist` folder to find the built binaries!
|
||||
|
||||
```bash
|
||||
cd app/
|
||||
npm install
|
||||
If you want to develop, run the above, and then you want to
|
||||
run webpack in `watch` mode:
|
||||
|
||||
```
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Then you can run in the main directory:
|
||||
and to load the application simply run:
|
||||
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
|
||||
...to launch the app!
|
||||
electron app/index.js
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1 +1,4 @@
|
|||
app/dist
|
||||
app/node_modules
|
||||
build
|
||||
dist
|
||||
|
|
|
|||
|
|
@ -28,9 +28,6 @@ if (isDev) {
|
|||
|
||||
const url = 'file://' + resolve(
|
||||
isDev ? __dirname : app.getAppPath(),
|
||||
// in prod version, we copy over index.html and dist from 'app'
|
||||
// into one dist folder to avoid unwanted files in package
|
||||
isDev ? 'app' : 'build',
|
||||
'index.html'
|
||||
);
|
||||
|
||||
|
|
@ -1,46 +1,25 @@
|
|||
{
|
||||
"name": "hyperterm-web",
|
||||
"version": "0.0.1",
|
||||
"description": "Web app that runs in the renderer process",
|
||||
"name": "hyperterm",
|
||||
"productName": "HyperTerm",
|
||||
"version": "0.7.0-beta",
|
||||
"license": "MIT",
|
||||
"author": "rauchg",
|
||||
"repository": "zeit/hyperterm",
|
||||
"description": "HTML/JS/CSS Terminal",
|
||||
"dependencies": {
|
||||
"aphrodite-simple": "0.4.1",
|
||||
"color": "^0.11.3",
|
||||
"hterm-umdjs": "1.1.3",
|
||||
"json-loader": "0.5.4",
|
||||
"mousetrap": "1.6.0",
|
||||
"child_pty": "3.0.1",
|
||||
"convert-css-color-name-to-hex": "0.1.1",
|
||||
"default-shell": "1.0.1",
|
||||
"electron-config": "0.2.1",
|
||||
"electron-is-dev": "0.1.1",
|
||||
"gaze": "1.1.0",
|
||||
"mkdirp": "0.5.1",
|
||||
"ms": "0.7.1",
|
||||
"object-values": "1.0.0",
|
||||
"react": "15.2.1",
|
||||
"react-addons-pure-render-mixin": "15.2.1",
|
||||
"react-deep-force-update": "2.0.1",
|
||||
"react-dom": "15.2.1",
|
||||
"react-redux": "4.4.5",
|
||||
"redux": "3.5.2",
|
||||
"redux-thunk": "2.1.0",
|
||||
"reselect": "2.5.3",
|
||||
"seamless-immutable": "6.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "6.10.1",
|
||||
"babel-core": "6.10.4",
|
||||
"babel-eslint": "6.1.2",
|
||||
"babel-loader": "6.2.4",
|
||||
"babel-preset-es2015-native-modules": "6.9.0",
|
||||
"babel-preset-react": "6.11.1",
|
||||
"eslint": "3.1.1",
|
||||
"eslint-config-standard": "5.3.5",
|
||||
"eslint-plugin-promise": "2.0.0",
|
||||
"eslint-plugin-react": "5.2.2",
|
||||
"eslint-plugin-standard": "2.0.0",
|
||||
"webpack": "2.1.0-beta.15"
|
||||
"shell-env": "0.1.2",
|
||||
"uid2": "0.0.3"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "standard",
|
||||
"plugins": [
|
||||
"react"
|
||||
],
|
||||
"rules": {
|
||||
"yoda": 0,
|
||||
"semi": [
|
||||
|
|
@ -55,26 +34,7 @@
|
|||
"before": false,
|
||||
"after": true
|
||||
}
|
||||
],
|
||||
"react/jsx-uses-react": 1,
|
||||
"react/jsx-uses-vars": 1
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"es2015-native-modules",
|
||||
"react"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "webpack --watch",
|
||||
"lint": "eslint .",
|
||||
"build": "NODE_ENV=production webpack",
|
||||
"test": "npm run lint"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
BIN
build/icon.ico
Normal file
BIN
build/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
78
package.json
78
package.json
|
|
@ -1,35 +1,48 @@
|
|||
{
|
||||
"name": "hyperterm",
|
||||
"productName": "HyperTerm",
|
||||
"version": "0.7.0-beta",
|
||||
"license": "MIT",
|
||||
"name": "hyperterm-web",
|
||||
"version": "0.0.1",
|
||||
"description": "Web app that runs in the renderer process",
|
||||
"repository": "zeit/hyperterm",
|
||||
"description": "HTML/JS/CSS Terminal",
|
||||
"dependencies": {
|
||||
"child_pty": "3.0.1",
|
||||
"convert-css-color-name-to-hex": "0.1.1",
|
||||
"default-shell": "1.0.1",
|
||||
"electron-config": "0.2.1",
|
||||
"electron-is-dev": "0.1.1",
|
||||
"gaze": "1.1.0",
|
||||
"mkdirp": "0.5.1",
|
||||
"aphrodite-simple": "0.4.1",
|
||||
"color": "^0.11.3",
|
||||
"hterm-umdjs": "1.1.3",
|
||||
"json-loader": "0.5.4",
|
||||
"mousetrap": "1.6.0",
|
||||
"ms": "0.7.1",
|
||||
"shell-env": "0.1.2",
|
||||
"uid2": "0.0.3"
|
||||
"object-values": "1.0.0",
|
||||
"react": "15.2.1",
|
||||
"react-addons-pure-render-mixin": "15.2.1",
|
||||
"react-deep-force-update": "2.0.1",
|
||||
"react-dom": "15.2.1",
|
||||
"react-redux": "4.4.5",
|
||||
"redux": "3.5.2",
|
||||
"redux-thunk": "2.1.0",
|
||||
"reselect": "2.5.3",
|
||||
"seamless-immutable": "6.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron-installer-debian": "0.3.0",
|
||||
"electron-packager": "7.3.0",
|
||||
"babel-cli": "6.10.1",
|
||||
"babel-core": "6.10.4",
|
||||
"babel-eslint": "6.1.2",
|
||||
"babel-loader": "6.2.4",
|
||||
"babel-preset-es2015-native-modules": "6.9.0",
|
||||
"babel-preset-react": "6.11.1",
|
||||
"electron-builder": "5.14.2",
|
||||
"electron-prebuilt": "1.2.8",
|
||||
"eslint": "3.1.1",
|
||||
"eslint-config-standard": "5.3.5",
|
||||
"eslint-plugin-promise": "2.0.0",
|
||||
"eslint-plugin-react": "5.2.2",
|
||||
"eslint-plugin-standard": "2.0.0",
|
||||
"husky": "0.11.4"
|
||||
"husky": "0.11.4",
|
||||
"webpack": "2.1.0-beta.15"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "standard",
|
||||
"plugins": [
|
||||
"react"
|
||||
],
|
||||
"rules": {
|
||||
"yoda": 0,
|
||||
"semi": [
|
||||
|
|
@ -44,14 +57,37 @@
|
|||
"before": false,
|
||||
"after": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"react/jsx-uses-react": 1,
|
||||
"react/jsx-uses-vars": 1
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"es2015-native-modules",
|
||||
"react"
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
"appId": "hyperterm",
|
||||
"app-category-type": "public.app-category.developer-tools",
|
||||
"asar": false
|
||||
},
|
||||
"scripts": {
|
||||
"start": "electron index",
|
||||
"lint": "eslint .",
|
||||
"dev": "webpack --watch",
|
||||
"lint": "eslint lib/ && eslint app/*.js",
|
||||
"build": "NODE_ENV=production webpack",
|
||||
"test": "npm run lint",
|
||||
"start": "electron app",
|
||||
"prepublish": "npm test",
|
||||
"prepush": "npm test",
|
||||
"test": "npm run lint"
|
||||
"postinstall": "install-app-deps",
|
||||
"pack": "npm run build && build --dir",
|
||||
"dist": "npm run build && build"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"name": "Hyperterm",
|
||||
"description":"HTML/JS/CSS Terminal",
|
||||
"dest": "./dist",
|
||||
"icon": "./static/icon.png",
|
||||
"version":"0.6.0",
|
||||
"maintainer":"Guillermo Rauch",
|
||||
"categories": [
|
||||
"Utility"
|
||||
],
|
||||
"depends": [
|
||||
"git",
|
||||
"gconf2",
|
||||
"gconf-service",
|
||||
"gvfs-bin",
|
||||
"libc6",
|
||||
"libcap2",
|
||||
"libgtk2.0-0",
|
||||
"libudev0 | libudev1",
|
||||
"libgcrypt11 | libgcrypt20",
|
||||
"libappindicator1",
|
||||
"libnotify4",
|
||||
"libnss3",
|
||||
"libxtst6",
|
||||
"python",
|
||||
"xdg-utils"
|
||||
],
|
||||
"lintianOverrides": [
|
||||
"changelog-file-missing-in-native-package"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Electron's version.
|
||||
export npm_config_target=1.2.3
|
||||
# The architecture of Electron, can be ia32 or x64.
|
||||
export npm_config_arch=x64
|
||||
# Download headers for Electron.
|
||||
export npm_config_disturl=https://atom.io/download/atom-shell
|
||||
# Tell node-pre-gyp that we are building for Electron.
|
||||
export npm_config_runtime=electron
|
||||
# Tell node-pre-gyp to build module from source code.
|
||||
export npm_config_build_from_source=true
|
||||
# Install all dependencies, and store cache to ~/.electron-gyp.
|
||||
HOME=~/.electron-gyp npm install
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
VERSION=`node -e 'process.stdout.write(require("./package").version)'`
|
||||
|
||||
if [ -z "$HYPERTERM_OSX_SIGNING_IDENTITY" ]; then
|
||||
echo "ENV var HYPERTERM_OSX_SIGNING_IDENTITY missing. Set it to the Common Name of the downloaded certificate from Apple."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf node_modules
|
||||
rm -rf ./app/node_modules
|
||||
rm -rf ./dist/*
|
||||
rm -rf ./build/
|
||||
mkdir build
|
||||
./scripts/install.sh
|
||||
npm run lint
|
||||
cd app
|
||||
npm install
|
||||
npm run lint
|
||||
npm run build
|
||||
cd -
|
||||
cp -r app/assets build/
|
||||
cp app/index.html build/
|
||||
cp -r app/dist build/
|
||||
mkdir dist
|
||||
electron-packager ./ --platform=darwin --out=dist --arch=x64 --app-bundle-id="co.zeit.hyperterm" --app-version="$VERSION" --extend-info=static/Info.plist --osx-sign.identity="$HYPERTERM_OSX_SIGNING_IDENTITY" --icon=static/icon.icns --prune --ignore=app/
|
||||
electron-packager ./ --platform=linux --arch=all --out=dist --app-version="$VERSION" --icon=static/icon.png --prune --ignore=app/
|
||||
electron-installer-debian --src ./dist/HyperTerm-linux-ia32/ --arch i386 --config ./scripts/config.json
|
||||
electron-installer-debian --src ./dist/HyperTerm-linux-x64/ --arch amd64 --config ./scripts/config.json
|
||||
cd dist/HyperTerm-darwin-x64/
|
||||
zip -r -q -y ../hyperterm-macos-x64-$VERSION.zip .
|
||||
cd -
|
||||
|
|
@ -8,7 +8,7 @@ module.exports = {
|
|||
devtool: isProd ? 'hidden-source-map' : 'cheap-eval-source-map',
|
||||
entry: './lib/index.js',
|
||||
output: {
|
||||
path: path.join(__dirname, './dist'),
|
||||
path: path.join(__dirname, 'app', 'dist'),
|
||||
filename: 'bundle.js'
|
||||
},
|
||||
module: {
|
||||
Loading…
Reference in a new issue