-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(shared): initialize shared package
- Loading branch information
1 parent
c789ba8
commit f397bfb
Showing
12 changed files
with
165 additions
and
30 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
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,8 +1,13 @@ | ||
#!/usr/bin/env node | ||
import { logger } from '@rslib/shared'; | ||
import { runCli } from '../dist/es/cli.js'; | ||
|
||
async function main() { | ||
const { runCli } = require('../dist/cli'); | ||
runCli(); | ||
try { | ||
runCli(); | ||
} catch (err) { | ||
logger.error(err); | ||
} | ||
} | ||
|
||
main(); |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { defineConfig, moduleTools } from '@modern-js/module-tools'; | ||
|
||
export default defineConfig({ | ||
plugins: [moduleTools()], | ||
buildPreset: 'npm-library', | ||
}); |
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,47 @@ | ||
{ | ||
"name": "@rslib/shared", | ||
"version": "0.0.0", | ||
"description": "The internal shared modules and dependencies of Rslib.", | ||
"homepage": "https://rslib.dev", | ||
"bugs": { | ||
"url": "https://github.com/web-infra-dev/rslib/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/web-infra-dev/rslib", | ||
"directory": "packages/shared" | ||
}, | ||
"license": "MIT", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/types/index.d.ts", | ||
"import": "./dist/es/index.js", | ||
"require": "./dist/lib/index.js" | ||
} | ||
}, | ||
"main": "./dist/lib/index.js", | ||
"module": "./dist/es/index.js", | ||
"types": "./dist/types/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "modern build", | ||
"dev": "modern build --watch" | ||
}, | ||
"devDependencies": { | ||
"@rslib/tsconfig": "workspace:*", | ||
"@types/node": "18.x", | ||
"rslog": "^1.2.2", | ||
"typescript": "^5.4.5" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"provenance": true, | ||
"registry": "https://registry.npmjs.org/" | ||
} | ||
} |
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 @@ | ||
export * from './logger'; |
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,6 @@ | ||
import { type Logger, logger } from 'rslog'; | ||
|
||
// TODO: add rslib related logging functions | ||
|
||
export { logger }; | ||
export type { Logger }; |
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,9 @@ | ||
{ | ||
"extends": "@rslib/tsconfig/base", | ||
"compilerOptions": { | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler" | ||
}, | ||
"include": ["src"], | ||
"exclude": ["**/node_modules"] | ||
} |
Oops, something went wrong.