Skip to content

Commit

Permalink
Merge pull request #22 from hckrnews/feature/build
Browse files Browse the repository at this point in the history
Add build process for old systems
  • Loading branch information
pieter-pon authored Feb 21, 2023
2 parents d6b8207 + 3d999ca commit f5b1f98
Show file tree
Hide file tree
Showing 18 changed files with 5,706 additions and 15,747 deletions.
42 changes: 42 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"root": true,
"env": {
"es6": true,
"node": true,
"browser": false
},
"plugins": [
"import"
],
"extends": [
"@hckrnews/eslint-config"
],
"rules": {
"import/extensions": [
"error",
"ignorePackages",
{
"js": "always"
}
]
},
"parserOptions": {
"sourceType": "module"
},
"settings": {
"jsdoc": {
"mode": "typescript"
}
},
"overrides": [
{
"files": [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
"env": {
"jest": true
}
}
]
}
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

github: [w3nl]
patreon: w3news
buymeacoffee: https://www.buymeacoffee.com/hckrnews
6 changes: 3 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:

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

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install, lint, and test
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm ci
- run: npm run vulnerabilities
- run: npm run lint
Expand All @@ -21,12 +21,13 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci --production
- run: npm ci
- run: npm run build --if-present
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
6 changes: 3 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:

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

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install, lint, and test
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ yarn-error.log*
*.sln
*.sw?
.dccache

report.json
report/
test-report.xml
test-reports/
3 changes: 2 additions & 1 deletion .jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"ignore": [
"**/__snapshots__/**",
"**/__tests__/**",
"**/__fixtures__/**"
"**/__fixtures__/**",
"**/*.test.js"
],
"absolute": true,
"gitignore": true
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.0
18.14.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ or
## Usage

```javascript
import Enum from '@hckrnews/enum'
import { Enum } from '@hckrnews/enum'

class Example extends Enum {
static test = 'TEXT'
Expand Down
13 changes: 0 additions & 13 deletions babel.config.cjs

This file was deleted.

30 changes: 0 additions & 30 deletions jest.config.cjs

This file was deleted.

16 changes: 16 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"checkJs": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"rootDirs": [
"src"
],
"resolveJsonModule": true
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
Loading

0 comments on commit f5b1f98

Please sign in to comment.