Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed Oct 24, 2024
1 parent 3c610fa commit 1d0a6bb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
"scripts": {
"build": "lerna run build",
"test": "lerna run test",
"test:deno": "lerna run test:deno",
"dev": "lerna run dev --parallel",
"lint": "eslint --ext .ts \"packages/\" \"libs/\"",
"lint:fix": "eslint --fix --ext .ts \"packages/\" \"libs/\"",
"prepublish": "pnpm build",
"publish": "lerna publish --no-private"
},
Expand Down
8 changes: 7 additions & 1 deletion packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ pnpm test
## Linting
```
pnpm lint
deno lint
```
## Formatting
```
deno fmt
```
30 changes: 15 additions & 15 deletions tools/postBuildFixup.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import fs from 'fs';

import fs from 'node:fs';
import process from 'node:process';

function argPath(search: string) {
const findPathArg = process.argv.find((arg) => arg.includes(`--${search}=`));
if (!findPathArg) {
return undefined;
}
const findPathArg = process.argv.find((arg) => arg.includes(`--${search}=`));
if (!findPathArg) {
return undefined;
}

return findPathArg.replace(`--${search}=`, '');
return findPathArg.replace(`--${search}=`, '');
}

let path = argPath('path');

if (!path) {
console.log('--path are required args');
path = 'dist';
console.log('--path are required args');
path = 'dist';
} else {
path = `${process.cwd()}/${path}`;
console.log(path);
fs.writeFileSync(path + '/cjs/package.json', '{"type":"commonjs"}');
fs.writeFileSync(path + '/esm/package.json', '{"type":"module"}');
console.log('postbuild completed...');
}
path = `${process.cwd()}/${path}`;
console.log(path);
fs.writeFileSync(path + '/cjs/package.json', '{"type":"commonjs"}');
fs.writeFileSync(path + '/esm/package.json', '{"type":"module"}');
console.log('postbuild completed...');
}

0 comments on commit 1d0a6bb

Please sign in to comment.