Skip to content

Commit

Permalink
fix: nuxt 配下の playground を移設
Browse files Browse the repository at this point in the history
  • Loading branch information
mewton committed Sep 30, 2023
1 parent 3edce01 commit 583af90
Show file tree
Hide file tree
Showing 38 changed files with 975 additions and 109 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
],
"scripts": {
"prepare": "turbo run prepare --parallel",
"dev": "turbo run dev --parallel",
"dev": "turbo run dev --parallel --filter='./packages/*'",
"dev:vue2": "yarn switch-2 && turbo run dev --parallel --filter=...enclosure-vue --filter=...insider-vue",
"dev:vue3": "yarn switch-3 && turbo run dev --parallel --filter=...enclosure-vue --filter=...insider-vue",
"dev:nuxt": "turbo run dev --parallel --filter=enclosure-nuxt --filter=insider-nuxt",
"dev:nuxt3": "turbo run dev --parallel --filter=...enclosure-nuxt --filter=...insider-nuxt",
"preview": "turbo run dev --parallel --filter='./playgrounds/*'",
"build": "turbo run build",
"build:graph": "turbo run build --graph",
"typecheck": "turbo run typecheck",
"test": "turbo run test",
"clean": "turbo run clean",
"clean": "turbo run clean && turbo daemon clean",
"switch-2": "vue-demi-switch 2 && vue-router-switch 3",
"switch-3": "vue-demi-switch 3 && vue-router-switch 4",
"publish-packages": "changeset publish"
Expand All @@ -42,7 +44,7 @@
"eslint-config-turbo": "^1.10.14",
"eslint-plugin-import": "^2.28.1",
"prettier": "^2.8.8",
"turbo": "^1.10.6",
"turbo": "^1.10.14",
"vue-demi": "^0.13.11"
},
"volta": {
Expand Down
11 changes: 7 additions & 4 deletions packages/enclosure-nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,26 @@
],
"scripts": {
"prepare": "nuxt-module-build --stub && nuxt prepare playground",
"dev": "nuxt dev playground --port 5175",
"dev": "npm-watch",
"build": "nuxt-module-build",
"test": "vitest run",
"typecheck": "tsc --noEmit -p tsconfig.json",
"typecheck": "tsc --noEmit",
"clean": "rm -rf dist playground/.nuxt"
},
"watch": {
"build": "./src/**"
},
"dependencies": {
"@nuxt/kit": "^3.0.0",
"@passerelle/enclosure-vue": "^0.0.1"
},
"devDependencies": {
"@nuxt/devtools": "latest",
"@nuxt/module-builder": "^0.4.0",
"@nuxt/schema": "^3.5.0",
"@nuxt/test-utils": "^3.5.0",
"@types/node": "^18",
"fixtures-vue-components": "file:../../fixtures/vue-components",
"nodemon": "^3.0.1",
"npm-watch": "^0.11.0",
"nuxt": "^3.5.0",
"typescript": "^5.1.6",
"vitest": "^0.32.2"
Expand Down
12 changes: 1 addition & 11 deletions packages/enclosure-nuxt/playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
import baseConfig from '../../../tsconfig.json'

export default defineNuxtConfig({
modules: ['../src/module'],
srcDir: './src',
css: ['~/assets/css/main.css'],

typescript: {
tsConfig: {
compilerOptions: baseConfig.compilerOptions
}
}
modules: ['../src/module']
})
1 change: 1 addition & 0 deletions packages/enclosure-nuxt/src/module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineNuxtModule, addImports, addComponent } from '@nuxt/kit'
import { name } from '../package.json'

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ModuleOptions {}

export default defineNuxtModule<ModuleOptions>({
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// vite.config.ts
import { defineConfig } from "file:///mnt/d/home/workspaces/passerelle-vue/node_modules/vite/dist/node/index.js";
import vue from "file:///mnt/d/home/workspaces/passerelle-vue/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import dts from "file:///mnt/d/home/workspaces/passerelle-vue/node_modules/vite-plugin-dts/dist/index.mjs";

// package.json
var package_default = {
name: "@passerelle/enclosure-vue",
version: "0.0.1",
description: "passerelle enclosure module for vue2 or vue3",
author: "mew-ton <[email protected]>",
license: "MIT",
repository: {
type: "git",
url: "[email protected]:hacomono-lib/passerelle.git",
directory: "packages/enclosure-vue"
},
type: "module",
exports: {
".": {
types: "./dist/types.d.ts",
import: "./dist/index.js",
require: "./dist/index.cjs"
},
"./*": "./*"
},
main: "./dist/index.cjs",
module: "./dist/index.js",
types: "./dist/types.d.ts",
files: [
"src",
"dist"
],
scripts: {
dev: "vite build --watch",
build: "vite build",
typecheck: "vue-tsc --noEmit -p tsconfig.json --composite false",
clean: "rm -rf dist"
},
dependencies: {
"@intlify/vue-router-bridge": "^1.0.1",
"@passerelle/enclosure": "^1.0.0",
"type-assurer": "^0.1.1",
"vue-demi": "^0.13.11"
},
devDependencies: {
"@types/node": "^18",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/composition-api": "^1.7.2",
"@vue/tsconfig": "^0.4.0",
typescript: "^5.1.6",
vite: "^4.3.9",
"vite-plugin-dts": "^3.2.0",
vitest: "^0.32.2",
"vue-tsc": "^1.6.5"
},
peerDependencies: {
"@vue/composition-api": "^1.0.0",
vue: "^2.6.0 || >=3.0.0",
"vue-router": "^4.0.0 || ^3.0.0"
},
peerDependenciesMeta: {
"@vue/composition-api": {
optional: true
},
"vue-router": {
optional: true
}
},
publishConfig: {
access: "public"
}
};

// vite.config.ts
var devMode = process.env["NODE_ENV"] === "development";
var vite_config_default = defineConfig({
plugins: [
vue(),
dts({
rollupTypes: true
})
],
build: {
emptyOutDir: true,
minify: false,
cssCodeSplit: false,
sourcemap: true,
lib: {
entry: "src/index.ts",
name: "PasserelleEnclosureVue",
formats: ["es", "cjs"],
fileName: "index"
},
rollupOptions: {
external: [...Object.keys(package_default.dependencies), ...Object.keys(package_default.peerDependencies)]
}
},
esbuild: {
pure: devMode ? [] : ["console.log", "console.info", "console.debug"]
},
optimizeDeps: {
exclude: ["vue-demi", "@intlify/vue-router-bridge"]
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiLCAicGFja2FnZS5qc29uIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZW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@@ -24,23 +24,26 @@
],
"scripts": {
"prepare": "nuxt-module-build --stub && nuxt prepare playground",
"dev": "nuxt dev playground --port 5176",
"dev": "npm-watch",
"build": "nuxt-module-build",
"test": "vitest run",
"typecheck": "tsc --noEmit -p tsconfig.json",
"clean": "rm -rf dist playground/.nuxt"
},
"watch": {
"build": "./src/**"
},
"dependencies": {
"@nuxt/kit": "^3.0.0",
"@passerelle/insider-vue": "^0.0.1"
},
"devDependencies": {
"@nuxt/devtools": "latest",
"@nuxt/module-builder": "^0.4.0",
"@nuxt/schema": "^3.5.0",
"@nuxt/test-utils": "^3.5.0",
"@types/node": "^18",
"fixtures-vue-components": "file:../../fixtures/vue-components",
"nodemon": "^3.0.1",
"npm-watch": "^0.11.0",
"nuxt": "^3.5.0",
"typescript": "^5.1.6",
"vitest": "^0.32.2"
Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions packages/insider-nuxt/playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import baseConfig from '../../../tsconfig.json'

export default defineNuxtConfig({
modules: ['../src/module'],
srcDir: './src',
css: ['~/assets/css/main.css'],

passerelle: {
key: 'passerelle-playground'
},

typescript: {
tsConfig: {
compilerOptions: baseConfig.compilerOptions
}
}
})
Loading

0 comments on commit 583af90

Please sign in to comment.