enable CI

This commit is contained in:
Junxiao Shi 2020-07-18 08:44:56 -04:00 committed by AJ ONeal
parent 1d586cec01
commit 8c603b62de
Signed by: coolaj86
GPG Key ID: F1D692A76F70CF98
5 changed files with 24 additions and 23 deletions

17
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: build
on: [push]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14"
- run: npm install
- run: npm run build
- name: check dist files
run: |
[[ $(git status --porcelain | tee /dev/stderr | wc -l) -eq 0 ]]
- run: npm test

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/package-lock.json
*.gz *.gz
# ---> Node # ---> Node

View File

@ -2,9 +2,9 @@
# TODO convert to JS # TODO convert to JS
cat parser.js packer.js > all.tmp.js cat parser.js packer.js > all.tmp.js
sed -i '' '/use strict/d' all.tmp.js sed -i '/use strict/d' all.tmp.js
sed -i '' '/require/d' all.tmp.js sed -i '/require/d' all.tmp.js
sed -i '' '/exports/d' all.tmp.js sed -i '/exports/d' all.tmp.js
echo ';(function () {' > dist/asn1.js echo ';(function () {' > dist/asn1.js
echo "'use strict';" >> dist/asn1.js echo "'use strict';" >> dist/asn1.js

19
package-lock.json generated
View File

@ -1,19 +0,0 @@
{
"name": "@root/asn1",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@root/encoding": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@root/encoding/-/encoding-1.0.1.tgz",
"integrity": "sha512-OaEub02ufoU038gy6bsNHQOjIn8nUjGiLcaRmJ40IUykneJkIW5fxDqKxQx48cszuNflYldsJLPPXCrGfHs8yQ=="
},
"@root/pem": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@root/pem/-/pem-1.0.3.tgz",
"integrity": "sha512-6iFwsbwm6YzWdfjogHzLTYkA1KWdeEkutVX2BBVfhyWoE9q0vp89G7mAcLIhi0QTRd199AMOacHWFq+gTyQkVA==",
"dev": true
}
}
}

View File

@ -13,6 +13,7 @@
"dist" "dist"
], ],
"scripts": { "scripts": {
"build": "bash build.sh",
"test": "node tests" "test": "node tests"
}, },
"repository": { "repository": {
@ -28,7 +29,8 @@
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)", "author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
"license": "MPL-2.0", "license": "MPL-2.0",
"devDependencies": { "devDependencies": {
"@root/pem": "^1.0.3" "@root/pem": "^1.0.4",
"uglify-js": "^3.10.0"
}, },
"dependencies": { "dependencies": {
"@root/encoding": "^1.0.1" "@root/encoding": "^1.0.1"