Skip to content

Commit 6764550

Browse files
committed
feat(solid): improve default setup
1 parent 350ee92 commit 6764550

11 files changed

Lines changed: 46 additions & 84 deletions

File tree

packages/template-blank-solid-ts/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/template-blank-solid-ts",
3-
"main": "src/index.js",
3+
"main": "src/index.ts",
44
"version": "9.0.0",
55
"description": "Nativescript Starter with Solid",
66
"author": "NativeScript Team <oss@nativescript.org>",
@@ -39,25 +39,25 @@
3939
],
4040
"scripts": {},
4141
"dependencies": {
42-
"@nativescript-community/solid-js": "^0.0.6",
42+
"@nativescript-community/solid-js": "^0.1.2",
4343
"@nativescript/core": "~9.0.0",
4444
"dominative": "^0.1.3",
45-
"solid-js": "^1.8.21",
45+
"solid-js": "^1.9.11",
4646
"solid-navigation": "1.0.0-alpha.16",
4747
"undom-ng": "^1.1.2"
4848
},
4949
"devDependencies": {
5050
"@babel/core": "^7.24.4",
5151
"@babel/preset-env": "^7.24.4",
5252
"@babel/preset-typescript": "^7.23.3",
53-
"@nativescript-dom/core-types": "1.0.29",
54-
"@nativescript-dom/solidjs-types": "1.0.23",
53+
"@nativescript-dom/core-types": "~1.0.32",
54+
"@nativescript-dom/solidjs-types": "~1.0.25",
5555
"@nativescript/types": "~9.0.0",
56-
"@nativescript/webpack": "~5.0.25",
56+
"@nativescript/webpack": "~5.0.32",
5757
"babel": "^6.23.0",
5858
"babel-loader": "^9.1.3",
5959
"babel-preset-solid": "^1.8.19",
6060
"solid-refresh": "^0.7.5",
61-
"typescript": "~5.4.0"
61+
"typescript": "~5.9.0"
6262
}
6363
}
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
.fab {
2-
font-family: 'Font Awesome 5 Brands', 'fa-brands-400';
3-
font-weight: 400;
4-
}
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
54

6-
.fas {
7-
font-family: 'Font Awesome 5 Free', 'fa-solid-900';
8-
font-weight: 900;
5+
.ns-light Page {
6+
background-color: #edf1f9;
97
}
108

11-
.far {
12-
font-family: 'Font Awesome 5 Free', 'fa-regular-400';
13-
font-weight: 400;
14-
}
9+
.ns-dark Page {
10+
background-color: #1b1f28;
11+
}

packages/template-blank-solid-ts/src/components/home.tsx

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
1-
import { useRoute } from 'solid-navigation';
1+
import { useRoute } from 'solid-navigation'
22

33
export default function Home() {
4-
const route = useRoute();
5-
const message = 'Blank SolidJS App'
4+
const route = useRoute()
5+
const message = 'SolidJS App'
66

77
return (
88
<>
99
<actionbar title={route.name} />
1010
<gridlayout>
1111
<label
12-
style={{
13-
fontSize: 20,
14-
horizontalAlignment: 'center',
15-
verticalAlignment: 'middle',
16-
}}
17-
>
18-
<formattedstring>
19-
<span
20-
className="fas"
21-
text={String.fromCharCode(0xf135)}
22-
style={{
23-
color: '#3A53FF',
24-
}}
25-
/>
26-
<span text={` ${message}`} />
27-
</formattedstring>
28-
</label>
12+
text={message}
13+
class="text-center text-2xl font-bold"
14+
/>
2915
</gridlayout>
3016
</>
3117
)

packages/template-blank-solid-ts/src/fonts/LICENSE.txt

Lines changed: 0 additions & 34 deletions
This file was deleted.
-128 KB
Binary file not shown.
-33.3 KB
Binary file not shown.
-188 KB
Binary file not shown.

packages/template-blank-solid-ts/src/index.js

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { render } from "@nativescript-community/solid-js";
2+
import { Application } from "@nativescript/core";
3+
import { document } from "dominative";
4+
import { App } from "./app";
5+
6+
Application.run({
7+
create: () => {
8+
render(App, document.body);
9+
return document;
10+
},
11+
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/** @type {import('tailwindcss').Config} */
2+
module.exports = {
3+
content: ['./src/**/*.{css,xml,html,ts,tsx,jsx}'],
4+
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
5+
darkMode: ['class', '.ns-dark'],
6+
theme: {
7+
extend: {},
8+
},
9+
plugins: [],
10+
corePlugins: {
11+
preflight: false, // disables browser-specific resets
12+
},
13+
}

0 commit comments

Comments
 (0)