Skip to content

Commit

Permalink
Merge pull request #102 from alewin/feature/monorepo-rc1
Browse files Browse the repository at this point in the history
feat: switch to monorepo
  • Loading branch information
alewin authored Jan 24, 2021
2 parents 0d45f58 + 1dc62cf commit 011d2a3
Show file tree
Hide file tree
Showing 98 changed files with 18,280 additions and 35,973 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
13 changes: 13 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.4.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": [
"@koale/useworker-website",
"@koale/useworker-examples"
]
}
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release

on:
push:
branches:
- master
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
fetch-depth: 0

- name: Setup Node.js 12.x
uses: actions/setup-node@master
with:
node-version: 12.x

- name: Install pnpm
run: |
npm install pnpm@latest -g
- name: Setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER

- name: Setup GIT
run: |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config user.name "$GITHUB_ACTOR"
- name: Set up NPM credentials
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install Dependencies
run: pnpm install --frozen-lockfile=false

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
version: pnpm ci:version
publish: pnpm ci:publish
commit: 'chore: update version'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69 changes: 65 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,69 @@
dist/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Dependency directories
node_modules/
.cache/
jspm_packages/
.pnpm-store

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm
.pnpm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Output of 'npm pack'
*.tgz

# Production
build/
dist/

# editors
.vscode
*.sublime*

# misc
.DS_*

.rts2_cache_*
# docusaurus
.docusaurus

.vscode
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ services:
- docker

script:
- docker build -t useworker .
- docker run --rm -v `pwd`:/usr/src useworker
- docker build -t useworker ./packages/useWorker
- docker run --rm -v $(pwd)/packages/useWorker:/usr/src useworker
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const Example = () => {

const runSort = async () => {
const result = await sortWorker(numbers); // non-blocking UI
console.log("End.");
console.log(result);
};

return (
Expand All @@ -112,6 +112,12 @@ const Example = () => {

---

## 🖼 Live Demo

<img alt="useworker demo" src="https://user-images.githubusercontent.com/980844/82120716-70151e00-9788-11ea-8f8d-07b06a13dde2.gif" />

---

## 🐾 Examples

[![Edit white-glitter-icji4](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/white-glitter-icji4?fontsize=14&hidenavigation=1&theme=dark)
Expand All @@ -130,6 +136,7 @@ More examples: https://github.com/alewin/useWorker/tree/develop/example
- [x] Testing useWorker [#41](https://github.com/alewin/useWorker/issues/41)
- [x] Import and use local script inside `useWorker` function [#37](https://github.com/alewin/useWorker/issues/37)
- [ ] useWorkers Hook [#38](https://github.com/alewin/useWorker/issues/38)
- [ ] useWorkerFile Hook [#93](https://github.com/alewin/useWorker/issues/93)


---
Expand All @@ -143,7 +150,7 @@ This library allows you to use web workers without having to change the CRA conf

If you are interested in changing the webpack configuration to manually manage your workers, see: [worker-loader]( https://github.com/webpack-contrib/worker-loader)

--
---

## Known issues

Expand Down Expand Up @@ -172,20 +179,26 @@ The library is experimental so if you find a **bug** or would like to request a

---

## 💻 Mantainers

- [@zant](https://github.com/zant)
- [@alewin](https://github.com/alewin)

## 💻 Contributors

- Thanks to:
- [@zant](https://github.com/zant)
- [@IljaDaderko](https://github.com/IljaDaderko)
- [@Pigotz](https://github.com/Pigotz)
- [@z4o4z](https://github.com/z4o4z)
- [@101arrowz](https://github.com/101arrowz)
- [@zant](https://github.com/zant) (test, CI, `RFC`, bugfixes, `localdependencies` feature, ...)
- [@101arrowz](https://github.com/101arrowz) ( `isoworker` packages proposal )
- [@z4o4z](https://github.com/z4o4z) (`Typescript` implementation, Discussion of `RFC`)
- [@IljaDaderko](https://github.com/IljaDaderko) (`Typescript` support, Discussion of `RFC`)
- [@ophirg](https://github.com/ophirg) (`Typescript` support)
- [@Pigotz](https://github.com/Pigotz) (Discussion of `RFC`)

---

## 📜 License

MIT © [alewin](https://github.com/alewin)
[MIT](https://github.com/alewin/useWorker/blob/develop/LICENSE)

---

Expand Down
14 changes: 14 additions & 0 deletions docs/CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Requirements

- Node 14/npm ( [`nvm`](https://github.com/nvm-sh/nvm) is recommended )
- pnpm ( `npm install -g pnpm`)

## Steps

- `pnpm install`
- TBD

## How to debug

- TBD

4 changes: 4 additions & 0 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# RELEASE

- `pnpm run changeset`

9 changes: 0 additions & 9 deletions example/.gitignore

This file was deleted.

68 changes: 0 additions & 68 deletions example/README.md

This file was deleted.

Loading

0 comments on commit 011d2a3

Please sign in to comment.