Skip to content

Commit 0e674de

Browse files
committed
feat(vue): simplify setup
1 parent 63d8d29 commit 0e674de

File tree

9 files changed

+28
-45
lines changed

9 files changed

+28
-45
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@nativescript/template-blank-vue-ts",
33
"main": "app/app.ts",
44
"displayName": "Blank Vue Typescript",
5-
"version": "9.0.4",
5+
"version": "9.0.5",
66
"description": "Blank Typescript template for NativeScript apps using Vue.",
77
"author": "NativeScript Team <[email protected]>",
88
"license": "Apache-2.0",
@@ -47,6 +47,7 @@
4747
"nativescript-vue": "~2.9.3"
4848
},
4949
"devDependencies": {
50+
"@nativescript/tailwind": "^2.1.0",
5051
"@nativescript/types": "~9.0.0",
5152
"@nativescript/webpack": "~5.0.31",
5253
"@types/node": "^20.0.0",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
ActionBar {
6+
background-color: #65adf1;
7+
color: white;
8+
}

packages/template-blank-vue/app/app.scss

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/template-blank-vue/app/components/Home.vue

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@
55
</ActionBar>
66

77
<GridLayout>
8-
<Label class="info">
9-
<FormattedString>
10-
<Span class="fas" text.decode="&#xf135; "/>
11-
<Span :text="message"/>
12-
</FormattedString>
13-
</Label>
8+
<Label class="text-xl align-middle text-center text-gray-500" :text="message" />
149
</GridLayout>
1510
</Page>
1611
</template>
@@ -24,18 +19,3 @@
2419
}
2520
};
2621
</script>
27-
28-
<style scoped lang="scss">
29-
@import '@nativescript/theme/scss/variables/blue';
30-
31-
// Custom styles
32-
.fas {
33-
@include colorize($color: accent);
34-
}
35-
36-
.info {
37-
font-size: 20;
38-
horizontal-align: center;
39-
vertical-align: center;
40-
}
41-
</style>
-131 KB
Binary file not shown.
-39.1 KB
Binary file not shown.
-204 KB
Binary file not shown.

packages/template-blank-vue/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@nativescript/template-blank-vue",
33
"main": "app/app.js",
44
"displayName": "Blank",
5-
"version": "9.0.3",
5+
"version": "9.0.4",
66
"description": "Blank template for NativeScript apps using Vue.",
77
"author": "NativeScript Team <[email protected]>",
88
"license": "Apache-2.0",
@@ -25,6 +25,7 @@
2525
"!tools/assets",
2626
".editorconfig",
2727
"jsconfig.json",
28+
"tailwind.config.js",
2829
"webpack.config.js"
2930
],
3031
"keywords": [
@@ -42,12 +43,13 @@
4243
],
4344
"dependencies": {
4445
"@nativescript/core": "~9.0.0",
45-
"@nativescript/theme": "^3.1.0",
4646
"nativescript-vue": "~2.9.3"
4747
},
4848
"devDependencies": {
49+
"@nativescript/tailwind": "^2.1.0",
4950
"@nativescript/webpack": "~5.0.31",
5051
"nativescript-vue-template-compiler": "~2.9.3",
52+
"tailwindcss": "~3.4.0",
5153
"vue": "~2.6.12",
5254
"vue-loader": "^15.11.1",
5355
"vue-template-compiler": "~2.6.12"
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: ['./app/**/*.{css,html,vue,ts,tsx}'],
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)