Skip to content

Commit

Permalink
Merge pull request #434 from KaiVolland/requestparams
Browse files Browse the repository at this point in the history
Introduces `requestParams`
  • Loading branch information
KaiVolland authored Sep 8, 2022
2 parents 6995b9b + 0b77443 commit c39b92a
Show file tree
Hide file tree
Showing 14 changed files with 18,405 additions and 10,957 deletions.
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint nyc coverage output
coverage

.eslintrc.js
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
extends: '@terrestris/eslint-config-typescript',
rules: {
'no-underscore-dangle': 'off',
camelcase: [
'off',
{
ignoreImports: true
}
]
}
};
50 changes: 50 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test Pull Request

on: pull_request

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies ⏬
run: npm install

- name: Lint code 💄
run: npm run lint

- name: Typecheck code 🤖
run: npm run typecheck

- name: Test code ✅
run: npm run test

- name: Build artifacts 🏗️
run: npm run build

- name: Publish to coveralls ⭐
# coverage/lcov.info was generated in the previous npm run build step
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/on-push-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Test Push to Master

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies ⏬
run: npm install

- name: Lint code 💄
run: npm run lint

- name: Typecheck code 🤖
run: npm run typecheck

- name: Test code ✅
run: npm run test

- name: Build artifacts 🏗️
run: npm run build

- name: Publish to coveralls ⭐
# coverage/lcov.info was generated in the previous npm run build step
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 6 additions & 6 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
"presets": [
"@babel/preset-env",
"@babel/preset-typescript"
presets: [
'@babel/env',
'@babel/preset-typescript'
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread"
plugins: [
'@babel/proposal-class-properties',
'@babel/proposal-object-rest-spread'
]
};
18 changes: 10 additions & 8 deletions browser-build.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
const TerserPlugin = require('terser-webpack-plugin');
require('@babel/polyfill');

module.exports = {
mode: 'production',
entry: [
"./src/polyfills.ts",
"./src/WfsDataParser.ts"
'@babel/polyfill',
'whatwg-fetch',
'./src/WfsDataParser.ts'
],
output: {
filename: "wfsDataParser.js",
path: __dirname + "/browser",
library: "GeoStylerWfsParser"
filename: 'wfsDataParser.js',
path: __dirname + '/browser',
library: 'GeoStylerWfsParser',
chunkFormat: 'array-push'
},
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: [".ts", ".js", ".json"]
extensions: ['.ts', '.js', '.json']
},
optimization: {
minimizer: [
Expand All @@ -22,13 +25,12 @@ module.exports = {
},
module: {
rules: [
// All files with a '.ts'
{
test: /\.ts$/,
include: __dirname + '/src',
use: [
{
loader: require.resolve('ts-loader'),
loader: 'babel-loader',
},
],
}
Expand Down
26 changes: 14 additions & 12 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
module.exports = {
"moduleFileExtensions": [
"ts",
"js"
moduleFileExtensions: [
'ts',
'js'
],
"transform": {
"^.+\\.ts$": "<rootDir>/node_modules/babel-jest"
transform: {
'^.+\\.ts$': '<rootDir>/node_modules/babel-jest'
},
"testRegex": "/src/.*\\.spec.(ts|js)$",
"collectCoverageFrom": [
"src/WfsDataParser.ts"
testRegex: '/src/.*\\.spec.(ts|js)$',
collectCoverageFrom: [
'src/WfsDataParser.ts'
],
"automock": false,
"setupFiles": [
"<rootDir>/src/setupTests.ts"
automock: false,
setupFiles: [
'<rootDir>/src/setupTests.ts'
],
"testURL": "http://localhost/"
testEnvironmentOptions: {
'url': 'http://localhost/'
}
};
Loading

0 comments on commit c39b92a

Please sign in to comment.