Adding minimal & tailwind template

This commit is contained in:
Alexandre
2020-08-13 22:18:05 +02:00
parent 0181578698
commit 8967356fc1
29 changed files with 5574 additions and 293 deletions
+2
View File
@@ -0,0 +1,2 @@
node_modules
dist
+28
View File
@@ -0,0 +1,28 @@
## Usage
```bash
$ npm install # or pnpm install or yarn install
```
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br>
### `npm run build`
Builds the app for production to the `dist` folder.<br>
It correctly bundles Solid in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!
## Deployment
You can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.)
+16
View File
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="./assets/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<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.ts" type="module"></script>
</body>
</html>
+18
View File
@@ -0,0 +1,18 @@
{
"name": "vite-template-solid",
"version": "0.0.0",
"description": "My solid + vite project + ts",
"scripts": {
"start": "vite",
"build": "vite build"
},
"license": "ISC",
"devDependencies": {
"@amoutonbrady/vite-plugin-solid": "^0.1.1",
"vite": "^1.0.0-rc.4",
"tailwindcss": "^1.6.2"
},
"dependencies": {
"solid-js": "^0.18.14"
}
}
+2676
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
plugins: [require("tailwindcss")],
};
+7
View File
@@ -0,0 +1,7 @@
import { Component } from "solid-js";
const App: Component = () => {
return <p>minimal</p>;
};
export default App;
+7
View File
@@ -0,0 +1,7 @@
import "./tailwind.css";
import { render } from "solid-js/dom";
import App from "./App";
export const rootEl = document.getElementById("root");
export const dispose = render(() => App, rootEl);
+5
View File
@@ -0,0 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+14
View File
@@ -0,0 +1,14 @@
module.exports = {
purge: [
"src/**/*.tsx",
"src/**/*.ts",
"src/**/*.html",
"src/**/*.css",
"index.html",
],
theme: {
extend: {},
},
variants: {},
plugins: [],
};
+11
View File
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
"types": ["vite", "solid-js", "solid-js/dom"]
}
}
+10
View File
@@ -0,0 +1,10 @@
import { UserConfig } from "vite";
import { solidPlugin } from "@amoutonbrady/vite-plugin-solid";
const config: UserConfig = {
outDir: "dist",
plugins: [solidPlugin()],
enableEsbuild: false,
};
export default config;