Skip to content

Commit

Permalink
Merge pull request #9 from FrontEndDev-org/feat/v1.x
Browse files Browse the repository at this point in the history
Feat/v1.x
  • Loading branch information
cloudcome authored Apr 1, 2023
2 parents 8de35a2 + b6a90f6 commit f20ac1a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 28 deletions.
23 changes: 1 addition & 22 deletions package-lock.json

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

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@
"homepage": "https://github.com/FrontEndDev-org/try-flatten",
"repository": "https://github.com/FrontEndDev-org/try-flatten",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@commitlint/types": "^17.4.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-typescript": "^11.0.0",
"@types/node": "^18.15.7",
Expand Down
3 changes: 1 addition & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json from '@rollup/plugin-json';
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';
import pkg from './package.json' assert { type: 'json' };
Expand All @@ -23,8 +22,8 @@ export default {
},
],
plugins: [
json(),
replace({
preventAssignment: true,
'process.env.PKG_NAME': JSON.stringify(pkg.name),
'process.env.PKG_VERSION': JSON.stringify(pkg.version),
}),
Expand Down
3 changes: 2 additions & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const version = process.env.PKG_VERSION;
export const pkgName = process.env.PKG_NAME!;
export const pkgVersion = process.env.PKG_VERSION!;
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './const';
export { pkgName, pkgVersion } from './const';
export * from './normalize-error';
export * from './try-sync-flatten';
export * from './try-callback-flatten';
Expand Down

0 comments on commit f20ac1a

Please sign in to comment.