Skip to content

Commit

Permalink
Merge pull request #36 from oe/feat/broadcast
Browse files Browse the repository at this point in the history
Feat/broadcast
  • Loading branch information
oe committed Aug 15, 2024
2 parents 99a275f + 333327d commit 9916755
Show file tree
Hide file tree
Showing 73 changed files with 10,403 additions and 12,469 deletions.
10 changes: 0 additions & 10 deletions .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
dist
# don't lint nyc coverage output
coverage
demo
test

rollup.config.ts
45 changes: 31 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
// extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
extends: ["airbnb-typescript"],
extends: ['airbnb-typescript'],
parserOptions: {
project: "./tsconfig.json",
project: './tsconfig.json',
},
rules: {
"no-underscore-dangle": ["off"],
"no-nested-ternary": ["off"],
"no-console": ["off"],
"import/prefer-default-export": ["off"],
"prefer-promise-reject-errors": ["off"],
"@typescript-eslint/no-throw-literal": ["off"],
"@typescript-eslint/no-unused-expressions": ["off"],
semi: "off",
"@typescript-eslint/semi": ["error", "never"],
'no-underscore-dangle': ['off'],
'no-nested-ternary': ['off'],
'no-console': ['off'],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/vite.config.ts',
'**/build.config.ts',
'**/vitest.workspace.ts',
'jest.config.ts',
'**/*.test.ts',
'**/*.tn.ts',
'**/*.tb.ts',
],
},
],
'@typescript-eslint/comma-dangle': ['off'],
'no-trailing-spaces': ['error', { ignoreComments: true }],
'import/prefer-default-export': ['off'],
'prefer-promise-reject-errors': ['off'],
'@typescript-eslint/no-throw-literal': ['off'],
'@typescript-eslint/no-unused-expressions': ['off'],
semi: 'off',
'@typescript-eslint/semi': ['error', 'never'],
},
};
}
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: 20
- name: Install pnpm
run: npm install -g pnpm

- name: install deps
run: yarn

run: pnpm install
- name: install webkit
run: cd packages/duplex-message && pnpm playwright install chromium
- name: build lib
run: yarn build
run: pnpm build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ typings/
cache
test-cache
test/cache
**/dist
**/dist
__screenshots__
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# sass_binary_site="https://npm.taobao.org/mirrors/node-sass"
# ELECTRON_MIRROR="http://npm.taobao.org/mirrors/electron/"
# ELECTRON_BUILDER_BINARIES_MIRROR="http://npm.taobao.org/mirrors/electron-builder-binaries/"
3 changes: 0 additions & 3 deletions .yarnrc

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
<h3 align="center">A tinny(~3kb) utility that can makes one way message responsible <br>
enhance postMessage/storageEvent/electron IPC/chrome extension scripts</h3>

### For browser: check [Duplex-Message](https://github.com/oe/duplex-message/tree/master/packages/duplex-message)
### For electron: check [Simple-Electron-IPC](https://github.com/oe/duplex-message/tree/master/packages/simple-electron-ipc)
### For browser: check [Duplex-Message](https://github.com/oe/duplex-message/tree/main/packages/duplex-message)
### For electron: check [Simple-Electron-IPC](https://github.com/oe/duplex-message/tree/main/packages/simple-electron-ipc)
15 changes: 0 additions & 15 deletions lerna.json

This file was deleted.

38 changes: 13 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,38 @@
"version": "1.0.0",
"description": "makes one way message responsive, enhance postMessage/storageEvent/electron IPC/chrome extension scripts",
"scripts": {
"postinstall": "lerna bootstrap",
"clean": "lerna run clean",
"build": "lerna run build",
"prepublish": "yarn build",
"publish": "lerna publish",
"build": "pnpm -r build",
"test": "pnpm -r test -- run",
"prepublish": "pnpm build",
"publish": "pnpm -r publish",
"lint": "eslint . --ext .ts"
},
"husky": {
"hooks": {
"pre-commit": "yarn lint"
"pre-commit": "pnpm lint"
}
},
"repository": "https://oe@github.com/oe/duplex-message.git",
"author": "Saiya",
"license": "MIT",
"homepage": "https://github.com/oe/duplex-message",
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"@babel/core": "^7.14.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@babel/runtime-corejs2": "^7.1.2",
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"cross-env": "^5.2.0",
"electron": "^12.0.1",
"eslint": "^7.25.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-react-hooks": "^4.0.8",
"husky": "^1.1.3",
"lerna": "^4.0.0",
"parcel-bundler": "^1.10.2",
"rimraf": "^2.6.2",
"rollup": "^2.36.2",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-size-snapshot": "^0.12.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.29.0",
"typescript": "4.1.3"
}
"husky": "^1.1.3"
},
"pnpm": {
"overrides": {
"typescript": "5.5.3"
}
},
"packageManager": "pnpm@9.5.0"
}
Loading

0 comments on commit 9916755

Please sign in to comment.