Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

Commit

Permalink
updated some dependencies and build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
JoJordens committed Dec 14, 2018
1 parent 875c286 commit fb0a4cf
Show file tree
Hide file tree
Showing 14 changed files with 2,250 additions and 1,175 deletions.
27 changes: 27 additions & 0 deletions .bin/builder-js.sh
@@ -0,0 +1,27 @@
#!/bin/bash

export NODE_ENV=production

rm -R app
mkdir app
mkdir app/css
touch app/css/style.css
mkdir app/js
touch app/js/app.js

cp src/app/html/index.html app/index.html

cp -r src/app/images app/images

echo "starting browserify"
node_modules/.bin/browserify -e src/app/js/index.js -o "app/js/app.js" -t [ babelify ]

cp node_modules/codemirror/lib/codemirror.css src/app/css/_codemirror.css
echo "starting node-sass"
node_modules/.bin/node-sass src/app/css -o app/css
rm src/app/css/_codemirror.css

# echo "starting uglifyjs"
# node_modules/.bin/uglifyjs -m -c -o app/js/app.js app/js/app.js

echo "done"
14 changes: 14 additions & 0 deletions .bin/builder.sh
@@ -0,0 +1,14 @@
#!/bin/bash

export NODE_ENV=production

rm -rf dist

bash .bin/builder-js.sh

cp -r src/electron/* app

echo "starting electron-packager"
node_modules/.bin/electron-builder -mlw

echo "done"
14 changes: 4 additions & 10 deletions .bin/electron-build.sh
@@ -1,13 +1,7 @@
#!/bin/bash

bash .bin/build.sh
bash .bin/builder-js.sh

echo "copying package.json"
cp build_package.json app/package.json
cd app
echo "installing dependencies"
yarn
cd ..
echo "packaging asar"
node_modules/.bin/asar p app app.asar
echo "done"
cp -r src/electron/* app

node_modules/.bin/electron .
20 changes: 0 additions & 20 deletions .bin/package.sh

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -5,4 +5,5 @@ node_modules/
/packages/
DS_Store
idea
.vscode
.vscode
dist
15 changes: 6 additions & 9 deletions README.md
Expand Up @@ -9,22 +9,17 @@ certain topic and/or lets you send socket messages to the server
---

##### Install node modules
`$ yarn install`
`$ npm i`

##### Build and open in browser
`$ yarn run dev`
`$ npm run dev`

##### Build and open as electron app
* build
`$ yarn run build`
* and run electron
`$ node_modules/.bin/electron .`

##### build asar file
`$ yarn run electron-build`
`$ npm run electron-build`

##### package all application versions for distribution (win, linux, macos)
`$ yarn run package`
`$ npm run package-builder`

---

Expand All @@ -35,6 +30,8 @@ certain topic and/or lets you send socket messages to the server
## socket.io test server

start test server by running `node socketTest/index.js`
or
`npm run server`

### events
* 'chat message': echoes mesages
Expand Down
4 changes: 4 additions & 0 deletions electron-builder.yaml
@@ -0,0 +1,4 @@
productName: socket.io tester
directories:
buildResources: icons
output: dist
Binary file added icons/icon.icns
Binary file not shown.
Binary file added icons/icon.ico
Binary file not shown.

0 comments on commit fb0a4cf

Please sign in to comment.