Skip to content

Commit

Permalink
add powershell script to run on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
osopromadze committed Oct 30, 2021
1 parent 9d7f8ef commit 765d1c0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions buildWindows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash -e

tsc

rm -r -fo ./build
mkdir -p build

yarn rollup ts-out/background.js --format iife --name 'background' --file build/background.js
yarn rollup ts-out/content.js --format iife --name 'background' --file build/content.js
yarn rollup ts-out/viewer.js --format iife --name 'background' --file build/viewer.js
cp src/viewer.css build/viewer.css
cp src/manifest.json build/manifest.json
cp license.txt build/license.txt
cp -r src/_locales build
cp src/icon*.png build

rm -fo ./jsonview.zip
pushd build
Compress-Archive -Path ./* -DestinationPath ../jsonview.zip
popd
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"license": "MIT",
"scripts": {
"start": "./build.sh",
"startWindows": "Powershell.exe -File ./buildWindows.ps1",
"lint": "tslint -p tsconfig.json",
"watch": "npm-watch"
"watch": "npm-watch",
"rollup": "rollup"
},
"watch": {
"start": {
Expand Down

0 comments on commit 765d1c0

Please sign in to comment.