This week you will prepare your library for real-world use and make it available to your classmates.
You will:
- fix issues from Week 2
- add a build step for your library
- publish your package to npm
- verify that others can install and use it
This is the transition from local project → reusable package.
You must have completed Week 2:
- all exports implemented
- tests written and passing
- README updated and accurate
If your tests are failing, do not publish yet.
By the end of this week, you will have:
- a published npm package
- a working build output
- clear install + usage instructions
- confirmation that another student can use your package
- address any bugs found in testing
- ensure behavior matches your README
- simplify or clarify confusing API areas if needed (update README accordingly)
Your package must produce a distributable build.
Minimum requirement:
- compiled output in
dist/ - JavaScript output (ESM or CJS)
- TypeScript declaration file(s)
Recommended files:
dist/index.jsdist/index.d.ts
You may use a provided starter config (e.g., Rollup) if available.
Update your package.json:
name(must be unique)version(start at1.0.0)mainand/ormoduletypes(points to.d.tsfile)files(include only what should be published, e.g.,dist)
Add a .npmignore or use files to avoid publishing source and config you don’t need.
Run:
npm publishIf you encounter issues:
- check npm login (
npm whoami) - ensure package name is unique
- ensure build output exists before publishing
In a separate test project (or a fresh folder), verify:
npm install <your-package-name>Then import and use your package.
If it fails to install or import, your package is not complete.
Pair with another student and:
- install each other’s package
- run a small usage example
- report any issues
You must fix any blocking issues found.
Your README.md must now include:
- package description
- install instructions
- usage examples (must work as written)
- list of exports
- notes on edge cases and behavior
Your README should be sufficient for another student to use your package without asking you questions.
Your submission must include:
- published npm package
- working install via
npm install - successful import and usage
- build output in
dist/ - updated README with install + usage
| Criteria | Points |
|---|---|
| Successful npm publish | 25 |
| Install + import works correctly | 25 |
| Build output (JS + types) is correct | 20 |
| Documentation quality (README) | 20 |
| Cross-testing and issue resolution | 10 |
You are finished when:
- your package is published to npm
- another student can install and use it
- your build output is correct and minimal
- your README is accurate and complete
- no blocking issues remain
Do not:
- start building the PostKit app yet (unless instructed)
- change your API without updating documentation
This week is about making your library usable by others.
- publishing without a build step
- missing or incorrect
typesfield - exporting the wrong entry file
- broken import paths after install
- README examples that don’t actually work
- forgetting to test in a fresh project
A published package is only useful if others can use it easily.
Focus on:
reliability, clarity, and real-world usability.