Détail du package

egg-development

eggjs98.3kMIT3.0.2

development tool for egg

egg, plugin, egg-plugin, eggPlugin

readme

egg-development

NPM version Node.js CI Test coverage Known Vulnerabilities npm download Node.js Version

This is an egg plugin for local development, under development environment enabled by default, and closed under other environment.

egg-development has been built-in for egg. It is enabled by default.

Configuration

see config/config.default.js for more detail.

Features

  • Under development environment, Output request log in STDOUT, statistic and output all key parts time-consuming;
  • Watch file changes, and reload application;

About Reload

Under the following directory (including subdirectories) will watch file changes under development environment by default, trigger an Egg development environment server reload:

  • ${app_root}/app
  • ${app_root}/config
  • ${app_root}/mocks
  • ${app_root}/mocks_proxy
  • ${app_root}/app.js

set config.development.overrideDefault to true to skip defaults merge.

Under the following directory (including subdirectories) will ignore file changes under development environment by default:

  • ${app_root}/app/view
  • ${app_root}/app/assets
  • ${app_root}/app/public
  • ${app_root}/app/web

set config.development.overrideIgnore to true to skip defaults merge.

Developer can use config.reloadPattern(multimatch) to control whether to reload.

// config/config.default.js
exports.development = {
  // don't reload when ts fileChanged
  // https://github.com/sindresorhus/multimatch
  reloadPattern: ['**', '!**/*.ts'],
};

Loader Trace

You can view loader trace for performance issue from http://127.0.0.1:7001/__loader_trace__

Questions & Suggestions

Please open an issue here.

License

MIT

Contributors

Contributors

Made with contributors-img.

changelog

Changelog

3.0.2 (2024-12-22)

Bug Fixes

  • check run dir exists before read it (#33) (d95db72)

3.0.1 (2024-12-22)

Bug Fixes

  • skip read run dir when it not exists (#32) (2d24ce3)

3.0.0 (2024-05-08)

⚠ BREAKING CHANGES

  • drop Node.js < 14 support

Summary by CodeRabbit

  • New Features
    • Introduced a new GitHub Actions workflow for Node.js releases.
  • Enhancements
  • Updated continuous integration workflow with improved job configurations.
  • Enhanced file system operations across multiple JavaScript files using Node.js built-in modules.
  • Bug Fixes
  • Fixed directory and file operations in test suites to use updated Node.js methods.
  • Documentation
    • Adjusted documentation comments and removed outdated directives.
  • Refactor
  • Removed the use of 'use strict'; in several JavaScript files to align with modern standards.
  • Dependencies
  • Updated various dependencies and Node version requirements to ensure compatibility and security.

Features


2.7.0 / 2020-09-01

features

2.6.0 / 2020-08-19

features

2.5.0 / 2020-05-25

features

fixes

others

2.4.3 / 2019-05-07

fixes

2.4.2 / 2019-02-04

fixes

2.4.1 / 2018-08-02

fixes

2.4.0 / 2018-07-31

  • feat: app to watch list (#19)

2.3.1 / 2018-06-20

others

2.3.0 / 2018-06-20

features

2.2.0 / 2018-02-06

features

2.1.0 / 2017-12-13

features

2.0.0 / 2017-11-09

others

  • [4416724] - refactor: drop <8.x, support egg2. [BREAKING CHANGE] (#12) (TZ | 天猪 <<atian25@qq.com>>)

1.3.2 / 2017-11-01

  • fix: fastReady default to false (#11)

1.3.1 / 2017-06-04

  • docs: fix License url (#10)
  • chore: remove .vscode (#9)

1.3.0 / 2017-04-18

  • feat: allow reload on debug (#8)
  • docs: adjust badge link (#6)

1.2.0 / 2017-01-24

  • feat: remove log runtime (#5)

1.1.0 / 2017-01-03

  • feat: can disable fast ready (#4)

1.0.2 / 2016-09-20

  • refactor: !isFile -> isDirectory (#3)

1.0.1 / 2016-09-20

  • fix: reload at remove file (#2)

1.0.0 / 2016-09-13

  • feat: release 1.0.0

0.1.0 / 2016-09-13

  • feat: debounce reload && docs (#1)