Skip to content

Commit

Permalink
1.0.70
Browse files Browse the repository at this point in the history
  • Loading branch information
OrJDev committed Nov 12, 2022
1 parent 542434a commit 8e143e8
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-jd-app",
"version": "1.0.69",
"version": "1.0.70",
"main": "dist/index.js",
"scripts": {
"test": "ts-node -r tsconfig-paths/register src",
Expand Down
6 changes: 2 additions & 4 deletions src/helpers/utils/getIndexPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ const getIndexPage: IUtil = (ctx) => {
const withStyles = getStyle(uswTW, "font-bold text-2xl text-gray-500");
const innerRes = getRes(ctx, shouldUsePrisma, useTRPC);
const innerContent = getContent(withStyles, shouldUsePrisma, useTRPC);
return `import { ParentComponent${
return `import { type ParentComponent${
useTRPC || shouldUsePrisma ? ", Switch, Match" : ""
}${shouldUsePrisma ? ", createResource" : ""} } from "solid-js";
import { Title } from "solid-start";${
useTRPC ? '\nimport { trpc } from "~/utils/trpc"' : ""
}
interface IHomeProps {}
const Home: ParentComponent<IHomeProps> = ({}) => {${innerRes}
const Home: ParentComponent = () => {${innerRes}
return (
<>
<Title>Home</Title>
Expand Down
1 change: 1 addition & 0 deletions src/installers/Prisma/files/client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { PrismaClient } from "@prisma/client";
import env from "~/env/server";

declare global {
// eslint-disable-next-line no-var
var prisma: PrismaClient | undefined;
}

Expand Down
4 changes: 2 additions & 2 deletions src/vercel.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { IPkg, IEnv } from "~types";

export const config = `import solid from "solid-start/vite";
import dotenv from "dotenv";
import { defineConfig } from "vite";
// @ts-ignore
// @ts-expect-error no typing
import vercel from "solid-start-vercel";
import dotenv from "dotenv";
export default defineConfig(() => {
dotenv.config();
Expand Down
14 changes: 14 additions & 0 deletions template/base/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:solid/typescript",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/consistent-type-imports": "warn"
}
}
9 changes: 7 additions & 2 deletions template/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
"scripts": {
"dev": "solid-start dev",
"build": "solid-start build",
"start": "solid-start start"
"start": "solid-start start",
"lint": "eslint --fix \"**/*.{ts,tsx,js,jsx}\""
},
"type": "module",
"devDependencies": {
"solid-start-node": "^0.2.1",
"typescript": "^4.8.3",
"vite": "^3.1.0"
"vite": "^3.1.0",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"eslint": "^8.27.0",
"eslint-plugin-solid": "^0.8.0"
},
"dependencies": {
"@solidjs/meta": "^0.28.0",
Expand Down
2 changes: 1 addition & 1 deletion template/base/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import solid from "solid-start/vite";
import { defineConfig } from "vite";
import dotenv from "dotenv";
import { defineConfig } from "vite";

export default defineConfig(() => {
dotenv.config();
Expand Down

0 comments on commit 8e143e8

Please sign in to comment.