Selaa lähdekoodia

Build to dist folder

Lutz Roeder 6 vuotta sitten
vanhempi
sitoutus
27c05501d3
6 muutettua tiedostoa jossa 20 lisäystä ja 21 poistoa
  1. 1 1
      .gitignore
  2. 1 1
      DEVELOPMENT.md
  3. 11 11
      Makefile
  4. 2 3
      electron-builder.yml
  5. 1 1
      package.json
  6. 4 4
      setup.cfg

+ 1 - 1
.gitignore

@@ -2,7 +2,7 @@
 .DS_Store?
 .nyc_output/*
 converage/*
-build/*
+dist/*
 node_modules/*
 third_party/*
 test/data/*

+ 1 - 1
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

+ 11 - 11
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 [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 ''

+ 2 - 3
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

+ 1 - 1
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",

+ 4 - 4
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