Skip to content

Commit acbc916

Browse files
Merge pull request #3 from mayflower-tech/develop
Develop
2 parents ec7d824 + 0c3dd6b commit acbc916

23 files changed

+3075
-384
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Node.js Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
packages: write
12+
contents: read
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
cache: yarn
19+
registry-url: 'https://registry.npmjs.org'
20+
- run: yarn install --immutable
21+
- run: yarn build
22+
- run: yarn npm publish --tag alpha
23+
env:
24+
YARN_NPM_AUTH_TOKEN: ${{secrets.YARN_NPM_AUTH_TOKEN}}

.gitignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,16 @@
33
*.crt
44

55
.DS_Store
6-
node_modules
6+
node_modules
7+
.idea
8+
dist
9+
10+
# yarn
11+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
12+
.pnp.*
13+
.yarn/*
14+
!.yarn/patches
15+
!.yarn/plugins
16+
!.yarn/releases
17+
!.yarn/sdks
18+
!.yarn/versions

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@mayflower-tech:registry=https://npm.pkg.github.com

.prettierrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"printWidth": 120
4+
}

.yarn/releases/yarn-3.4.1.cjs

Lines changed: 873 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.4.1.cjs

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Release
2+
3+
- Change the version in the package.json
4+
- Commit the changes
5+
- Tag last commit with tag `v${version}`
6+
- Push changes and tags
7+
- Create release on github releases with this tag
8+
- Publish it
9+
- Publish workflow should trigger and publish new version

certify.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fi
1919

2020
# Generate Certificate Authority
2121
openssl genrsa -out "tmp/${name}CA.key" 2048 &>/dev/null
22-
openssl req -x509 -config utils/ca.conf -new -nodes -key "tmp/${name}CA.key" -sha256 -days 1825 -out "${name}CA.pem" &>/dev/null
22+
openssl req -x509 -config utils/ca.conf -new -nodes -key "tmp/${name}CA.key" -sha256 -days 825 -out "${name}CA.pem" &>/dev/null
2323

2424
# This is the part that demands root privileges
2525
if [ "$EUID" -eq 0 ] ; then
@@ -36,7 +36,7 @@ openssl genrsa -out "${name}.key" 2048 &>/dev/null
3636
openssl req -new -config utils/ca.conf -key "${name}.key" -out "tmp/${name}.csr" &>/dev/null
3737

3838
# Generate SSL Certificate
39-
openssl x509 -req -in "tmp/${name}.csr" -CA "${name}CA.pem" -CAkey "tmp/${name}CA.key" -CAcreateserial -out "${name}.crt" -days 1825 -sha256 -extfile utils/ssl.conf &>/dev/null
39+
openssl x509 -req -in "tmp/${name}.csr" -CA "${name}CA.pem" -CAkey "tmp/${name}CA.key" -CAcreateserial -out "${name}.crt" -days 825 -sha256 -extfile utils/ssl.conf &>/dev/null
4040

4141
# Cleanup files
4242
rm servorCA.pem servorCA.srl

cli.js

Lines changed: 0 additions & 99 deletions
This file was deleted.

package.json

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,51 @@
11
{
2-
"name": "servor",
3-
"version": "4.0.2",
4-
"description": "A dependency free dev server for single page app development",
5-
"repository": "lukejacksonn/servor",
6-
"main": "./servor.js",
7-
"bin": {
8-
"servor": "./cli.js"
2+
"name": "@mayflower-tech/servor",
3+
"version": "5.0.0-alpha.7",
4+
"description": "A dev server for single page app development",
5+
"repository": "@mayflower-tech/servor",
6+
"publishConfig": {
7+
"access": "public"
98
},
9+
"type": "commonjs",
10+
"main": "./dist/servor.js",
11+
"bin": "./dist/cli.js",
1012
"keywords": [
1113
"server",
1214
"https",
1315
"livereload",
1416
"spa"
1517
],
18+
"files": [
19+
"dist/**/*",
20+
"src/**/*"
21+
],
1622
"scripts": {
17-
"start": "sudo node cli tests/example --reload --browse --secure --static --module",
23+
"start": "SWC_NODE_PROJECT=./tsconfig.json node -r @swc-node/register src/cli.ts tests/example index.html 8081 --reload --browse",
24+
"build": "tsc",
1825
"cleanup": "rm -f servor.key servor.crt",
1926
"test": "npm run cleanup && cd tests && node index.js"
2027
},
2128
"author": "Luke Jackson <[email protected]>",
2229
"license": "MIT",
2330
"devDependencies": {
24-
"puppeteer": "^3.0.4"
31+
"@swc-node/register": "^1.6.4",
32+
"@swc/core": "^1.3.53",
33+
"@types/http-proxy": "^1.17.10",
34+
"@types/node": "^18.14.6",
35+
"prettier": "^2.8.7",
36+
"puppeteer": "^3.0.4",
37+
"typescript": "^4.9.5"
38+
},
39+
"dependencies": {
40+
"chokidar": "^3.5.3",
41+
"commander": "^10.0.1",
42+
"http-proxy": "^1.18.1"
43+
},
44+
"packageManager": "[email protected]",
45+
"prettier": {
46+
"printWidth": 120,
47+
"singleQuote": true,
48+
"trailingComma": "es5",
49+
"endOfLine": "auto"
2550
}
2651
}

0 commit comments

Comments
 (0)