-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d6258f1
Showing
40 changed files
with
9,940 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Format | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Format | ||
run: pnpm run format | ||
|
||
- name: Add, Commit and Push | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "Format" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Release | ||
|
||
on: [workflow_dispatch] | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: pnpm/[email protected] | ||
|
||
- name: Setup Node.js 17.x | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 17.x | ||
cache: pnpm | ||
|
||
- name: Install Dependencies | ||
run: pnpm install | ||
|
||
- name: Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: pnpm run release | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build and Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 17.x] | ||
operating-system: [ubuntu-latest] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: pnpm/[email protected] | ||
|
||
- name: Setup Node.js environment ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run Build and Tests | ||
run: pnpm run build-test | ||
|
||
env: | ||
CI: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Version | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: pnpm/[email protected] | ||
|
||
- name: Setup Node.js 17.x | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 17.x | ||
cache: pnpm | ||
|
||
- name: Install Dependencies | ||
run: pnpm install | ||
|
||
- name: Create Update Version Pull Request | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
commit: "chore: update versions" | ||
title: "chore: update versions" | ||
version: pnpm run ci:version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
node_modules | ||
dist | ||
gitignore | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# turbo | ||
.turbo | ||
|
||
# solid | ||
.solid | ||
|
||
# VSC Settings | ||
.vscode/settings.json | ||
|
||
/.idea | ||
.project | ||
.classpath | ||
*.launch | ||
.settings/ | ||
|
||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
auto-install-peers=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"printWidth": 100, | ||
"semi": false, | ||
"singleQuote": false, | ||
"useTabs": true, | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"overrides": [ | ||
{ | ||
"files": "*.md", | ||
"options": { | ||
"useTabs": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 your-author-name | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<p> | ||
<img width="100%" src="https://assets.solidjs.com/banner?type=your-repository-name&background=tiles&project=Monorepo" alt="your-repository-name Monorepo"> | ||
</p> | ||
|
||
# your-repository-name | ||
|
||
[![pnpm](https://img.shields.io/badge/maintained%20with-pnpm-cc00ff.svg?style=for-the-badge&logo=pnpm)](https://pnpm.io/) | ||
[![turborepo](https://img.shields.io/badge/built%20with-turborepo-cc00ff.svg?style=for-the-badge&logo=turborepo)](https://turborepo.org/) | ||
|
||
your-repository-desc | ||
|
||
> **Note** After using this template, you have to search and replace all `your-repository-name` and similar strings | ||
> with appropriate texts. | ||
> | ||
> `your-repository-name` should be a **kebab-case** string representing the name of you monorepo. | ||
> | ||
> `your-repository-desc` should be a **Normal case** string with the description of the repository. | ||
> | ||
> `your-nickname` should be a **kebab-case** string from your profile URL. | ||
> | ||
> `your-author-name` should be a **Normal case** string with your first and last name. | ||
## Project Commands | ||
|
||
List of cli commands available from a project root. | ||
|
||
To use the commands, first install [pnpm](https://pnpm.io) and install dependencies with `pnpm i`. | ||
|
||
```bash | ||
pnpm run dev | ||
# Builds all packages in watch mode, and starts all playgrounds | ||
# turbo run dev --parallel | ||
|
||
pnpm run build | ||
# Builds all the packages in the monorepo | ||
# turbo run build --filter=!./playgrounds/* | ||
|
||
pnpm run test | ||
# Runs tests for all the packages in the monorepo | ||
# turbo run test --filter=!./playgrounds/* | ||
|
||
pnpm run typecheck | ||
# Runs TS typecheck for all the packages in the monorepo | ||
# turbo run typecheck --filter=!./playgrounds/* | ||
|
||
pnpm run build-test | ||
# Runs build, typecheck and test commands for all the packages in the monorepo | ||
# "turbo run build test typecheck --filter=!./playgrounds/* | ||
|
||
pnpm run format | ||
# Formats the reposotory with prettier | ||
# prettier -w \"packages/**/*.{js,ts,json,css,tsx,jsx,md}\" \"playgrounds/**/*.{js,ts,json,css,tsx,jsx,md}\" | ||
|
||
pnpm run changeset | ||
# Creates a changeset | ||
# changeset | ||
|
||
pnpm run version-packages | ||
# Applies changesets to bump package versions and update CHANGELOGs | ||
# "changeset version && pnpm i | ||
|
||
pnpm run release | ||
# Builds and publishes changed packages to npm | ||
# pnpm run build-test && changeset publish | ||
|
||
pnpm run update-deps | ||
# Updates all dependencies in the repository | ||
# taze -w -r && pnpm i | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import type { Config } from "@jest/types" | ||
|
||
const projectRootPath = "<rootDir>/../.." | ||
const solidjsPath = `${projectRootPath}/node_modules/solid-js` | ||
|
||
const config: Config.InitialOptions = { | ||
preset: "ts-jest", | ||
|
||
globals: { | ||
"ts-jest": { | ||
tsconfig: `<rootDir>/tsconfig.json`, | ||
babelConfig: { | ||
presets: [ | ||
"@babel/preset-env", | ||
["babel-preset-solid", { generate: "ssr", hydratable: true }], | ||
], | ||
}, | ||
}, | ||
}, | ||
|
||
testEnvironment: "node", | ||
|
||
setupFilesAfterEnv: [`${projectRootPath}/configs/jest.setup.ssr.ts`], | ||
|
||
moduleNameMapper: { | ||
"solid-js/web": `${solidjsPath}/web/dist/server.cjs`, | ||
"solid-js/store": `${solidjsPath}/store/dist/server.cjs`, | ||
"solid-js": `${solidjsPath}/dist/server.cjs`, | ||
}, | ||
|
||
testMatch: ["<rootDir>/test/**.ssr.test.(js|ts)?(x)"], | ||
|
||
verbose: true, | ||
} | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import type { Config } from "@jest/types" | ||
|
||
const projectRootPath = "<rootDir>/../.." | ||
const solidjsPath = `${projectRootPath}/node_modules/solid-js` | ||
|
||
const config: Config.InitialOptions = { | ||
preset: "ts-jest", | ||
|
||
globals: { | ||
"ts-jest": { | ||
tsconfig: `<rootDir>/tsconfig.json`, | ||
babelConfig: { | ||
presets: ["@babel/preset-env", "babel-preset-solid"], | ||
}, | ||
}, | ||
}, | ||
|
||
testEnvironment: "jsdom", | ||
|
||
setupFilesAfterEnv: ["@testing-library/jest-dom", "regenerator-runtime"], | ||
|
||
moduleNameMapper: { | ||
"solid-js/web": `${solidjsPath}/web/dist/web.cjs`, | ||
"solid-js/store": `${solidjsPath}/store/dist/store.cjs`, | ||
"solid-js": `${solidjsPath}/dist/solid.cjs`, | ||
}, | ||
|
||
testPathIgnorePatterns: ["/node_modules/", "ssr"], | ||
|
||
verbose: true, | ||
} | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
jest.mock("solid-js/web", () => ({ | ||
...jest.requireActual("solid-js/web"), | ||
template: jest.fn() | ||
})); | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import withSolid from "rollup-preset-solid"; | ||
|
||
export default withSolid({ | ||
input: "src/index.tsx", | ||
targets: ["esm", "cjs"] | ||
}); |
Oops, something went wrong.