Skip to content

Commit

Permalink
refactor: cleanup project
Browse files Browse the repository at this point in the history
  • Loading branch information
SSen committed Jul 23, 2024
1 parent 3733ab5 commit a1372d4
Show file tree
Hide file tree
Showing 46 changed files with 10,248 additions and 9,001 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
node_modules
fixtures
out
src/**/public
/examples/**
26 changes: 26 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const ext = '{ts,tsx,mts,cts,js,jsx,mjs,cjs}';

module.exports = {
extends: ['plugin:unicorn/recommended', 'react-app', 'prettier'],

overrides: [
{
files: [`**/*.${ext}`],
rules: {
'unicorn/prevent-abbreviations': 'off',
'unicorn/filename-case': 'off',
'unicorn/no-negated-condition': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/no-null': 'off',
'unicorn/no-useless-undefined': 'off',
'unicorn/no-lonely-if': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/prefer-type-error': 'off',

'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['warn'],
'@typescript-eslint/consistent-type-imports': 'error'
},
},
],
};
32 changes: 0 additions & 32 deletions .eslintrc.js

This file was deleted.

36 changes: 10 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,32 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [14, 16, 18]
node: [14, 16, 18, 20]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Clone Repository
uses: actions/checkout@v2
uses: actions/checkout@v4

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

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
cache: 'npm'

- name: Version
run: |
node --version
yarn --version
npm --version
- name: Install Dependencies
run: yarn install
run: npm ci

- name: Build
run: yarn run build
run: npm run build

- name: Lint
run: yarn run lint
run: npm run lint

- name: Coverage Test
run: yarn run coverage

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
# with:
# files: ./packages/coverage/coverage-final.json # ./{workspace}/coverage/coverage-final.json,./{workspace}/coverage/coverage-final.json...
run: npm run coverage
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ yarn-error.log*
# output
coverage/
out/
test/storage/
test/storage/
dist/
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
11 changes: 1 addition & 10 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn run markdown-source-import README.md --git-add

cp README.md packages/src/multiplerun/README.md;

yarn run lint-staged;

yarn workspace @workspace/packages run precommit;
npm run precommit
3 changes: 0 additions & 3 deletions .prettierrc.js

This file was deleted.

7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"quoteProps": "consistent",
"trailingComma": "all",
"bracketSpacing": true
}
77 changes: 0 additions & 77 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

786 changes: 0 additions & 786 deletions .yarn/releases/yarn-3.2.1.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions .yarnrc.yml

This file was deleted.

9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

If you have installed [iTerm.app](https://www.iterm2.com/) on your Mac. Your iTerm will opened like this.

<img src="https://raw.githubusercontent.com/iamssen/multiplerun/master/readme-assets/iTerm.png" width="700"/>
<img src="https://raw.githubusercontent.com/iamssen/multiplerun/master/readme-assets/iTerm.png" width="700" alt="iTerm example"/>

If you don't have iTerm, those commands will be executed via default terminal app (`cmd.exe` or `Terminal.app`)

Expand All @@ -25,7 +25,6 @@ npx multiplerun test

```sh
npm install multiplerun --save-dev
# yarn add multiplerun --dev
```

And add config to your `package.json`
Expand Down Expand Up @@ -56,10 +55,6 @@ multiplerun(['echo multiplerun!', ['echo hello', 'echo world']]);

API

<!-- source ./packages/src/multiplerun/types.ts -->

[packages/src/multiplerun/types.ts](packages/src/multiplerun/types.ts)

```ts
export type Command = { command: string; wait: number; cwd: string };

Expand All @@ -76,8 +71,6 @@ export type Options = {
};
```

<!-- /source -->

```ts
function multiplerun(commands: ConfigCommands, options?: Options);
```
Loading

0 comments on commit a1372d4

Please sign in to comment.