diff --git a/packages/template-blank-vue-ts/app/app.css b/packages/template-blank-vue-ts/app/app.css index a8612f94..e2b5b300 100644 --- a/packages/template-blank-vue-ts/app/app.css +++ b/packages/template-blank-vue-ts/app/app.css @@ -1,6 +1,4 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import "tailwindcss"; ActionBar { background-color: #65adf1; diff --git a/packages/template-blank-vue-ts/app/app.ts b/packages/template-blank-vue-ts/app/app.ts index 1ef139f9..d396ccee 100644 --- a/packages/template-blank-vue-ts/app/app.ts +++ b/packages/template-blank-vue-ts/app/app.ts @@ -1,11 +1,5 @@ -import Vue from 'nativescript-vue' -import Home from './components/Home.vue' - -declare let __DEV__: boolean; +import { createApp } from 'nativescript-vue' -// Prints Vue logs when --env.production is *NOT* set while building -Vue.config.silent = !__DEV__ +import Home from './components/Home.vue' -new Vue({ - render: (h) => h('frame', [h(Home)]), -}).$start() +createApp(Home).start() diff --git a/packages/template-blank-vue-ts/app/components/Home.vue b/packages/template-blank-vue-ts/app/components/Home.vue index 965a6e7f..086679c1 100644 --- a/packages/template-blank-vue-ts/app/components/Home.vue +++ b/packages/template-blank-vue-ts/app/components/Home.vue @@ -11,9 +11,7 @@ - - diff --git a/packages/template-blank-vue-ts/package.json b/packages/template-blank-vue-ts/package.json index b9104848..03777551 100644 --- a/packages/template-blank-vue-ts/package.json +++ b/packages/template-blank-vue-ts/package.json @@ -2,7 +2,7 @@ "name": "@nativescript/template-blank-vue-ts", "main": "app/app.ts", "displayName": "Blank Vue Typescript", - "version": "9.0.6", + "version": "9.0.7", "description": "Blank Typescript template for NativeScript apps using Vue.", "author": "NativeScript Team ", "license": "Apache-2.0", @@ -25,8 +25,6 @@ "!tools/assets", "types", ".editorconfig", - "tailwind.config.js", - "webpack.config.js", "tsconfig.json" ], "keywords": [ @@ -44,18 +42,14 @@ ], "dependencies": { "@nativescript/core": "~9.0.0", - "nativescript-vue": "~2.9.3" + "nativescript-vue": "^3.0.0" }, "devDependencies": { - "@nativescript/tailwind": "^2.1.0", + "@nativescript/tailwind": "^4.0.0", "@nativescript/types": "~9.0.0", "@nativescript/webpack": "~5.0.31", "@types/node": "^20.0.0", - "nativescript-vue-template-compiler": "~2.9.3", - "tailwindcss": "~3.4.0", - "typescript": "~5.4.0", - "vue": "~2.6.12", - "vue-loader": "^15.11.1", - "vue-template-compiler": "~2.6.12" + "tailwindcss": "^4.0.0", + "typescript": "~5.4.0" } } diff --git a/packages/template-blank-vue-ts/tailwind.config.js b/packages/template-blank-vue-ts/tailwind.config.js deleted file mode 100644 index c3d500df..00000000 --- a/packages/template-blank-vue-ts/tailwind.config.js +++ /dev/null @@ -1,13 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: ['./app/**/*.{css,html,vue,ts,tsx}'], - // use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported. - darkMode: ['class', '.ns-dark'], - theme: { - extend: {}, - }, - plugins: [], - corePlugins: { - preflight: false, // disables browser-specific resets - }, -} diff --git a/packages/template-blank-vue-ts/types/shims.vue.d.ts b/packages/template-blank-vue-ts/types/shims.vue.d.ts index d9f24faa..19b53494 100644 --- a/packages/template-blank-vue-ts/types/shims.vue.d.ts +++ b/packages/template-blank-vue-ts/types/shims.vue.d.ts @@ -1,4 +1,5 @@ declare module '*.vue' { - import Vue from 'vue' - export default Vue + import { DefineComponent } from 'nativescript-vue' + const component: DefineComponent<{}, {}, any> + export default component } diff --git a/packages/template-blank-vue-ts/webpack.config.js b/packages/template-blank-vue-ts/webpack.config.js deleted file mode 100644 index 5546b8e7..00000000 --- a/packages/template-blank-vue-ts/webpack.config.js +++ /dev/null @@ -1,38 +0,0 @@ -const webpack = require("@nativescript/webpack"); -const path = require("path"); -const VueLoaderPlugin = require("vue-loader/lib/plugin"); - -module.exports = (env) => { - webpack.init(env); - - // Learn how to customize: - // https://docs.nativescript.org/webpack - - webpack.chainWebpack((config) => { - // Use vue-loader@15 for Vue 2 - config.resolve.alias.set( - "vue-loader", - path.resolve(__dirname, "node_modules/vue-loader") - ); - - // Remove the default VueLoaderPlugin (v17) and add v15 - config.plugins.delete("VueLoaderPlugin"); - config.plugin("VueLoaderPlugin").use(VueLoaderPlugin); - - // Configure vue-loader for Vue 2 - config.module - .rule("vue") - .use("vue-loader") - .loader(require.resolve("vue-loader")) - .tap((options) => ({ - ...options, - compiler: require("vue-template-compiler"), - compilerOptions: { - whitespace: 'condense', - preserveWhitespace: false, - }, - })); - }); - - return webpack.resolveConfig(); -}; diff --git a/packages/template-blank-vue/app/app.css b/packages/template-blank-vue/app/app.css index a8612f94..e2b5b300 100644 --- a/packages/template-blank-vue/app/app.css +++ b/packages/template-blank-vue/app/app.css @@ -1,6 +1,4 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import "tailwindcss"; ActionBar { background-color: #65adf1; diff --git a/packages/template-blank-vue/app/app.js b/packages/template-blank-vue/app/app.js index 763c5d60..d396ccee 100644 --- a/packages/template-blank-vue/app/app.js +++ b/packages/template-blank-vue/app/app.js @@ -1,7 +1,5 @@ -import Vue from 'nativescript-vue' +import { createApp } from 'nativescript-vue' -import Home from './components/Home' +import Home from './components/Home.vue' -new Vue({ - render: (h) => h('frame', [h(Home)]), -}).$start() +createApp(Home).start() diff --git a/packages/template-blank-vue/package.json b/packages/template-blank-vue/package.json index 0e7cd36e..99f3ed65 100644 --- a/packages/template-blank-vue/package.json +++ b/packages/template-blank-vue/package.json @@ -2,7 +2,7 @@ "name": "@nativescript/template-blank-vue", "main": "app/app.js", "displayName": "Blank", - "version": "9.0.5", + "version": "9.0.6", "description": "Blank template for NativeScript apps using Vue.", "author": "NativeScript Team ", "license": "Apache-2.0", @@ -24,9 +24,7 @@ "tools", "!tools/assets", ".editorconfig", - "jsconfig.json", - "tailwind.config.js", - "webpack.config.js" + "jsconfig.json" ], "keywords": [ "nstudio", @@ -43,15 +41,11 @@ ], "dependencies": { "@nativescript/core": "~9.0.0", - "nativescript-vue": "~2.9.3" + "nativescript-vue": "^3.0.0" }, "devDependencies": { - "@nativescript/tailwind": "^2.1.0", + "@nativescript/tailwind": "^4.0.0", "@nativescript/webpack": "~5.0.31", - "nativescript-vue-template-compiler": "~2.9.3", - "tailwindcss": "~3.4.0", - "vue": "~2.6.12", - "vue-loader": "^15.11.1", - "vue-template-compiler": "~2.6.12" + "tailwindcss": "^4.0.0" } } diff --git a/packages/template-blank-vue/tailwind.config.js b/packages/template-blank-vue/tailwind.config.js deleted file mode 100644 index c3d500df..00000000 --- a/packages/template-blank-vue/tailwind.config.js +++ /dev/null @@ -1,13 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: ['./app/**/*.{css,html,vue,ts,tsx}'], - // use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported. - darkMode: ['class', '.ns-dark'], - theme: { - extend: {}, - }, - plugins: [], - corePlugins: { - preflight: false, // disables browser-specific resets - }, -} diff --git a/packages/template-blank-vue/webpack.config.js b/packages/template-blank-vue/webpack.config.js deleted file mode 100644 index 1365b983..00000000 --- a/packages/template-blank-vue/webpack.config.js +++ /dev/null @@ -1,38 +0,0 @@ -const webpack = require("@nativescript/webpack"); -const path = require("path"); -const VueLoaderPlugin = require("vue-loader/lib/plugin"); - -module.exports = (env) => { - webpack.init(env); - - // Learn how to customize: - // https://docs.nativescript.org/webpack - - webpack.chainWebpack((config) => { - // Use vue-loader@15 for Vue 2 - config.resolve.alias.set( - "vue-loader", - path.resolve(__dirname, "node_modules/vue-loader") - ); - - // Remove the default VueLoaderPlugin (v17) and add v15 - config.plugins.delete("VueLoaderPlugin"); - config.plugin("VueLoaderPlugin").use(VueLoaderPlugin); - - // Configure vue-loader for Vue 2 - config.module - .rule("vue") - .use("vue-loader") - .loader(require.resolve("vue-loader")) - .tap((options) => ({ - ...options, - compiler: require("vue-template-compiler"), - compilerOptions: { - whitespace: 'condense', - preserveWhitespace: false, - }, - })); - }); - - return webpack.resolveConfig(); -}; diff --git a/packages/template-drawer-navigation-vue/app/_app-common.scss b/packages/template-drawer-navigation-vue/app/_app-common.scss deleted file mode 100644 index e9457e1c..00000000 --- a/packages/template-drawer-navigation-vue/app/_app-common.scss +++ /dev/null @@ -1,43 +0,0 @@ -@import '@nativescript/theme/core'; -@import '@nativescript/theme/default'; - -// Place any CSS rules you want to apply on both iOS and Android here. -// This is where the vast majority of your CSS code goes. - -// Font icon class -.fab { - font-family: 'Font Awesome 5 Brands', 'fa-brands-400'; - font-weight: 400; -} - -.fas { - font-family: 'Font Awesome 5 Free', 'fa-solid-900'; - font-weight: 900; -} - -.far { - font-family: 'Font Awesome 5 Free', 'fa-regular-400'; - font-weight: 400; -} - -// Common page class -.page__content { - &-icon, - &-placeholder { - color: const(grey); - font-size: 20; - vertical-align: center; - horizontal-align: center; - } - - &-icon { - font-size: 72; - vertical-align: top; - margin-top: 20%; - } -} - -// Drawer navigation custom styles -.nt-drawer__header-image { - color: const(grey); -} diff --git a/packages/template-drawer-navigation-vue/app/app.android.scss b/packages/template-drawer-navigation-vue/app/app.android.scss deleted file mode 100644 index 52162715..00000000 --- a/packages/template-drawer-navigation-vue/app/app.android.scss +++ /dev/null @@ -1,4 +0,0 @@ -// Import common styles -@import 'app-common'; - -// Place any CSS rules you want to apply only on Android here diff --git a/packages/template-drawer-navigation-vue/app/app.css b/packages/template-drawer-navigation-vue/app/app.css new file mode 100644 index 00000000..6d13c799 --- /dev/null +++ b/packages/template-drawer-navigation-vue/app/app.css @@ -0,0 +1,21 @@ +@import "tailwindcss"; + +ActionBar { + background-color: #65adf1; + color: white; +} + +.fas { + font-family: 'Font Awesome 5 Free', 'fa-solid-900'; + font-weight: 900; +} + +.far { + font-family: 'Font Awesome 5 Free', 'fa-regular-400'; + font-weight: 400; +} + +.fab { + font-family: 'Font Awesome 5 Brands', 'fa-brands-400'; + font-weight: 400; +} diff --git a/packages/template-drawer-navigation-vue/app/app.ios.scss b/packages/template-drawer-navigation-vue/app/app.ios.scss deleted file mode 100644 index 93aa9c27..00000000 --- a/packages/template-drawer-navigation-vue/app/app.ios.scss +++ /dev/null @@ -1,4 +0,0 @@ -// Import common styles -@import 'app-common'; - -// Place any CSS rules you want to apply only on iOS here diff --git a/packages/template-drawer-navigation-vue/app/app.js b/packages/template-drawer-navigation-vue/app/app.js index 06ab81b8..62a4983c 100644 --- a/packages/template-drawer-navigation-vue/app/app.js +++ b/packages/template-drawer-navigation-vue/app/app.js @@ -1,12 +1,8 @@ -import Vue from 'nativescript-vue' -import RadSideDrawer from 'nativescript-ui-sidedrawer/vue' +import { createApp } from 'nativescript-vue' +import DrawerPlugin from '@nativescript-community/ui-drawer/vue3' -Vue.use(RadSideDrawer) +import App from './components/App.vue' -import App from './components/App' - -Vue.config.silent = !__DEV__ - -new Vue({ - render: h => h(App) -}).$start() +const app = createApp(App) +app.use(DrawerPlugin) +app.start() diff --git a/packages/template-drawer-navigation-vue/app/components/App.vue b/packages/template-drawer-navigation-vue/app/components/App.vue index 32772509..994b76fc 100644 --- a/packages/template-drawer-navigation-vue/app/components/App.vue +++ b/packages/template-drawer-navigation-vue/app/components/App.vue @@ -1,37 +1,22 @@ -