Skip to content

Commit

Permalink
Update deps and checks
Browse files Browse the repository at this point in the history
  • Loading branch information
raub committed Oct 24, 2023
1 parent 3ceeec9 commit 84242cd
Show file tree
Hide file tree
Showing 17 changed files with 1,522 additions and 1,385 deletions.
116 changes: 0 additions & 116 deletions .eslintrc

This file was deleted.

81 changes: 81 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"ignorePatterns": [
"src/**"
],
"extends": [
"eslint:recommended",
"plugin:node/recommended"
],
"parserOptions": {
"ecmaVersion": 2022
},
"env": {
"node": true,
"es6": true
},
"rules": {
"arrow-parens": ["error", "always"],
"no-trailing-spaces": [
"error",
{
"skipBlankLines": true
}
],
"indent": [
"error",
"tab",
{
"SwitchCase": 1
}
],
"operator-linebreak": [
"error",
"after",
{
"overrides": {
"?": "before",
":": "before"
}
}
],
"max-len": ["error", 110],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-multiple-empty-lines": ["error", { "max": 3, "maxEOF": 1, "maxBOF": 1 }],
"keyword-spacing": ["error", { "before": true, "after": true }],
"space-before-blocks": ["error"],
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}],
"camelcase": ["error"],
"no-tabs": [0],
"global-require": [0],
"no-underscore-dangle": [0],
"no-plusplus": [0],
"no-shadow": [0],
"node/no-unpublished-require": [0],
"no-process-exit": [0],
"linebreak-style": [0],
"node/no-missing-require": [0],
"no-console": [0],
"node/no-unsupported-features/es-builtins": [
"error",
{ "version": ">=18.16.0" }
],
"node/no-unsupported-features/node-builtins": [
"error",
{ "version": ">=18.16.0" }
],
"func-names": [
"error",
"never",
{
"generators": "never"
}
]
}
}
36 changes: 36 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: ESLint
defaults:
run:
shell: bash

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
eslint:
name: ESLint
runs-on: ubuntu-20.04

steps:

- name: Fetch Repository
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.16.0
cache: 'npm'

- name: Install Modules
run: npm ci --ignore-scripts

- name: Run ESLint
run: npm run eslint
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish to NPM
defaults:
run:
shell: bash

on:
workflow_dispatch

jobs:
Publish:
if: contains('["raub"]', github.actor)
runs-on: ubuntu-latest

steps:

- name: Fetch Repository
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.16.0
cache: 'npm'

- name: Get Package Version
id: package-version
run: node -p "'version='+require('./package').version" >> $GITHUB_OUTPUT

- name: Publish
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
npm publish --ignore-scripts
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
tag_name: ${{ steps.package-version.outputs.version }}
name: Release ${{ steps.package-version.outputs.version }}
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test
defaults:
run:
shell: bash

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
unit-tests:
name: Unit Tests
strategy:
matrix:
os: [ubuntu-20.04, windows-2022, macos-11, [self-hosted, linux, ARM64]]

runs-on: ${{ matrix.os }}

steps:

- name: Fetch Repository
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.16.0
cache: 'npm'

- name: Install Modules
run: npm ci --ignore-scripts

- name: Run Unit Tests
run: npm run test-ci
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Luis Blanco
Copyright (c) 2023 Luis Blanco

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

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

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

[![Build Status](https://api.travis-ci.com/node-3d/deps-qt-core-raub.svg?branch=master)](https://travis-ci.com/node-3d/deps-qt-core-raub)
[![CodeFactor](https://www.codefactor.io/repository/github/node-3d/deps-qt-core-raub/badge)](https://www.codefactor.io/repository/github/node-3d/deps-qt-core-raub)

> npm i deps-qt-core-raub

## Synopsis
```console
npm i -s deps-qt-core-raub
```

This dependency package is distributing **Qt Core 5.13.0**
binaries through **NPM** for **Node.js** addons.
Expand All @@ -20,8 +18,6 @@ binaries through **NPM** for **Node.js** addons.
* Linking: dynamic dll-type.


## Usage

### Windows

Before any import of Qt-dependent module, there should be `require('deps-qt-core-raub')`.
Expand Down
12 changes: 12 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare module "deps-qt-core-raub" {
/**
* Path to binaries
* Platform binary directory absolute path
*/
export const bin: string;
/**
* Path to includes
* Include directory for this module
*/
export const include: string;
}
Loading

0 comments on commit 84242cd

Please sign in to comment.