Skip to content

Commit

Permalink
Merge pull request #2 from eperret/master
Browse files Browse the repository at this point in the history
updated to include support for linux. This commit fixes #1
  • Loading branch information
twardoch committed Aug 25, 2018
2 parents 21afe24 + 41dd0c2 commit b35958a
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 7 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: build-macos build-win32 build-win64
all: build-macos build-win32 build-win64 build-linux

prep: clean prep-git

Expand All @@ -15,6 +15,7 @@ prep-git:
#@rm -rf ./node_modules/svgo
@echo "Patching 'svgo' sources"
@cp ./src/lib/svgo/config.js ./lib/svgo/
@cp ./src/plugins/convertPathData.js ./plugins/
@echo "Assing pdf.js"
#@cp ./node_modules/pdfjs-dist/build/pdf.combined.js ./lib/
#@rm -rf ./node_modules/pdfjs-dist
Expand All @@ -30,12 +31,18 @@ prep-ship:
@rm -rf ./node_modules/svgo
@echo "Patching 'svgo' sources"
@cp ./src/lib/svgo/config.js ./lib/svgo/
@cp ./src/lib/svgo/plugin/convertPathData.js ./plugins/

build-macos: prep
@echo "Building 'svgop' for macOS ./bin/macos"
@mkdir -p ./bin/svgop-macos
@pkg -t macos-x64 --output=./bin/svgop-macos/svgop -c pkg.json ./src/svgop.js

build-linux: prep
@echo "Building 'svgop' for Linux ./bin/linux"
@mkdir -p ./bin/svgop-linux
@pkg -t linux-x64 --output=./bin/svgop-linux/svgop -c pkg.json ./src/svgop.js

build-win32: prep
@echo "Building 'svgop' for Windows x86 in ./bin/win32"
@mkdir -p ./bin/svgop-win32
Expand All @@ -50,12 +57,16 @@ install: build-macos
@echo "Installing /usr/loca/bin/svgop"
@cp ./bin/svgop-macos/svgop /usr/local/bin

package: package-macos package-win32 package-win64
package: package-macos package-win32 package-win64 package-linux

package-macos:
@mkdir -p dist
@cd ./bin; zip -r ../dist/svgop-macos.zip svgop-macos/; cd ..

package-linux:
@mkdir -p dist
@cd ./bin; zip -r ../dist/svgop-linux.zip svgop-linux/; cd ..

package-win32:
@mkdir -p dist
@cd ./bin; zip -r ../dist/svgop-win32.zip svgop-win32/; cd ..
Expand Down
1 change: 1 addition & 0 deletions bin/svgop-linux/noEvents.min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b35958a

Please sign in to comment.