Skip to content

Commit

Permalink
added packing tool
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-j committed Jun 21, 2016
1 parent 83c6b30 commit 0587849
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules/
extension/fimfic2epub.js


extension.crx
extension.pem
25 changes: 25 additions & 0 deletions pack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

PATH=node_modules/.bin:$PATH

gulp -p

CHROME=`command -v chrome || command -v chromium`

rm -f extension.crx

code=-1

if [ ! -f extension.pem ]; then
echo "Packing chrome extension and generating private key..."
"${CHROME}" --pack-extension=extension
code=$?
else
echo "Packing chrome extension with existing key..."
"${CHROME}" --pack-extension=extension --pack-extension-key=extension.pem
code=$?
fi

if [ ! -f extension.crx ]; then
echo "Something went wrong, Chrome error code ${code}"
fi
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"version": "1.0.0",
"description": "",
"author": "djazz",
"scripts": {
"pack": "./pack.sh"
},
"dependencies": {
"escape-string-regexp": "^1.0.5",
"file-saver": "^1.3.2",
Expand Down
17 changes: 0 additions & 17 deletions src/coverstyle.css

This file was deleted.

0 comments on commit 0587849

Please sign in to comment.