Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eject wes-cli #97

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .config/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"parser": "@typescript-eslint/parser",
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_\\d*$"
}
]
},
"ignorePatterns": ["**/dist/**"]
}
4 changes: 4 additions & 0 deletions .config/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
34 changes: 34 additions & 0 deletions .config/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import typescript from '@rollup/plugin-typescript';
import esbuild from 'rollup-plugin-esbuild';

export default [
{
input: './src/index.ts',
output: [
{
dir: './dist',
format: 'cjs',
entryFileNames: '[name].cjs',
exports: 'auto',
preserveModules: true,
sourcemap: true,
},
{
dir: './dist',
exports: 'auto',
format: 'es',
preserveModules: true,
sourcemap: true,
},
],
external: (id) => !/^[./]/.test(id),
plugins: [
esbuild(),
typescript({
tsconfig: '.config/tsconfig.build.json',
declaration: true,
declarationDir: 'dist',
}),
],
},
];
8 changes: 8 additions & 0 deletions .config/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../dist",
"rootDir": "../src"
},
"include": ["../src/**/*.ts"]
}
32 changes: 32 additions & 0 deletions .config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"compilerOptions": {
"allowJs": true,
"alwaysStrict": true,
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"lib": ["ESNext"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "dist",
"resolveJsonModule": true,
"rootDir": "../",
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"target": "ES2017"
},
"exclude": ["dist", "node_modules"],
"include": ["../**/*.ts"]
}
10 changes: 10 additions & 0 deletions .config/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// <reference types="vitest" />

import { defineConfig } from 'vite';

// https://vitejs.dev/config/
export default defineConfig({
test: {
globals: true,
},
});
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# top-most EditorConfig file
root = true

# global preferences
[*]
indent_style = space
indent_size = 2

# Other preferences
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
3 changes: 0 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# ⚠️ WARNING
# This file is auto-generated by https://github.com/WesSouza/wes-cli

name: CodeQL

on:
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/lint-typecheck-test-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# ⚠️ WARNING
# This file is auto-generated by https://github.com/WesSouza/wes-cli

name: Lint, Type Check, Test, Build

on:
Expand All @@ -14,29 +11,34 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['16.x', '18.x']
os: [ubuntu-latest, macOS-latest]
node: ['18.x', '20.x']
os:
- ubuntu-latest
# FIXME: Some tests are failing on macOS because of unhandled exceptions.
# - macOS-latest

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

- name: Install wes-cli
run: |
npm i -g wes-cli@3.0.0
wes install
uses: actions/checkout@v4

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Lint
run: yarn lint
- name: Install
run: yarn install --frozen-lockfile

- name: Check Types
- name: Check formatting
run: yarn check:format

- name: Check types
run: yarn check:types

- name: Lint
run: yarn lint

- name: Test
run: yarn test:ci

Expand Down
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Node & Yarn
node_modules
*.log*

/dist
/coverage

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"eslint.options": { "overrideConfigFile": ".config/.eslintrc" },
"prettier.configPath": ".config/.prettierrc"
}
12 changes: 0 additions & 12 deletions .wes-defaults/local/package.json

This file was deleted.

Loading
Loading