Skip to content

Commit

Permalink
feat: v2
Browse files Browse the repository at this point in the history
  • Loading branch information
SSen committed Feb 20, 2021
1 parent d20fc62 commit 686dd9d
Show file tree
Hide file tree
Showing 38 changed files with 6,803 additions and 210 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
fixtures
out
src/**/public
/examples/**
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: ['@ssen', 'prettier', 'prettier/@typescript-eslint'],
rules: {
'@typescript-eslint/no-explicit-any': 'off'
},
};
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

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

jobs:
test:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [12, 14, 15]
os: [ubuntu-latest, windows-latest, macos-latest]

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

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

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

- 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-
- name: Version
run: |
node --version
yarn --version
- name: Install Dependencies
run: yarn install

- name: Build
run: yarn run build

- name: Lint
run: yarn 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...
28 changes: 19 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
/node_modules/
# config
.envrc
.env

/*.iml
/.idea/
# tools
/.idea

/.yarnclean
/*.log
# node
node_modules/

/dist-dev
# macos
.DS_Store

/tsconfig.lib.*.json
/webpack.lib.*.js
# generated files
*.tgz
lerna-debug.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

/package-lock.json
# output
coverage/
out/
test/storage/
13 changes: 13 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function precommit(...workspaces) {
return workspaces.map((workspace) => `yarn workspace ${workspace} run precommit`);
}

module.exports = {
hooks: {
'pre-commit': [
`markdown-source-import README.md "packages/**/*.md" --git-add`,
`lint-staged`,
...precommit(`@workspace/packages`),
].join(' && '),
},
};
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
fixtures
out
src/**/public
/examples/**
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('@ssen/prettier-config'),
};
57 changes: 0 additions & 57 deletions README.md

This file was deleted.

20 changes: 0 additions & 20 deletions bin/multiplerun

This file was deleted.

93 changes: 0 additions & 93 deletions index.js

This file was deleted.

3 changes: 0 additions & 3 deletions multiplerun.d.ts

This file was deleted.

54 changes: 33 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
{
"name": "multiplerun",
"version": "2.0.0-alpha.1",
"description": "Run multiple commands on multiple terminals (or iTerm split panes)",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"types": "./multiplerun.d.ts",
"bin": {
"multiplerun": "./bin/multiplerun"
},
"author": "Seoyeon Lee",
"name": "@workspace/root",
"private": true,
"version": "2020.08.24",
"author": "SSen <[email protected]>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/iamssen/multiplerun.git"
},
"upstream": {
"git": "https://github.com/iamssen/multiplerun.git"
"repository": "github:rocket-hangar/multiplerun",
"workspaces": [
"packages",
"out/packages/*"
],
"scripts": {
"build": "yarn workspace @workspace/packages run build --out-dir $PWD/out/packages",
"publish": "yarn run test && yarn run build && yarn workspace @workspace/packages run publish --out-dir $PWD/out/packages",
"view": "yarn workspace @workspace/packages run view",
"doctor": "yarn workspace @workspace/packages run doctor",
"format": "prettier --write \"**/*.{js,ts,tsx}\"",
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"test": "yarn workspace @workspace/packages run test",
"coverage": "yarn workspace @workspace/packages run coverage"
},
"bugs": {
"url": "https://github.com/iamssen/multiplerun/issues"
"lint-staged": {
"**/src/{**/*,*}.{ts,tsx}": [
"prettier --write",
"eslint"
]
},
"homepage": "https://github.com/iamssen/multiplerun"
"devDependencies": {
"@handbook/markdown-source-import": "^1.1.0",
"@ssen/eslint-config": "^1.3.1",
"@ssen/prettier-config": "^1.2.0",
"eslint": "^7.19.0",
"eslint-config-prettier": "^7.2.0",
"husky": "^4.3.8",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1"
}
}
13 changes: 13 additions & 0 deletions packages/.package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"author": "SSen <[email protected]>",
"license": "MIT",
"repository": "github:rocket-hangar/multiplerun",
"bugs": "https://github.com/rocket-hangar/multiplerun/issues",
"homepage": "https://github.com/rocket-hangar/multiplerun/tree/master/packages/src/{name}",
"engines": {
"node": ">=12"
},
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 686dd9d

Please sign in to comment.