My TypeScript Library
Setup
First, install the required dependencies:
npm install
Development
Live Reloading and Rollup
Run the following command for live reloading and rollup:
npm run dev
This will start Rollup in watch mode and an HTTP server to serve your library. Any changes to the TypeScript files in the src
directory will automatically trigger a rebuild and refresh the server.
Debugging with VS Code
- Open your project in VS Code.
- Set breakpoints in your TypeScript code as needed.
- Go to the Run tab in the sidebar (or press
Ctrl+Shift+D
) and choose the debug configuration that you'd like to run. - Press the "Start Debugging" button (or press
F5
).
This will start a debugging session using the tsconfig.debug.json
configuration. You should hit your breakpoints as expected.
Building for Production
To generate the production version of your library, run:
npm run build
This will create the bundled output in the dist
directory.
npm publish --access public