added packing tool

This commit is contained in:
daniel-j 2016-06-21 13:38:30 +02:00
parent 83c6b3061c
commit 0587849429
4 changed files with 30 additions and 19 deletions

4
.gitignore vendored
View file

@ -1,4 +1,4 @@
node_modules/
extension/fimfic2epub.js
extension.crx
extension.pem

25
pack.sh Executable file
View file

@ -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

View file

@ -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",

View file

@ -1,17 +0,0 @@
@page {
padding: 0;
margin: 0;
}
html,
body {
padding: 0;
margin: 0;
height: 100%;
}
#cover {
width: 100%;
height: 100%;
display: block;
margin: 0;
padding: 0;
}