Skip to content

Commit

Permalink
refactor(cli): rewrite CLI on new render pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous committed Jan 16, 2023
1 parent f8e1e0c commit e358e0d
Show file tree
Hide file tree
Showing 22 changed files with 981 additions and 1,066 deletions.
7 changes: 6 additions & 1 deletion config/vite.config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ interface PackageMeta {

interface LibraryPackageMeta extends PackageMeta {
exports: PackageJsonExports
bin?: Record<string, string>
dependencies?: Record<string, string>
devDependencies?: Record<string, string>
}
Expand All @@ -31,6 +32,7 @@ export function defineBaseConfig(
const baseConfig = {
define: {
__PKG_NAME__: JSON.stringify(name),

__PKG_VERSION__: JSON.stringify(version),
__PKG_DESCRIPTION__: JSON.stringify(description),
},
Expand All @@ -49,8 +51,11 @@ export function defineLibraryConfig(
packageMeta: LibraryPackageMeta,
formats?: LibraryFormats[]
): UserConfig {
const {name, exports, dependencies = {}} = packageMeta
const {name, exports, bin = {}, dependencies = {}} = packageMeta
const libraryConfig = {
define: {
__PKG_BIN_NAME__: JSON.stringify(Object.keys(bin).at(0)),
},
build: {
lib: {
entry: exports.source,
Expand Down
190 changes: 0 additions & 190 deletions packages/cli/CHANGELOG.md

This file was deleted.

0 comments on commit e358e0d

Please sign in to comment.