Giter VIP home page Giter VIP logo

supermon's Introduction

npm version build

Ease your Node.js development by automatically restarting your application on file changes and solve the notorious Docker node_modules sync issue as supermon monitors package.json file and installs any missing modules to the internal Docker volume as well.

Supports TypeScript applications out of the box through ts-node.

Install

npm install supermon --save-dev

To use supermon with TypeScript you also need to install ts-node

npm install ts-node --save-dev

Usage

supermon [application file]

Examples

supermon app.js
supermon app.ts
supermon --delay=2000 app.ts
supermon --delay=2000 -- app.ts --port=80

Options

Options:
  --config         Path to JSON config file           [default: "supermon.json"]
  --watch          Directory to watch for file changes   [string] [default: "."]
  --ignore         Directories to ignore for file changes                [array]
  --ext            Comma separated list of file extensions to watch      [array]
  --delay          How many ms to wait after file changes[number] [default: 200]
  --exec           Executable to run the command on                     [string]
  --legacywatch    Use polling instead of FS events                    [boolean]
  --pmexec         Package manager executable to use   [string] [default: "npm"]
  --skipfirstsync  Don't do full sync on first run                     [boolean]
  --version        Show version number                                 [boolean]
  --help           Show help                                           [boolean]
  --debug          Show debug information                              [boolean]

Note: If both, supermon and application arguments are provided, it is recommended
      to use "--" as separator between supermon and application command & arguments.
      Example: "supermon --delay=2000 -- app.js --port=80"

Note: Boolean options do not require value to be specified

Example use: "supermon app.js"
Example use: "supermon --delay=2000 -- app.js --port=80"

Config file

Supermon supports setting all your options through single configuration file, supermon.json.

Example:

{
  "delay": 2000
}

package.json

If you want to keep your amount of config files to minimum, you can also set the options through supermon object in package.json.

Example:

{
  "name": "my-awesome-project",
  "version": "0.0.1",
  "...": "...",
  "supermon": {
    "delay": "2000"
  }
}

Environment variables

All options can also be set though environment variables with SUPERMON_ prefix.

Example:

SUPERMON_DELAY=2000

Contributing

Master branch

Master branch must always represent the current deployed state, no commits are allowed directly to master.

Feature branches

All work should be done in feature branches. Branches should have human readable name.

Merging

Merging to master should happen through pull requests. Any pull request should have working tests for any new added feature added in the branch, should pass existing tests and should have been approved by at least one person before merging.

supermon's People

Contributors

dependabot[bot] avatar mikkotikkanen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

supermon's Issues

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

An in-range update of @typescript-eslint/eslint-plugin is breaking the build 🚨

The devDependency @typescript-eslint/eslint-plugin was updated from 2.19.0 to 2.19.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@typescript-eslint/eslint-plugin is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ npm-test (12.x): There are 1 failures, 0 warnings, and 0 notices.

Release Notes for v2.19.1

2.19.1 (2020-02-10)

Bug Fixes

  • eslint-plugin: [unbound-method] blacklist a few unbound natives (#1562) (4670aab)
  • typescript-estree: ts returning wrong file with project references (#1575) (4c12dac)
Commits

The new version differs by 5 commits.

  • 1c8f0df chore: publish v2.19.1
  • 4c12dac fix(typescript-estree): ts returning wrong file with project references (#1575)
  • e9cf734 docs(eslint-plugin): fix typo in readme
  • 10d86b1 docs(eslint-plugin): [no-dupe-class-members] fix typo (#1566)
  • 4670aab fix(eslint-plugin): [unbound-method] blacklist a few unbound natives (#1562)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Option to not run full sync on first go

Would be useful for tests where npm ci is run just before the test is run, thus everything is in sync and the first execution install takes a long time to complete

An in-range update of @typescript-eslint/parser is breaking the build 🚨

The devDependency @typescript-eslint/parser was updated from 2.19.0 to 2.19.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@typescript-eslint/parser is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ npm-test (12.x): There are 1 failures, 0 warnings, and 0 notices.

Release Notes for v2.19.1

2.19.1 (2020-02-10)

Bug Fixes

  • eslint-plugin: [unbound-method] blacklist a few unbound natives (#1562) (4670aab)
  • typescript-estree: ts returning wrong file with project references (#1575) (4c12dac)
Commits

The new version differs by 5 commits.

  • 1c8f0df chore: publish v2.19.1
  • 4c12dac fix(typescript-estree): ts returning wrong file with project references (#1575)
  • e9cf734 docs(eslint-plugin): fix typo in readme
  • 10d86b1 docs(eslint-plugin): [no-dupe-class-members] fix typo (#1566)
  • 4670aab fix(eslint-plugin): [unbound-method] blacklist a few unbound natives (#1562)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Logger

All logs should go through logger utility so that everything can be prefixed with the module name in order to differentiate them from application logs

Support for npm scripts

Check if command is npm script and don't try to use node or ts-node for running them

Create internal property for engine set it to npm

Common eventbus

In order to easily bolt on loggers, there needs to be one common event bus

Support pnpm workspaces

I am using a monorepo (w/ pnpm workspaces) and supermon doesn't like the dependencies that use other pnpm workspace packages:

npm ERR! Unsupported URL Type "workspace:": workspace:*

However, it should work fine. Maybe it is because it says npm and not pnpm...
So, is there a way to specify the package manager to use in dependency syncronization?

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two-Factor Authentication, make configure the auth-only level is supported. semantic-release cannot publish with the default auth-and-writes level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.