Welcome to OrdersOrders!
+ + + diff --git a/vue-standalone/modules/orders/src/index.ts b/vue-standalone/modules/orders/src/index.ts new file mode 100644 index 00000000..dbd8ecf7 --- /dev/null +++ b/vue-standalone/modules/orders/src/index.ts @@ -0,0 +1 @@ +export { default as OrdersOrders } from './components/orders.vue'; diff --git a/vue-standalone/modules/orders/src/vue-shims.d.ts b/vue-standalone/modules/orders/src/vue-shims.d.ts new file mode 100644 index 00000000..798e8fcf --- /dev/null +++ b/vue-standalone/modules/orders/src/vue-shims.d.ts @@ -0,0 +1,5 @@ +declare module '*.vue' { + import { defineComponent } from 'vue'; + const component: ReturnTypeWelcome to ProductsProducts!
+ + + diff --git a/vue-standalone/modules/products/src/index.ts b/vue-standalone/modules/products/src/index.ts new file mode 100644 index 00000000..9603f170 --- /dev/null +++ b/vue-standalone/modules/products/src/index.ts @@ -0,0 +1 @@ +export { default as ProductsProducts } from './components/products.vue'; diff --git a/vue-standalone/modules/products/src/vue-shims.d.ts b/vue-standalone/modules/products/src/vue-shims.d.ts new file mode 100644 index 00000000..798e8fcf --- /dev/null +++ b/vue-standalone/modules/products/src/vue-shims.d.ts @@ -0,0 +1,5 @@ +declare module '*.vue' { + import { defineComponent } from 'vue'; + const component: ReturnTypeWelcome to SharedUiSharedUi!
+ + + diff --git a/vue-standalone/modules/shared/ui/src/index.ts b/vue-standalone/modules/shared/ui/src/index.ts new file mode 100644 index 00000000..4205bb53 --- /dev/null +++ b/vue-standalone/modules/shared/ui/src/index.ts @@ -0,0 +1 @@ +export { default as SharedUiSharedUi } from './components/shared-ui.vue'; diff --git a/vue-standalone/modules/shared/ui/src/vue-shims.d.ts b/vue-standalone/modules/shared/ui/src/vue-shims.d.ts new file mode 100644 index 00000000..798e8fcf --- /dev/null +++ b/vue-standalone/modules/shared/ui/src/vue-shims.d.ts @@ -0,0 +1,5 @@ +declare module '*.vue' { + import { defineComponent } from 'vue'; + const component: ReturnType+ You can activate distributed tasks executions and caching by + running: +
+nx connect-to-nx-cloud+ + {' '} What is Nx Cloud?{' '} + +
Here are some things you can do with Nx:
++ # Generate UI lib + nx g @nx/react:lib ui + # Add a component + nx g @nx/react:component button --project ui ++
nx graph+
+ # see what's been affected by changes + nx affected:graph + # run tests for current changes + nx affected:test + # run e2e tests for current changes + nx affected:e2e ++
+ Carefully crafted with + +
+Welcome to AppHelloWorld!
+ + + diff --git a/vue-standalone/src/main.ts b/vue-standalone/src/main.ts new file mode 100644 index 00000000..1a1fc87a --- /dev/null +++ b/vue-standalone/src/main.ts @@ -0,0 +1,28 @@ +import './styles.css'; + +import { createApp } from 'vue'; +import App from './app/App.vue'; +import NxWelcome from './app/NxWelcome.vue'; +import * as VueRouter from 'vue-router'; + +const routes = [ + { path: '/', component: NxWelcome }, + { + path: '/products', + component: () => import('products').then((m) => m.ProductsProducts), + }, + { + path: '/orders', + component: () => import('orders').then((m) => m.OrdersOrders), + }, +]; + +const router = VueRouter.createRouter({ + history: VueRouter.createWebHashHistory(), + routes, +}); + +const app = createApp(App); + +app.use(router); +app.mount('#root'); diff --git a/vue-standalone/src/styles.css b/vue-standalone/src/styles.css new file mode 100644 index 00000000..22b4e6a6 --- /dev/null +++ b/vue-standalone/src/styles.css @@ -0,0 +1,41 @@ +html { + -webkit-text-size-adjust: 100%; + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, + 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + line-height: 1.5; + tab-size: 4; + scroll-behavior: smooth; +} +body { + font-family: inherit; + line-height: inherit; + margin: 0; +} +h1, +h2, +p, +pre { + margin: 0; +} +*, +::before, +::after { + box-sizing: border-box; + border-width: 0; + border-style: solid; + border-color: currentColor; +} +h1, +h2 { + font-size: inherit; + font-weight: inherit; +} +a { + color: inherit; + text-decoration: inherit; +} +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + 'Liberation Mono', 'Courier New', monospace; +} diff --git a/vue-standalone/tsconfig.app.json b/vue-standalone/tsconfig.app.json new file mode 100644 index 00000000..50134255 --- /dev/null +++ b/vue-standalone/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./dist/out-tsc" + }, + "exclude": [ + "src/**/*.spec.ts", + "src/**/*.test.ts", + "src/**/*.spec.vue", + "src/**/*.test.vue" + ], + "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.vue"] +} diff --git a/vue-standalone/tsconfig.base.json b/vue-standalone/tsconfig.base.json new file mode 100644 index 00000000..b23339f3 --- /dev/null +++ b/vue-standalone/tsconfig.base.json @@ -0,0 +1,24 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "rootDir": ".", + "sourceMap": true, + "declaration": false, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "importHelpers": true, + "target": "es2015", + "module": "esnext", + "lib": ["es2020", "dom"], + "skipLibCheck": true, + "skipDefaultLibCheck": true, + "baseUrl": ".", + "paths": { + "orders": ["modules/orders/src/index.ts"], + "products": ["modules/products/src/index.ts"], + "shared-ui": ["modules/shared/ui/src/index.ts"] + } + }, + "exclude": ["node_modules", "tmp"] +} diff --git a/vue-standalone/tsconfig.json b/vue-standalone/tsconfig.json new file mode 100644 index 00000000..0214c7e1 --- /dev/null +++ b/vue-standalone/tsconfig.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "rootDir": ".", + "sourceMap": true, + "declaration": false, + "moduleResolution": "bundler", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "importHelpers": true, + "target": "es2015", + "module": "esnext", + "lib": ["es2020", "dom"], + "skipLibCheck": true, + "skipDefaultLibCheck": true, + "baseUrl": ".", + "paths": {}, + "allowJs": true, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "jsx": "preserve", + "jsxImportSource": "vue", + "resolveJsonModule": true, + "verbatimModuleSyntax": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "compileOnSave": false, + "exclude": ["node_modules", "tmp"] +} diff --git a/vue-standalone/tsconfig.spec.json b/vue-standalone/tsconfig.spec.json new file mode 100644 index 00000000..d2313835 --- /dev/null +++ b/vue-standalone/tsconfig.spec.json @@ -0,0 +1,25 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "types": [ + "vitest/globals", + "vitest/importMeta", + "vite/client", + "node", + "vitest" + ] + }, + "include": [ + "vite.config.ts", + "src/**/*.test.ts", + "src/**/*.spec.ts", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + "src/**/*.test.js", + "src/**/*.spec.js", + "src/**/*.test.jsx", + "src/**/*.spec.jsx", + "src/**/*.d.ts" + ] +} diff --git a/vue-standalone/vite.config.ts b/vue-standalone/vite.config.ts new file mode 100644 index 00000000..23d7e101 --- /dev/null +++ b/vue-standalone/vite.config.ts @@ -0,0 +1,32 @@ +import vue from '@vitejs/plugin-vue'; +import { defineConfig } from 'vite'; + +import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; + +export default defineConfig({ + cacheDir: './node_modules/.vite/myvueapp', + + server: { + port: 4200, + host: 'localhost', + }, + + preview: { + port: 4300, + host: 'localhost', + }, + + plugins: [nxViteTsPaths(), vue()], + + // Uncomment this if you are using workers. + // worker: { + // plugins: [ nxViteTsPaths() ], + // }, + + test: { + globals: true, + cache: { dir: './node_modules/.vitest' }, + environment: 'jsdom', + include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], + }, +});