diff --git a/.gitignore b/.gitignore index f1e9b41428..309362033d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ .DS_Store? .nyc_output/* converage/* -build/* +dist/* node_modules/* third_party/* test/data/* diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index e2307e7791..622df614c5 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -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 diff --git a/Makefile b/Makefile index 6182b48515..f137409bdf 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 git@github.com: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 git@github.com: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///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///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 '' diff --git a/electron-builder.yml b/electron-builder.yml index c26ee272fd..22dbf2353f 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -3,8 +3,7 @@ productName: Netron files: - 'src/**/*' directories: - buildResources: setup - output: ./build + buildResources: ./setup fileAssociations: - name: "Arm NN Model" ext: armnn @@ -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 diff --git a/package.json b/package.json index 1f041af537..d53a1708a4 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/setup.cfg b/setup.cfg index 97e36f76d0..cfb96bc2ac 100755 --- a/setup.cfg +++ b/setup.cfg @@ -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