Генератор package.json

ДанныеРазработчик
Реклама · УДАЛИТЬ?
Lowercase, dashes/underscores; may be scoped (@scope/name).
Semantic version (MAJOR.MINOR.PATCH).
ESM sets type=module and uses .mjs entrypoints; CJS uses CommonJS.
Used for the main / module field.
Sets engines.node. Leave blank to omit.
Comma-separated.
Optional. Sets repository, bugs, and homepage.

Scripts

Dependencies

Use name@range syntax. Range defaults to latest if omitted.
Same syntax as above.

Output Options

Реклама · УДАЛИТЬ?

Гид

Package.json Generator

Генератор 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.

Как использовать

  1. Enter the package name, version, and (optional) description and author.
  2. Pick a license and choose ES Modules или CommonJS for the module system.
  3. Set the entry file (e.g. index.js) and an engines.node range like >=18.
  4. Fill in the scripts you actually use (dev, build, test, start) — leave fields blank to omit them.
  5. Add dependencies and devDependencies as name@range, one per line or comma-separated.
  6. 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 the module entry accordingly.
  • Smart scripts – Empty script fields are dropped instead of left as "" placeholders.
  • Dependency parsing – Paste a list of package@^1.2.3 entries and they become a tidy dependencies object.
  • Repository helpers – Drop in a GitHub URL and the generator fills repository, bugsи homepage for 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.json directly.

Реклама · УДАЛИТЬ?

Часто задаваемые вопросы

  1. What is the difference between dependencies and devDependencies?

    dependencies are packages your code imports at runtime and that consumers of your package will also install. devDependencies are 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.

  2. What does setting type to module actually do?

    Параметр "type": "module" tells Node.js to treat .js files in the package as ES modules, so import и export work natively. Without it, Node treats .js as CommonJS and you have to use require/module.exports. ES Modules also enable top-level await and stricter file resolution.

  3. 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.

  4. What is the engines field for?

    The engines field 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 explicit node range prevents subtle bugs caused by APIs that exist on newer Node versions.

Хотите убрать рекламу? Откажитесь от рекламы сегодня

Установите наши расширения

Добавьте инструменты ввода-вывода в свой любимый браузер для мгновенного доступа и более быстрого поиска

в Расширение Chrome в Расширение края в Расширение Firefox в Расширение Opera

Табло результатов прибыло!

Табло результатов — это интересный способ следить за вашими играми, все данные хранятся в вашем браузере. Скоро появятся новые функции!

Реклама · УДАЛИТЬ?
Реклама · УДАЛИТЬ?
Реклама · УДАЛИТЬ?

новости с техническими моментами

Примите участие

Помогите нам продолжать предоставлять ценные бесплатные инструменты

Купи мне кофе
Реклама · УДАЛИТЬ?