Skip to content

Commit d9b7dcf

Browse files
committed
Update module
1 parent 5d3e46e commit d9b7dcf

File tree

16 files changed

+1548
-1397
lines changed

16 files changed

+1548
-1397
lines changed

.eslintrc

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

.eslintrc.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"ignorePatterns": [
3+
"src/**"
4+
],
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:node/recommended"
8+
],
9+
"parserOptions": {
10+
"ecmaVersion": 2022
11+
},
12+
"env": {
13+
"node": true,
14+
"es6": true
15+
},
16+
"rules": {
17+
"arrow-parens": ["error", "always"],
18+
"no-trailing-spaces": [
19+
"error",
20+
{
21+
"skipBlankLines": true
22+
}
23+
],
24+
"indent": [
25+
"error",
26+
"tab",
27+
{
28+
"SwitchCase": 1
29+
}
30+
],
31+
"operator-linebreak": [
32+
"error",
33+
"after",
34+
{
35+
"overrides": {
36+
"?": "before",
37+
":": "before"
38+
}
39+
}
40+
],
41+
"max-len": ["error", 110],
42+
"quotes": [
43+
"error",
44+
"single"
45+
],
46+
"semi": [
47+
"error",
48+
"always"
49+
],
50+
"no-multiple-empty-lines": ["error", { "max": 3, "maxEOF": 1, "maxBOF": 1 }],
51+
"keyword-spacing": ["error", { "before": true, "after": true }],
52+
"space-before-blocks": ["error"],
53+
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}],
54+
"camelcase": ["error"],
55+
"no-tabs": [0],
56+
"global-require": [0],
57+
"no-underscore-dangle": [0],
58+
"no-plusplus": [0],
59+
"no-shadow": [0],
60+
"node/no-unpublished-require": [0],
61+
"no-process-exit": [0],
62+
"linebreak-style": [0],
63+
"node/no-missing-require": [0],
64+
"no-console": [0],
65+
"node/no-unsupported-features/es-builtins": [
66+
"error",
67+
{ "version": ">=18.16.0" }
68+
],
69+
"node/no-unsupported-features/node-builtins": [
70+
"error",
71+
{ "version": ">=18.16.0" }
72+
],
73+
"func-names": [
74+
"error",
75+
"never",
76+
{
77+
"generators": "never"
78+
}
79+
]
80+
}
81+
}

.github/workflows/eslint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: ESLint
2+
defaults:
3+
run:
4+
shell: bash
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- master
13+
14+
jobs:
15+
eslint:
16+
name: ESLint
17+
runs-on: ubuntu-20.04
18+
19+
steps:
20+
21+
- name: Fetch Repository
22+
uses: actions/checkout@v3
23+
with:
24+
persist-credentials: false
25+
26+
- name: Install Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 18.16.0
30+
cache: 'npm'
31+
32+
- name: Install Modules
33+
run: npm ci --ignore-scripts
34+
35+
- name: Run ESLint
36+
run: npm run eslint

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish to NPM
2+
defaults:
3+
run:
4+
shell: bash
5+
6+
on:
7+
workflow_dispatch
8+
9+
jobs:
10+
Publish:
11+
if: contains('["raub"]', github.actor)
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
16+
- name: Fetch Repository
17+
uses: actions/checkout@v3
18+
with:
19+
persist-credentials: false
20+
21+
- name: Install Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 18.16.0
25+
cache: 'npm'
26+
27+
- name: Get Package Version
28+
id: package-version
29+
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT
30+
31+
- name: Publish
32+
run: |
33+
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
34+
npm publish --ignore-scripts
35+
env:
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
38+
- name: Create Release
39+
id: create_release
40+
uses: softprops/action-gh-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
draft: true
45+
tag_name: ${{ steps.package-version.outputs.version }}
46+
name: Release ${{ steps.package-version.outputs.version }}

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test
2+
defaults:
3+
run:
4+
shell: bash
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- master
13+
14+
jobs:
15+
unit-tests:
16+
name: Unit Tests
17+
strategy:
18+
matrix:
19+
os: [ubuntu-20.04, windows-2022, macos-11, [self-hosted, linux, ARM64]]
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
25+
- name: Fetch Repository
26+
uses: actions/checkout@v3
27+
with:
28+
persist-credentials: false
29+
30+
- name: Install Node.js
31+
uses: actions/setup-node@v3
32+
with:
33+
node-version: 18.16.0
34+
cache: 'npm'
35+
36+
- name: Install Modules
37+
run: npm ci --ignore-scripts
38+
39+
- name: Run Unit Tests
40+
run: npm run test-ci

.travis.yml

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

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Luis Blanco
3+
Copyright (c) 2023 Luis Blanco
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
This is a part of [Node3D](https://github.com/node-3d) project.
44

5-
[![NPM](https://nodei.co/npm/deps-qt-qml-raub.png?compact=true)](https://www.npmjs.com/package/deps-qt-qml-raub)
5+
[![NPM](https://badge.fury.io/js/deps-qt-qml-raub.svg)](https://badge.fury.io/js/deps-qt-qml-raub)
6+
[![ESLint](https://github.com/node-3d/deps-qt-qml-raub/actions/workflows/eslint.yml/badge.svg)](https://github.com/node-3d/deps-qt-qml-raub/actions/workflows/eslint.yml)
7+
[![Test](https://github.com/node-3d/deps-qt-qml-raub/actions/workflows/test.yml/badge.svg)](https://github.com/node-3d/deps-qt-qml-raub/actions/workflows/test.yml)
68

7-
[![Build Status](https://api.travis-ci.com/node-3d/deps-qt-qml-raub.svg?branch=master)](https://travis-ci.com/node-3d/deps-qt-qml-raub)
8-
[![CodeFactor](https://www.codefactor.io/repository/github/node-3d/deps-qt-qml-raub/badge)](https://www.codefactor.io/repository/github/node-3d/deps-qt-qml-raub)
9-
10-
> npm i deps-qt-qml-raub
11-
12-
13-
## Synopsis
9+
```console
10+
npm i -s deps-qt-qml-raub
11+
```
1412

1513
This dependency package is distributing **Qt Core 5.13.0**
1614
binaries through **NPM** for **Node.js** addons.

index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
declare module "deps-qt-core-raub" {
2+
/**
3+
* Path to binaries
4+
* Platform binary directory absolute path
5+
*/
6+
export const bin: string;
7+
/**
8+
* Path to includes
9+
* Include directory for this module
10+
*/
11+
export const include: string;
12+
}

0 commit comments

Comments
 (0)