-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.sh
executable file
·30 lines (21 loc) · 1008 Bytes
/
package.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash -e
rm -rf node_modules
mkdir node_modules
# If you have npm production dependencies, uncomment the following line
npm install --production
shasum --algorithm 256 manifest.json package.json *.js LICENSE README.md > SHA256SUMS
find css -type f -exec shasum --algorithm 256 {} \; >> SHA256SUMS
find js -type f -exec shasum --algorithm 256 {} \; >> SHA256SUMS
find images -type f -exec shasum --algorithm 256 {} \; >> SHA256SUMS
find src -type f -exec shasum --algorithm 256 {} \; >> SHA256SUMS
find views -type f -exec shasum --algorithm 256 {} \; >> SHA256SUMS
# If you have npm production dependencies, uncomment the following line
find node_modules \( -type f -o -type l \) -exec shasum --algorithm 256 {} \; >> SHA256SUMS
TARFILE=`npm pack`
# If you have npm production dependencies, uncomment the following 3 lines
tar xzf ${TARFILE}
cp -r node_modules ./package
tar czf ${TARFILE} package
shasum --algorithm 256 ${TARFILE} > ${TARFILE}.sha256sum
rm -rf SHA256SUMS package
npm install