-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86927a0
commit 1153084
Showing
11 changed files
with
328 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Index and build site | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: "0 */2 * * *" | ||
|
||
jobs: | ||
index: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js 12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Setup git user | ||
run: | | ||
git config user.email "<>" | ||
git config user.name "${GITHUB_ACTOR}" | ||
- name: Setup gh-pages branch | ||
run: | | ||
git checkout gh-pages || (git checkout --orphan gh-pages && git reset && touch .nojekyll && git add .nojekyll && git commit -m "gh-pages init" && git clean -fdx) | ||
git checkout - | ||
- name: Setup gh-pages worktree | ||
run: | | ||
git worktree add build gh-pages || echo "build worktree exists" | ||
- name: NPM install | ||
run: | | ||
npm i | ||
- name: Build index and site | ||
env: | ||
GH_TOKEN: ${{secrets.GH_TOKEN}} | ||
run: | | ||
npm run clean | ||
npm run build | ||
- name: Commit and push gh-pages | ||
run: | | ||
cd build | ||
git add . | ||
git commit -m "Building gh-pages from ${GITHUB_SHA}" | ||
git push https://wesleytodd:${{secrets.GH_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Publish GPR Package | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
publish-gpr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup git user | ||
run: | | ||
git config user.email "<>" | ||
git config user.name "${GITHUB_ACTOR}" | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: '@expressjs' | ||
- name: NPM Install | ||
run: npm i | ||
- name: NPM Version | ||
run: npm version prerelease --preid="${GITHUB_SHA}" | ||
- name: NPM Publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}} | ||
- name: Push version and tag | ||
run: | | ||
git push https://wesleytodd:${{secrets.GH_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Run Tests | ||
on: [push] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: npm install and test | ||
run: | | ||
npm it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package-lock.json | ||
build | ||
data.db | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# dotenv environment variables file | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(The MIT License) | ||
|
||
Copyright (c) 2019 Wes Todd <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
'Software'), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/env node | ||
'use strict' | ||
const { cli } = require('@pkgjs/statusboard') | ||
|
||
// Construct the cli | ||
cli(require('..'), process.argv.slice(2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
'use strict' | ||
const path = require('path') | ||
const statusboard = require('@pkgjs/statusboard') | ||
|
||
module.exports = async (c) => { | ||
const board = await statusboard(await config(c)) | ||
return board | ||
} | ||
|
||
const config = module.exports.config = async (c = {}) => { | ||
const buildDir = path.join(__dirname, 'build') | ||
|
||
return Object.assign({ | ||
// Status Board Config | ||
db: path.join(buildDir, 'data', 'data.db'), | ||
baseUrl: '/statusboard', | ||
outputDirectory: buildDir, | ||
|
||
// Project configs | ||
title: 'Express', | ||
description: '', | ||
|
||
issueTags: { | ||
topPriority: 'top priority', | ||
goodFirstIssue: 'good first issue', | ||
helpWanted: 'help wanted', | ||
discuss: 'discuss' | ||
}, | ||
|
||
projects: [ | ||
'expressjs/express', | ||
'expressjs/cors', | ||
'expressjs/morgan', | ||
'expressjs/response-time', | ||
'expressjs/session', | ||
'expressjs/multer', | ||
'expressjs/body-parser', | ||
'expressjs/compression', | ||
'expressjs/serve-static', | ||
'expressjs/errorhandler', | ||
'expressjs/serve-index', | ||
'expressjs/csurf', | ||
'expressjs/timeout', | ||
'expressjs/flash', | ||
'expressjs/vhost', | ||
|
||
'pillarjs/router', | ||
'pillarjs/cookies', | ||
'pillarjs/send', | ||
'pillarjs/finalhandler', | ||
'pillarjs/path-to-regexp', | ||
|
||
'jshttp/cookie', | ||
'jshttp/fresh', | ||
'jshttp/content-disposition', | ||
'jshttp/mime-db', | ||
'jshttp/media-typer', | ||
'jshttp/range-parser', | ||
'jshttp/type-is', | ||
'jshttp/accepts', | ||
'jshttp/negotiator', | ||
'jshttp/mime-types', | ||
'jshttp/compressible', | ||
'jshttp/content-type', | ||
'jshttp/http-errors', | ||
'jshttp/proxy-addr', | ||
'jshttp/etag', | ||
'jshttp/forwarded', | ||
'jshttp/on-finished', | ||
'jshttp/on-headers', | ||
'jshttp/vary', | ||
'jshttp/basic-auth', | ||
'jshttp/methods', | ||
'jshttp/statuses' | ||
], | ||
|
||
teams: { | ||
technicalCommitee: [{ | ||
name: 'Doug Wilson', | ||
github: 'dougwilson', | ||
npm: 'dougwilson', | ||
twitter: 'blipsofadoug', | ||
email: '[email protected]' | ||
}, { | ||
name: 'Jonathan Ong', | ||
github: 'jonathanong', | ||
npm: 'jongleberry', | ||
twitter: 'jongleberry', | ||
email: '[email protected]', | ||
avatar: '6e33cc0412b61cc01daac23c8989003c' | ||
}, { | ||
name: 'Jeremiah Senkpiel', | ||
github: 'fishrock123', | ||
npm: 'fishrock123', | ||
twitter: 'fishrock123', | ||
email: '[email protected]' | ||
}, { | ||
name: 'Alex Kocharin', | ||
github: 'rlidwka', | ||
npm: 'rlidwka', | ||
twitter: 'rlidwka', | ||
email: '[email protected]' | ||
}, { | ||
name: 'Linus Unnebäck', | ||
github: 'LinusU', | ||
npm: 'linusu', | ||
twitter: 'LinusU', | ||
email: '[email protected]' | ||
}, { | ||
name: 'Wes Todd', | ||
github: 'wesleytodd', | ||
npm: 'wesleytodd', | ||
twitter: 'wesleytodd', | ||
email: '[email protected]' | ||
}] | ||
} | ||
}, c) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "@expressjs/statusboard", | ||
"version": "1.0.0", | ||
"description": "Express project StatusBoard", | ||
"author": "Wes Todd <[email protected]>", | ||
"keywords": [ | ||
"statusboard", | ||
"express" | ||
], | ||
"license": "MIT", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/expressjs/statusboard.git" | ||
}, | ||
"bin": { | ||
"exsb": "./bin/exsb" | ||
}, | ||
"scripts": { | ||
"test": "standard && mocha", | ||
"prepublushOnly": "npm t", | ||
"build": "./bin/exsb build", | ||
"clean": "rm -rf build/css build/js" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^6.2.0", | ||
"standard": "^13.1.0" | ||
}, | ||
"dependencies": { | ||
"@pkgjs/statusboard": "0.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict' | ||
const { describe, it } = require('mocha') | ||
const assert = require('assert') | ||
const pkg = require('../package.json') | ||
const exsb = require('../') | ||
|
||
describe(pkg.name, () => { | ||
it('should create a configured statusboard instance', async () => { | ||
const sb = await exsb() | ||
assert.deepStrictEqual(sb.config, await exsb.config()) | ||
assert.strictEqual(typeof sb.buildIndex, 'function') | ||
assert.strictEqual(typeof sb.buildSite, 'function') | ||
}) | ||
}) |