-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: enhance project structure and introduce normalization
This commit significantly restructures the project to improve its maintainability and compatibility across different systems. Changes include: - Added `.editorconfig` settings for `Makefile` to ensure consistent indentation using tabs, promoting a unified coding style across different IDEs/environments. - Updated `.gitignore` and introduced `.npmignore` to refine what files are excluded from version control and what files are ignored when publishing the package. This ensures that only relevant files are packaged, reducing the package size and enhancing security. - Adjusted `package.json` to simplify the project's structure by removing outdated configurations and introducing `types`, `typesVersions`, and updated `exports` to better support TypeScript type definitions and module resolution. This aims to provide clearer entry points for different module systems (ESM, CommonJS), making the library more accessible to various consumers. - Introduced specific `tsconfig` files (`tsconfig.bundler.json`, `tsconfig.cjs.json`, `tsconfig.esm.json`, and `tsconfig.types.json`) to cater to different build targets (AMD, CommonJS, ES Modules, and type declarations). This modularized approach allows for more tailored compilation settings, improving build performance and compatibility. - Updated the build and prepack scripts to incorporate these changes, ensuring that the library is properly built before it is packed and published. These changes collectively aim to make the library more robust, flexible, and easier to use across diverse environments. By adopting common conventions and optimizing for current JavaScript toolchains, the project sets a strong foundation for future development and collaboration.
- Loading branch information
Showing
9 changed files
with
103 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
src/ | ||
Makefile | ||
tsconfig.* | ||
*.lockb | ||
.* | ||
*.tgz |
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,13 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"noEmit": false, | ||
"declaration": true, | ||
"allowImportingTsExtensions": false, | ||
"moduleResolution": "Bundler", | ||
"target": "ES2015", | ||
"module": "amd", | ||
"verbatimModuleSyntax": false | ||
}, | ||
"exclude": ["./dist/", "**/*.spec.ts"] | ||
} |
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,15 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"noEmit": false, | ||
"declaration": true, | ||
"allowImportingTsExtensions": false, | ||
"moduleResolution": "Node", | ||
"target": "ES2016", | ||
"module": "CommonJS", | ||
"verbatimModuleSyntax": false, | ||
"sourceRoot": "./src/", | ||
"inlineSourceMap": true | ||
}, | ||
"exclude": ["./dist/", "./lib/", "**/*.spec.ts", "**/tests/**"] | ||
} |
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,18 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"noEmit": false, | ||
"declaration": true, | ||
"allowImportingTsExtensions": false, | ||
"sourceRoot": "./src/", | ||
"inlineSourceMap": true, | ||
"emitDeclarationOnly": true | ||
}, | ||
"exclude": [ | ||
"./dist/", | ||
"./lib/", | ||
"**/*.spec.ts", | ||
"**/tests/**", | ||
"**/__templates__/**" | ||
] | ||
} |