package.json Generator
Generate package.json files for Node.js projects.Runs in this tab.⌘ ↵ runs it
Next step
AtriumKitFrom the team behind browserutils
Turn a click-through into an interactive demo
AtriumKit records your web app once in Chrome and turns every click into a step of a demo you can embed or share. There’s a free plan.
Try AtriumKit freeAbout package.json Generator
Free online package.json generator. Create package.json files with name, version, description, scripts, dependencies, and other fields for Node.js and npm projects. It runs in your browser. Nothing is sent to a server.
Questions
What is package.json?
package.json is the manifest file for Node.js projects. It contains metadata like the project name and version, lists dependencies, defines scripts for building and testing, and specifies the entry point of your application.
What is the difference between dependencies and devDependencies?
Dependencies are packages required at runtime (e.g., express, react), while devDependencies are only needed during development (e.g., jest, typescript, eslint). DevDependencies are not installed in production builds.
What does the "type": "module" field do in package.json?
Setting "type": "module" tells Node.js to treat .js files as ES modules, enabling import/export syntax instead of require/module.exports. Without it, Node.js defaults to CommonJS.
How do I define custom scripts in package.json?
Add entries to the "scripts" object, e.g., "build": "tsc", "test": "jest". Run them with npm run <name>. The special scripts "start" and "test" can be run directly with npm start and npm test.
Can I generate a package.json for a monorepo workspace?
This tool generates a single package.json. For monorepo workspaces, add a "workspaces" field manually pointing to your package directories (e.g., ["packages/*"]).
Comments
More in DevOps & Config
- .gitignore Generator
- Dockerfile Generator
- Docker Compose Generator
- Nginx Config Generator
- .editorconfig Generator
- .env File Generator
- GitHub Actions Generator
- README Generator
Comments