GithubHelp home page GithubHelp logo

jameskyburz / dependency-sync Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 0.0 236 KB

dependency-sync

Home Page: http://npm.im/dependency-sync

License: Other

JavaScript 100.00%
nodejs javascript dependencies sync packages

dependency-sync's Introduction

dependency-sync

⚑ sync your dependencies ⚑

js-standard-style

usage for entry point in module

npx dependency-sync

multiple entry points

npx dependency-sync ./file-1.js ./file-2.js

esm modules & jsx

npx dependency-sync -t babelify

babel and babelify will need to be installed and configured

example package.json

  "devDependencies": {
    "@babel/core": "7.8.4",
    "@babel/preset-env": "7.8.4",
    "@babel/preset-react": "7.8.3",
    "babelify": "10.0.0"
  },
  "dependency-sync": {
    "args": [
      "-t",
      "babelify"
    ]
  }

example babel.config.js

  module.exports = {
    presets: ['@babel/preset-env', '@babel/preset-react']
  }

watch dependency changes

npx dependency-sync --watch

check-only

will exit with error if modules are not in sync

npx dependency-sync --check-only

keep

dependency-sync ignores devDependencies, However dependencies that aren't explicitly required will be removed.

To prevent this add the following directive to your package.json.

"dependency-sync": {
  "keep": [
    "babelify"
  ]
}

yarn

To use dependency-sync with yarn use add the following directive to your package.json.

args is passed to yarn add

"dependency-sync": {
  "yarn": true
}

or with extra arguments

```json
"dependency-sync": {
  "yarn": 
    "args": [ ]
  }
}

dry-run

npx dependency-sync --dry-run

verbose

npx dependency-sync --verbose

license

MIT

dependency-sync's People

Contributors

jameskyburz avatar greenkeeperio-bot avatar dependabot-preview[bot] avatar dependabot[bot] avatar greenkeeper[bot] avatar

Stargazers

Gabriella avatar  avatar

Watchers

 avatar James Cloos avatar Gabriella avatar  avatar

dependency-sync's Issues

Removes all dependencies >.<

Will remove all dependencies when run on nodemon restart event

nodemon.json

{
  "events": {
      "restart": "yarn run missing"
  }
}

package.json

{
  "scripts": {
    "missing": "dependency-sync --once",
    "dev": "nodemon index.js",
  },
  "depencency-sync": {
    "yarn": { "args": [] }
  }
}

index.js

require('dotenv').config()

const start = require('./app')

if (!process.env.API_TOKEN) {
  require('./generate-envfile')(start)
} else {
  start()
}

Removing files causes a crash

Example

Error: Cannot find module '/Users/jameskyburz/Documents/src/krisy-dependency-test/child.js' from '/Users/jameskyburz/Documents/src/krisy-dependency-test'
    at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:55:21
    at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
    at onex (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
    at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:123:15)

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

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.