-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
667 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
'@vue-macros/reactivity-transform': patch | ||
'@vue-macros/define-props-refs': patch | ||
'@vue-macros/setup-component': patch | ||
'unplugin-vue-define-options': patch | ||
'@vue-macros/named-template': patch | ||
'@vue-macros/better-define': patch | ||
'@vue-macros/define-render': patch | ||
'@vue-macros/define-model': patch | ||
'@vue-macros/define-props': patch | ||
'@vue-macros/define-slots': patch | ||
'@vue-macros/export-props': patch | ||
'@vue-macros/hoist-static': patch | ||
'@vue-macros/short-vmodel': patch | ||
'@vue-macros/setup-block': patch | ||
'@vue-macros/short-emits': patch | ||
'@vue-macros/setup-sfc': patch | ||
'@vue-macros/devtools': patch | ||
'@vue-macros/common': patch | ||
'unplugin-vue-macros': patch | ||
'@vue-macros/volar': patch | ||
'@vue-macros/nuxt': patch | ||
'@vue-macros/api': patch | ||
--- | ||
|
||
tidy package manifests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import path from 'node:path' | ||
import { defineConfig } from 'monoman' | ||
|
||
function getPkgName(filepath: string) { | ||
const relative = path.relative(process.cwd(), filepath) | ||
const [, pkgName] = relative.split(path.sep) | ||
return pkgName | ||
} | ||
|
||
export default defineConfig([ | ||
{ | ||
include: ['packages/*/package.json'], | ||
type: 'json', | ||
write(data: Record<string, any>, { filepath }) { | ||
const pkgName = getPkgName(filepath) | ||
|
||
const descriptions: Record<string, string> = { | ||
'define-options': 'Add defineOptions macro for Vue <script setup>.', | ||
macros: 'Explore and extend more macros and syntax sugar to Vue.', | ||
volar: 'Volar plugin for Vue Macros.', | ||
devtools: 'Devtools plugin for Vue Macros.', | ||
api: 'General API for Vue Macros.', | ||
} | ||
if (!data.private) { | ||
data.description = | ||
descriptions[pkgName] || `${pkgName} feature from Vue Macros.` | ||
data.keywords = [ | ||
'vue-macros', | ||
'macros', | ||
'vue', | ||
'sfc', | ||
'setup', | ||
'script-setup', | ||
pkgName, | ||
] | ||
} | ||
data.license = 'MIT' | ||
if (pkgName === 'define-options') { | ||
data.homepage = | ||
'https://github.com/sxzz/unplugin-vue-macros/tree/main/packages/define-options#readme' | ||
} else { | ||
data.homepage = 'https://github.com/sxzz/unplugin-vue-macros#readme' | ||
} | ||
|
||
data.bugs = { url: 'https://github.com/sxzz/unplugin-vue-macros/issues' } | ||
data.repository = { | ||
type: 'git', | ||
url: 'git+https://github.com/sxzz/unplugin-vue-macros.git', | ||
directory: `packages/${pkgName}`, | ||
} | ||
data.author = '三咲智子 <sxzz@sxzz.moe>' | ||
data.engines = { node: '>=14.19.0' } | ||
|
||
if (Object.keys(data.dependencies).includes('unplugin')) { | ||
const frameworks = ['vite', 'webpack', 'rollup', 'esbuild'] | ||
data.keywords.push('unplugin') | ||
data.exports = { | ||
'.': { | ||
dev: './src/index.ts', | ||
types: './dist/index.d.ts', | ||
require: './dist/index.js', | ||
import: './dist/index.mjs', | ||
}, | ||
...Object.fromEntries( | ||
frameworks.map((framework) => [ | ||
`./${framework}`, | ||
{ | ||
dev: `./src/${framework}.ts`, | ||
types: `./dist/${framework}.d.ts`, | ||
require: `./dist/${framework}.js`, | ||
import: `./dist/${framework}.mjs`, | ||
}, | ||
]) | ||
), | ||
'./*': ['./*', './*.d.ts'], | ||
} | ||
data.typesVersions = { | ||
'<=4.9': { | ||
'*': ['./dist/*', './*'], | ||
}, | ||
} | ||
} | ||
|
||
return data | ||
}, | ||
}, | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
import cfg from '../common/tsup.config.js' | ||
|
||
export default cfg | ||
export { default } from '../../tsup.config.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
import cfg from '../common/tsup.config.js' | ||
|
||
export default cfg | ||
export { default } from '../../tsup.config.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1 @@ | ||
import { readFile } from 'node:fs/promises' | ||
import { defineConfig } from 'tsup' | ||
|
||
const rawRE = /[&?]raw(?:&|$)/ | ||
|
||
export default defineConfig({ | ||
entry: ['./src/*.ts'], | ||
format: ['cjs', 'esm'], | ||
target: 'node14', | ||
splitting: true, | ||
watch: !!process.env.DEV, | ||
dts: process.env.DEV | ||
? false | ||
: { | ||
compilerOptions: { | ||
composite: false, | ||
customConditions: ['dev'], | ||
}, | ||
}, | ||
tsconfig: '../../tsconfig.lib.json', | ||
clean: true, | ||
define: { | ||
'import.meta.DEV': JSON.stringify(!!process.env.DEV), | ||
}, | ||
esbuildOptions: (options) => { | ||
options.conditions = ['dev'] | ||
}, | ||
esbuildPlugins: [ | ||
{ | ||
name: 'raw-plugin', | ||
setup(build) { | ||
build.onLoad({ filter: /.*/ }, async ({ path, suffix }) => { | ||
if (!rawRE.test(suffix)) return | ||
// raw query, read file and return as string | ||
return { | ||
contents: `export default ${JSON.stringify( | ||
await readFile(path, 'utf-8') | ||
)}`, | ||
} | ||
}) | ||
}, | ||
}, | ||
], | ||
}) | ||
export { default } from '../../tsup.config.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
import cfg from '../common/tsup.config.js' | ||
|
||
export default cfg | ||
export { default } from '../../tsup.config.js' |
Oops, something went wrong.