Skip to content

Commit

Permalink
fix: ignore egg properties
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Dec 22, 2024
1 parent 7efc108 commit 4321bac
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ export function getDirname() {
}
```

## Auto copy egg meta properties package.json

Copy `eggPlugin`, `egg` to `dist/package.json`

## License

[MIT](LICENSE)
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n')
writeFileSync('dist/package.json', JSON.stringify({
name: pkg.name,
version: pkg.version,
eggPlugin: pkg.eggPlugin,
egg: pkg.egg,
}, null, 2) + '\n')

// Replace all `( import.meta.url )` into `('import_meta_url_placeholder_by_tshy_after')` on commonjs.
Expand Down
10 changes: 0 additions & 10 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,5 @@ describe('test/index.test.ts', () => {
const distPkg = JSON.parse(fs.readFileSync(distPackageFile, 'utf-8'));
assert.equal(distPkg.name, 'tshy-after');
assert.equal(distPkg.version, '1.0.0');
assert.deepEqual(distPkg.eggPlugin, {
"name": "egg-mock",
"exports": {
"import": "./dist/esm",
"require": "./dist/commonjs"
},
});
assert.deepEqual(distPkg.egg, {
framework: true,
});
});
});

0 comments on commit 4321bac

Please sign in to comment.