Генератор package.json
Гид
Генератор package.json
Create a valid package.json from a structured form instead of memorizing every field. Set the package name, version, license, module system (ESM or CommonJS), Node engine, scripts, and dependencies, and the tool produces a clean, properly ordered manifest you can drop straight into a project.
Unlike a formatter that reshuffles an existing file, this generator builds the manifest from scratch and skips empty fields, so you get a minimal, publishable file that already follows the conventions npm uses for npm init.
Как использовать
- Enter the package name, version, and (optional) description and author.
- Pick a license and choose ES Modules или CommonJS for the module system.
- Set the entry file (e.g.
index.js) and an engines.node range like>=18. - Fill in the scripts you actually use (
dev,build,test,start) — leave fields blank to omit them. - Add dependencies and devDependencies as
name@range, one per line or comma-separated. - Choose your indent (2 spaces, 4 spaces, or tab) and copy or download the generated
package.json.
Возможности
- Form-driven – No need to remember the exact field names or order; common keys are filled in for you.
- ESM or CommonJS – Toggle the module system and the tool sets
"type": "module"and themoduleentry accordingly. - Smart scripts – Empty script fields are dropped instead of left as
""placeholders. - Dependency parsing – Paste a list of
package@^1.2.3entries and they become a tidydependenciesobject. - Repository helpers – Drop in a GitHub URL and the generator fills
repository,bugsиhomepagefor you. - Private flag – One click marks the package as private to prevent an accidental
npm publish. - Indent your way – Output as 2 spaces, 4 spaces, or tab to match your repo’s existing style.
- Копирование или загрузка – Grab the result as text or download
package.jsondirectly.
Часто задаваемые вопросы
-
What is the difference between dependencies and devDependencies?
dependenciesare packages your code imports at runtime and that consumers of your package will also install.devDependenciesare tools you only need while developing or building the project — bundlers, test runners, type checkers — and they are not installed when someone adds your package to their own project. -
What does setting type to module actually do?
Параметр
"type": "module"tells Node.js to treat.jsfiles in the package as ES modules, soimportиexportwork natively. Without it, Node treats.jsas CommonJS and you have to userequire/module.exports. ES Modules also enable top-levelawaitand stricter file resolution. -
Why does package.json use semantic versioning?
Semantic versioning (MAJOR.MINOR.PATCH) gives consumers a contract: a PATCH bump should be a safe bug fix, MINOR adds backward-compatible features, and MAJOR signals breaking changes. Range operators like
^и~rely on this contract so npm can install compatible updates without breaking your build. -
What is the engines field for?
The
enginesfield declares which Node.js (or other runtime) versions your package supports. npm and many tools surface a warning when an installer is on an unsupported version, and some platforms refuse to install at all. Setting an explicitnoderange prevents subtle bugs caused by APIs that exist on newer Node versions.
Установите наши расширения
Добавьте инструменты ввода-вывода в свой любимый браузер для мгновенного доступа и более быстрого поиска
恵 Табло результатов прибыло!
Табло результатов — это интересный способ следить за вашими играми, все данные хранятся в вашем браузере. Скоро появятся новые функции!
Подписаться на новости
все Новые поступления
всеОбновлять: Наш последний инструмент был добавлен 3 мая 2026 года
