Skip to content

Commit

Permalink
Build to dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Dec 14, 2019
1 parent 5725b36 commit 27c0550
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.DS_Store?
.nyc_output/*
converage/*
build/*
dist/*
node_modules/*
third_party/*
test/data/*
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npx electron ./

To debug the Electron app use [Visual Studio Code](https://code.visualstudio.com) and install the [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) extension. Open the `./netron` root folder and press `F5`. To attach the debugger to a render process select the `Debug` tab and `Debug Renderer Process` before launching.

To build Electron release binaries to the `./build` folder run:
To build Electron release binaries to the `./dist` folder run:

```bash
npx electron-builder --mac --linux --win
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ install:
npm install

clean:
rm -rf ./build
rm -rf ./dist

reset:
rm -rf ./build
rm -rf ./dist
rm -rf ./node_modules
rm -rf ./third_party
rm -rf ./package-lock.json
Expand Down Expand Up @@ -86,16 +86,16 @@ publish_github_electron:
publish_github_pages:
@[ -d node_modules ] || npm install
python3 ./setup.py build --version
rm -rf ./build/gh-pages
git clone [email protected]:lutzroeder/netron.git ./build/gh-pages --branch gh-pages
rm -rf ./build/gh-pages/*
cp -R ./build/lib/netron/* ./build/gh-pages/
rm -rf ./build/gh-pages/*.py*
rm -rf ./dist/gh-pages
git clone [email protected]:lutzroeder/netron.git ./dist/gh-pages --branch gh-pages
rm -rf ./dist/gh-pages/*
cp -R ./dist/lib/netron/* ./dist/gh-pages/
rm -rf ./dist/gh-pages/*.py*
@export PACKAGE_VERSION=`node -pe "require('./package.json').version"`; \
sed -i -e "s/<!-- meta -->/<meta name='version' content='$$PACKAGE_VERSION' \/>/g" ./build/gh-pages/index.html
git -C ./build/gh-pages add --all
git -C ./build/gh-pages commit --amend --no-edit
git -C ./build/gh-pages push --force origin gh-pages
sed -i -e "s/<!-- meta -->/<meta name='version' content='$$PACKAGE_VERSION' \/>/g" ./dist/gh-pages/index.html
git -C ./dist/gh-pages add --all
git -C ./dist/gh-pages commit --amend --no-edit
git -C ./dist/gh-pages push --force origin gh-pages

publish_cask:
@curl -H "Authorization: token $(GITHUB_TOKEN)" https://api.github.com/repos/Homebrew/homebrew-cask/forks -d ''
Expand Down
5 changes: 2 additions & 3 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ productName: Netron
files:
- 'src/**/*'
directories:
buildResources: setup
output: ./build
buildResources: ./setup
fileAssociations:
- name: "Arm NN Model"
ext: armnn
Expand Down Expand Up @@ -54,7 +53,7 @@ fileAssociations:
ext: tflite
- name: "TensorFlow Lite Model"
ext: tfl
afterSign: "setup/notarize.js"
afterSign: "./setup/notarize.js"
publish:
- provider: github
releaseType: release
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "src/app.js",
"scripts": {
"start": "[ -d node_modules ] || npm install && npx electron .",
"start_server": "[ -d node_modules ] || npm install && python3 setup.py --quiet build && PYTHONPATH=build/lib python3 -c 'import netron; netron.main()' $@"
"start_server": "[ -d node_modules ] || npm install && python3 setup.py --quiet build && PYTHONPATH=./dist/lib python3 -c 'import netron; netron.main()' $@"
},
"dependencies": {
"d3": "5.14.2",
Expand Down
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build]
build-base = ./build
build-lib = ./build/lib
build-base = ./dist
build-lib = ./dist/lib

[bdist_wheel]
universal=1
dist-dir = ./build/dist
dist-dir = ./dist/dist

[egg_info]
egg_base = ./build
egg_base = ./dist

0 comments on commit 27c0550

Please sign in to comment.