Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanaden committed Aug 9, 2024
0 parents commit e71068b
Show file tree
Hide file tree
Showing 64 changed files with 17,022 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .changeset/config.json
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": []
}
10 changes: 10 additions & 0 deletions .editorconfig
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
29 changes: 29 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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: 18

- name: Install dependencies
run: pnpm install --ignore-scripts

- name: Format
run: pnpm run format

- name: Add, Commit and Push
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'Format'
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
branches: [main]

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
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: 18

- name: Install Dependencies
run: pnpm install --ignore-scripts

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: pnpm run ci:version
publish: pnpm run release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
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: 18

- name: Install dependencies
run: pnpm install --ignore-scripts

- name: Build all packages
run: pnpm build

- name: Run Build and Tests
run: pnpm run build-test
env:
CI: true
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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

/.idea
.project
.classpath
*.launch
.settings/

.DS_Store
Thumbs.db
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
auto-install-peers=true
strict-peer-dependencies=false
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"trailingComma": "all",
"tabWidth": 2,
"printWidth": 100,
"semi": false,
"singleQuote": false,
"useTabs": false,
"arrowParens": "avoid",
"bracketSpacing": true
}
21 changes: 21 additions & 0 deletions LICENSE
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.
69 changes: 69 additions & 0 deletions README.md
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 examples
# turbo run dev --parallel

pnpm run build
# Builds all the packages in the monorepo
# turbo run build --filter=!./examples/*

pnpm run test
# Runs tests for all the packages in the monorepo
# turbo run test --filter=!./examples/*

pnpm run typecheck
# Runs TS typecheck for all the packages in the monorepo
# turbo run typecheck --filter=!./examples/*

pnpm run build-test
# Runs build, typecheck and test commands for all the packages in the monorepo
# "turbo run build test typecheck --filter=!./examples/*

pnpm run format
# Formats the reposotory with prettier
# prettier -w \"packages/**/*.{js,ts,json,css,tsx,jsx,md}\" \"examples/**/*.{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
# pnpm up -Lri
```
9 changes: 9 additions & 0 deletions configs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'vite'
import solidPlugin from 'vite-plugin-solid'

export default defineConfig({
plugins: [solidPlugin()],
build: {
target: 'esnext',
},
})
43 changes: 43 additions & 0 deletions configs/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { defineConfig } from 'vitest/config'
import solidPlugin from 'vite-plugin-solid'

export default defineConfig(({ mode }) => {
// to test in server environment, run with "--mode ssr" or "--mode test:ssr" flag
// loads only server.test.ts file
const testSSR = mode === 'test:ssr' || mode === 'ssr'

return {
plugins: [
solidPlugin({
// https://github.com/solidjs/solid-refresh/issues/29
hot: false,
// For testing SSR we need to do a SSR JSX transform
solid: { generate: testSSR ? 'ssr' : 'dom' },
}),
],
test: {
watch: false,
isolate: !testSSR,
env: {
NODE_ENV: testSSR ? 'production' : 'development',
DEV: testSSR ? '' : '1',
SSR: testSSR ? '1' : '',
PROD: testSSR ? '1' : '',
},
passWithNoTests: true,
environment: testSSR ? 'node' : 'jsdom',
transformMode: { web: [/\.[jt]sx$/] },
...(testSSR
? {
include: ['test/server.test.{ts,tsx}'],
}
: {
include: ['test/*.test.{ts,tsx}'],
exclude: ['test/server.test.{ts,tsx}'],
}),
},
resolve: {
conditions: testSSR ? ['node'] : ['browser', 'development'],
},
}
})
16 changes: 16 additions & 0 deletions examples/sandbox/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
<title>Solid App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>

<script src="/src/index.tsx" type="module"></script>
</body>
</html>
20 changes: 20 additions & 0 deletions examples/sandbox/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@solana-wallets-solid/sandbox",
"version": "0.0.0",
"description": "",
"private": true,
"scripts": {
"start": "vite",
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"devDependencies": {
"vite": "^5.4.0",
"vite-plugin-solid": "^2.5.0"
},
"dependencies": {
"@solana-wallets-solid/hello": "workspace:*",
"solid-js": "^1.8.18"
}
}
33 changes: 33 additions & 0 deletions examples/sandbox/src/App.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.App {
text-align: center;
}

.logo {
animation: logo-spin infinite 20s linear;
height: 40vmin;
pointer-events: none;
}

.header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.link {
color: #b318f0;
}

@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
Loading

0 comments on commit e71068b

Please sign in to comment.