-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move library to typescript
- Loading branch information
1 parent
2d827e9
commit f9962b6
Showing
92 changed files
with
1,541 additions
and
768 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
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,29 +1,8 @@ | ||
|
||
import path from 'path'; | ||
import { writeFile, rename, unlink } from 'fs/promises'; | ||
import esbuild from 'esbuild'; | ||
import glob from 'tiny-glob'; | ||
import { writeFile } from 'fs/promises'; | ||
|
||
const pkgFolder = path.resolve(); | ||
const distFolder = path.join(pkgFolder, 'dist/cjs/'); | ||
console.log(pkgFolder, distFolder) | ||
const pkgJson = path.join(pkgFolder, 'package.json'); | ||
const tempPkgJson = path.join(pkgFolder, 'package.json.orig'); | ||
console.log(pkgFolder, distFolder) | ||
await rename(pkgJson, tempPkgJson); | ||
await writeFile(pkgJson, JSON.stringify({ type: "commonjs" }, null, ' ')); | ||
const entryPoints = await glob(`${pkgFolder}/src/*`); | ||
await esbuild.build({ | ||
entryPoints, | ||
bundle: false, | ||
platform: 'node', | ||
format: 'cjs', | ||
outdir: distFolder, | ||
}); | ||
await unlink(pkgJson); | ||
await rename(tempPkgJson, pkgJson); | ||
|
||
await writeFile(path.join(distFolder, 'package.json'), JSON.stringify({ type: "commonjs" }, null, ' ')); | ||
|
||
|
||
|
||
await writeFile(path.join(distFolder, 'package.json'), JSON.stringify({ type: "commonjs" }, null, ' ')); |
Empty file.
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,17 +1,25 @@ | ||
// packages/formatters/src/index.js | ||
import { default as default2 } from "./default.js"; | ||
import { default as default3 } from "./number.js"; | ||
import { default as default4 } from "./string.js"; | ||
import { default as default5 } from "./stringQuoteOnlyIfNecessary.js"; | ||
import { default as default6 } from "./stringExcel.js"; | ||
import { default as default7 } from "./symbol.js"; | ||
import { default as default8 } from "./object.js"; | ||
// packages/formatters/src/index.ts | ||
import { default as default2 } from "./Formatter.js"; | ||
import { default as default3 } from "./default.js"; | ||
import { default as default4, NumberFormatterOptions } from "./number.js"; | ||
import { default as default5, StringFormatterOptions } from "./string.js"; | ||
import { | ||
default as default6, | ||
StringFQuoteOnlyIfNecesaryFormatterOptions | ||
} from "./stringQuoteOnlyIfNecessary.js"; | ||
import { default as default7 } from "./stringExcel.js"; | ||
import { default as default8 } from "./symbol.js"; | ||
import { default as default9 } from "./object.js"; | ||
export { | ||
default2 as default, | ||
default3 as number, | ||
default8 as object, | ||
default4 as string, | ||
default6 as stringExcel, | ||
default5 as stringQuoteOnlyIfNecessary, | ||
default7 as symbol | ||
default2 as Formatter, | ||
NumberFormatterOptions, | ||
StringFQuoteOnlyIfNecesaryFormatterOptions, | ||
StringFormatterOptions, | ||
default3 as default, | ||
default4 as number, | ||
default9 as object, | ||
default5 as string, | ||
default7 as stringExcel, | ||
default6 as stringQuoteOnlyIfNecessary, | ||
default8 as symbol | ||
}; |
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
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
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
Oops, something went wrong.