Skip to content

Commit

Permalink
Merge pull request #41 from todays-mitsui/solid-start
Browse files Browse the repository at this point in the history
SolidStart
  • Loading branch information
todays-mitsui authored Jan 29, 2025
2 parents 831e6ad + a6f4755 commit 5fc3173
Show file tree
Hide file tree
Showing 130 changed files with 16,591 additions and 21 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ node_modules
/wasm-pack.log
.DS_Store

pkg/
target/
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
npm run precommit
git add --all
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"rust-analyzer.linkedProjects": ["./ski/Cargo.toml", "./tuber/Cargo.toml"]
"rust-analyzer.linkedProjects": ["./ski/Cargo.toml", "./tuber/Cargo.toml"],
"files.exclude": {
"mogul/**/*.module.css.d.*": true,
},
}
2 changes: 1 addition & 1 deletion js/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function wrapParts(wrap, str, ranges, offset = 0) {
fragment.appendChild(document.createTextNode(s));
}
} else {
const index = (i - 1) * 0.5;
const index = (i - 1) * 0.5; // i >> 1
fragment.appendChild(wrap(index, s));
}
}
Expand Down
31 changes: 31 additions & 0 deletions mogul/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

dist
.solid
.output
.vercel
.netlify
.vinxi
app.config.timestamp_*.js

# Environment
.env
.env*.local

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
*.launch
.settings/

# Temp
gitignore

# System Files
.DS_Store
Thumbs.db

*storybook.log
29 changes: 29 additions & 0 deletions mogul/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { StorybookConfig } from "storybook-solidjs-vite";
import { mergeConfig } from "vite";
import wasm from "vite-plugin-wasm";
import topLevelAwait from "vite-plugin-top-level-await";
import tsconfigPaths from "vite-tsconfig-paths";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
name: "storybook-solidjs-vite",
options: {},
},
async viteFinal(config) {
return mergeConfig(config, {
plugins: [tsconfigPaths(), wasm(), topLevelAwait()],
css: {
modules: {
localsConvention: 'camelCase',
}
},
});
},
};
export default config;
14 changes: 14 additions & 0 deletions mogul/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import "~/global.css";

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
42 changes: 42 additions & 0 deletions mogul/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# SolidStart

Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com);

## Creating a project

```bash
# create a new project in the current directory
npm init solid@latest

# create a new project in my-app
npm init solid@latest my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

Solid apps are built with _presets_, which optimise your project for deployment to different environments.

By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`.

## Testing

Tests are written with `vitest`, `@solidjs/testing-library` and `@testing-library/jest-dom` to extend expect with some helpful custom matchers.

To run them, simply start:

```sh
npm test
```

## This project was created with the [Solid CLI](https://solid-cli.netlify.app)
14 changes: 14 additions & 0 deletions mogul/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from "@solidjs/start/config";
import wasm from "vite-plugin-wasm";
import topLevelAwait from "vite-plugin-top-level-await";

export default defineConfig({
vite: {
plugins: [wasm(), topLevelAwait()],
css: {
modules: {
localsConvention: 'camelCase',
}
}
},
});
17 changes: 17 additions & 0 deletions mogul/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"formatter": {
"enabled": true,
"ignore": ["*.d.ts"],
"indentStyle": "space"
},
"organizeImports": {
"enabled": true,
"include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
},
"css": {
"parser": {
"cssModules": true
}
}
}
Loading

0 comments on commit 5fc3173

Please sign in to comment.