Skip to content

Commit

Permalink
Merge pull request #1 from hckrnews/feature/phase1
Browse files Browse the repository at this point in the history
Feature/phase1
  • Loading branch information
w3nl committed Nov 20, 2020
2 parents 316dec3 + 76239ab commit 98e0c73
Show file tree
Hide file tree
Showing 19 changed files with 12,542 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# W3news config file

root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 4
18 changes: 18 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": [
"@hckrnews/eslint-config"
],
"rules": {
"consistent-return": "warn",
"eqeqeq": "warn"
},
"env": {
"es6": true,
"node": true,
"jquery": false,
"browser": true
},
"parserOptions": {
"sourceType": "module"
}
}
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

patreon: w3news
27 changes: 27 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Node CI

on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.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, build, and test
run: |
npm ci
npm run build --if-present
npm run lint
npm test
env:
CI: true
33 changes: 33 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
sudo: true
dist: trusty
addons:
language: node_js
node_js:
- "10"
- "12"
- "14"
before_script:
- npm run lint
after_script:
- npm run coveralls
git:
depth: 10
cache:
yarn: true
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pieter Wigboldus <npm@w3news.org>
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# openapi-routes
# OpenAPI routes

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-stats] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Codecov Status][codecov-image]][codecov-url] [![Scrutinizer Code Quality][scrutinizer-image]][scrutinizer-url]

...

[downloads-image]: https://img.shields.io/npm/dm/@hckrnews/openapi-routes.svg
[npm-url]: https://www.npmjs.com/package/@hckrnews/openapi-routes
[npm-image]: https://img.shields.io/npm/v/@hckrnews/openapi-routes.svg
[npm-stats]: https://npm-stat.com/charts.html?package=@hckrnews/openapi-routes
[travis-url]: https://travis-ci.org/hckrnews/openapi-routes
[travis-image]: https://img.shields.io/travis/hckrnews/openapi-routes/main.svg
[coveralls-url]: https://coveralls.io/r/hckrnews/openapi-routes
[coveralls-image]: https://img.shields.io/coveralls/hckrnews/openapi-routes/main.svg
[codecov-url]: https://codecov.io/gh/hckrnews/openapi-routes
[codecov-image]: https://img.shields.io/codecov/c/github/hckrnews/openapi-routes.svg
[scrutinizer-url]: https://scrutinizer-ci.com/g/hckrnews/openapi-routes/?branch=main
[scrutinizer-image]: https://scrutinizer-ci.com/g/hckrnews/openapi-routes/badges/quality-score.png?b=main
12 changes: 12 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: true,
},
},
],
],
};
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0.1.0 - 2020-11-18
=====

* Start with the project.
20 changes: 20 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json'],

transform: {
'^.+\\.js?$': 'babel-jest',
},

transformIgnorePatterns: ['/node_modules/'],

moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},

testMatch: ['**/__tests__/*.js'],

testURL: 'http://localhost/',

collectCoverage: true,
collectCoverageFrom: ['src/**/*.js'],
};

0 comments on commit 98e0c73

Please sign in to comment.