Creating NPM Package with TypeScript
/
Modularizing TypeScript Codebase
Modularizing TypeScript Codebase
https://leanpub.com/creating-npm-package-with-typescript
1. Identify Independent Elements
https://leanpub.com/creating-npm-package-with-typescript
2. Split the Elements You Want to Extract into Their Separate Modules
https://leanpub.com/creating-npm-package-with-typescript
generateStarIcons.ts
https://leanpub.com/creating-npm-package-with-typescript
showError.ts
https://leanpub.com/creating-npm-package-with-typescript
3. Import the Extracted Elements into the
tweetButton.ts
File
https://leanpub.com/creating-npm-package-with-typescript
4. Configure Jest to Strip the Extension from Import Statements
https://leanpub.com/creating-npm-package-with-typescript
5. Release the Latest Version of the Project
https://leanpub.com/creating-npm-package-with-typescript
Up next
Epilogue
In this chapter
Modularizing TypeScript Codebase
1. Identify Independent Elements
2. Split the Elements You Want to Extract into Their Separate Modules
3. Import the Extracted Elements into the tweetButton.ts File
4. Configure Jest to Strip the Extension from Import Statements
5. Release the Latest Version of the Project