Skip to content

Commit

Permalink
fix(vue-vapor): remove compiler version
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Nov 13, 2024
1 parent c574faa commit 8ea6e4f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 66 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"clean": "rimraf --glob packages/*/dist temp .eslintcache",
"size": "run-s \"size-*\" && node scripts/usage-size.js",
"size-global": "node scripts/build.js vue vue-vapor runtime-dom runtime-vapor compiler-dom -f global -p --size",
"size-esm-runtime": "node scripts/build.js vue vue-vapor -f esm-bundler-runtime",
"size-esm": "node scripts/build.js runtime-shared runtime-dom runtime-vapor runtime-core reactivity shared -f esm-bundler",
"size-esm-runtime": "node scripts/build.js vue -f esm-bundler-runtime",
"size-esm": "node scripts/build.js runtime-shared runtime-dom runtime-vapor runtime-core reactivity shared vue-vapor -f esm-bundler",
"check": "tsc --incremental --noEmit",
"lint": "eslint --cache .",
"format": "prettier --write --cache .",
Expand Down
12 changes: 4 additions & 8 deletions packages/vue-vapor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "3.0.0-vapor",
"description": "The progressive JavaScript framework for building modern web UI.",
"main": "index.js",
"module": "dist/vue-vapor.runtime.esm-bundler.js",
"module": "dist/vue-vapor.esm-bundler.js",
"types": "dist/vue-vapor.d.ts",
"unpkg": "dist/vue-vapor.global.js",
"jsdelivr": "dist/vue-vapor.global.js",
Expand All @@ -17,7 +17,7 @@
"types": "./dist/vue-vapor.d.ts",
"import": {
"node": "./index.mjs",
"default": "./dist/vue-vapor.runtime.esm-bundler.js"
"default": "./dist/vue-vapor.esm-bundler.js"
},
"require": {
"node": {
Expand All @@ -35,12 +35,9 @@
"name": "VueVapor",
"formats": [
"esm-bundler",
"esm-bundler-runtime",
"cjs",
"global",
"global-runtime",
"esm-browser",
"esm-browser-runtime"
"esm-browser"
]
},
"repository": {
Expand All @@ -57,7 +54,6 @@
},
"homepage": "https://github.com/vuejs/vue-vapor/tree/main/packages/vapor#readme",
"dependencies": {
"@vue/runtime-vapor": "workspace:*",
"@vue/compiler-vapor": "workspace:*"
"@vue/runtime-vapor": "workspace:*"
}
}
15 changes: 0 additions & 15 deletions packages/vue-vapor/src/dev.ts

This file was deleted.

19 changes: 11 additions & 8 deletions packages/vue-vapor/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// This entry is the "full-build" that includes both the runtime
// and the compiler, and supports on-the-fly compilation of the template option.
import { initDev } from './dev'
import { initCustomFormatter } from '@vue/runtime-dom'

if (__DEV__) {
initDev()
}
if (__DEV__ && __BROWSER__) {
/* istanbul ignore if */
if (!__ESM_BUNDLER__) {
console.info(
`You are running a development build of Vue.\n` +
`Make sure to use the production build (*.prod.js) when deploying for production.`,
)
}

// TODO register compiler
initCustomFormatter()
}

export { compile } from '@vue/compiler-vapor'
export * from '@vue/runtime-vapor'
26 changes: 0 additions & 26 deletions packages/vue-vapor/src/runtime.ts

This file was deleted.

3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions scripts/usage-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ const {

const sizeDir = path.resolve('temp/size')
const vue = path.resolve('./packages/vue/dist/vue.runtime.esm-bundler.js')
const vapor = path.resolve(
'./packages/vue-vapor/dist/vue-vapor.runtime.esm-bundler.js',
)
const vapor = path.resolve('./packages/vue-vapor/dist/vue-vapor.esm-bundler.js')

/**
* @typedef {Object} Preset
Expand All @@ -44,9 +42,9 @@ const presets = [
from: vue,
},
{ name: 'createApp', imports: ['createApp'], from: vue },
{ name: 'createVaporApp', imports: ['createVaporApp'], from: vapor },
{ name: 'createSSRApp', imports: ['createSSRApp'], from: vue },
{ name: 'defineCustomElement', imports: ['defineCustomElement'], from: vue },
{ name: 'vapor', imports: '*', from: vapor },
{
name: 'overall',
imports: [
Expand Down

0 comments on commit 8ea6e4f

Please sign in to comment.