All Projects → pgilad → grunt-dev-update

pgilad / grunt-dev-update

Licence: MIT license
Automate the updating of your package.json packages with a grunt task

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to grunt-dev-update

assetUpdater-core
AssetUpdater is a Unity plugin which helps developers build assetbundles and download it easily
Stars: ✭ 38 (+31.03%)
Mutual labels:  update
bump
A generic version tracking and update tool
Stars: ✭ 33 (+13.79%)
Mutual labels:  update
AndroidUpdate
update library for android
Stars: ✭ 24 (-17.24%)
Mutual labels:  update
updatarium
Updatarium : Update everything
Stars: ✭ 14 (-51.72%)
Mutual labels:  update
BeatSaber UpdateSkipper
Simple tool to prevent Steam from Updating Beat Saber whenever there happens to be an update so you dont need to copy around files and end up possibly wrecking your setup.
Stars: ✭ 117 (+303.45%)
Mutual labels:  update
ProgramUpdater
PUF - Program Updater Framework. A library to easier the task of program updating
Stars: ✭ 14 (-51.72%)
Mutual labels:  update
mern-stack-crud
MERN stack (MongoDB, Express, React and Node.js) create read update and delete (CRUD) web application example
Stars: ✭ 142 (+389.66%)
Mutual labels:  update
SSAppUpdater
SSAppUpdater is an open-source framework that compares the current version of the app with the store version and returns the essential details of it like app URL, new app version number, new release note, etc. So you can either redirect or notify the user to update their app.
Stars: ✭ 58 (+100%)
Mutual labels:  update
python-tuf
Python reference implementation of The Update Framework (TUF)
Stars: ✭ 1,425 (+4813.79%)
Mutual labels:  update
Port-Able-Suite
🌐 Manager for portable applications
Stars: ✭ 35 (+20.69%)
Mutual labels:  update
taps
TUF Augmentation Proposals (TAPs)
Stars: ✭ 23 (-20.69%)
Mutual labels:  update
rauc-hawkbit-updater
The RAUC hawkBit updater is a simple commandline tool/daemon that runs on your target and interfaces between RAUC and hawkBit's DDI API.
Stars: ✭ 40 (+37.93%)
Mutual labels:  update
game-executor
采用Reactor模式,注册readycreate, readyfinish事件到更新服务UpdateService,通过处理后进行模型缓存,然后将消息转化为 dispatchThread消息分配模型需要的create, update, finish的事件进行单线程循环调度 。调度过程使用了系统预置锁模型,来进行多线程唤醒机制,将所有的update循环检测进行多 线程调度,多线程更新服务使用future-listener机制,在完成调度后,根据模型状态,如果模型存活重新将消息转化为update 事件注册到dispatchThread消息分配模型进行循环处理。如果模型死亡将消息转化为readyfinish事件注册到更新服务UpdateServic进行销毁 。这个系统实现了模型自动缓存,多…
Stars: ✭ 28 (-3.45%)
Mutual labels:  update
python-crawler
爬虫学习仓库,适合零基础的人学习,对新手比较友好
Stars: ✭ 37 (+27.59%)
Mutual labels:  update
UserCenter
Personal open source user center
Stars: ✭ 28 (-3.45%)
Mutual labels:  update
FiniteStateMachine
This project is a finite state machine designed to be used in games.
Stars: ✭ 45 (+55.17%)
Mutual labels:  update
gitpack
Git-based package manager written in POSIX shell
Stars: ✭ 72 (+148.28%)
Mutual labels:  update
yarn-outdated-notifier
🚀 Add link to CHANGELOG the result of $ yarn outdated, and notify to GitHub Issue.
Stars: ✭ 25 (-13.79%)
Mutual labels:  outdated-packages
terraform-module-versions
CLI tool that checks Terraform code for module updates. Single binary, no dependencies. linux, osx, windows. #golang #cli #terraform
Stars: ✭ 143 (+393.1%)
Mutual labels:  update
SimplePHP
A small query builder project designed to assist daily routines and speed up the process of communicating with the database.
Stars: ✭ 14 (-51.72%)
Mutual labels:  update

grunt-dev-update

Update your devDependencies and dependencies automatically with a grunt task

NPM Version NPM Downloads Built with Grunt

Getting Started

This plugin requires Grunt.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install --save-dev grunt-dev-update

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-dev-update');

The best way to load tasks is probably using load-grunt-tasks

npm install --save-dev load-grunt-tasks

And then add to your gruntfile.js:

require('load-grunt-tasks')(grunt);

The "devUpdate" task

This plugin allows you to both update your dependencies and devDependencies with an automated task.

  1. See outdated packages
  2. Choose whether to just get notified, update them with a prompt, or automatically update them.
  3. Determine whether to stay with semver rules when updating, or to update to latest version.
  4. Update either or both your devDependencies and dependencies

Q: Why not use npm update or npm install?

A: First, npm update doesn't work on dev dependencies. Second, npm update stays inside your semver matching in your package.json, thirdly - npm isn't automated like your grunt tasks.

Overview

In your project's Gruntfile, add a task config named devUpdate to the data object passed into grunt.initConfig().

grunt.initConfig({
    devUpdate: {
        main: {
            options: {
                //task options go here
            }
        }
    }
})

Options

options.reportUpdated

Type: Boolean Default value: false

Whether to report an already updated package

options.updateType

Type: String Default value: report

How devUpdate should handle the outdated packages. Valid options:

  • report - Just report that the package is outdated.
  • prompt - Prompt user to confirm update of every package
  • force - Automatically force the update for the outdated packages.
  • fail - Fail task if an outdated package was found.

options.packages

Type: Object Default value: {devDependencies: true}

What kind of packages should be checked. Valid options:

  • dependencies - Specify true to check production dependencies.

    Outdated dependencies are installed using the --save option.

  • devDependencies - Specify true to check development dependencies. This is true by default.

    Outdated devDependencies are installed using the --save-dev option.

options.semver

Type: Boolean Default value: true

true - Packages will be updated with npm update and will be installed up to your allowed version in your package.json. Your allowed version is determined using semver.

false - Packages will be updated to the latest version there is, regardless of your package.json specifications.

Warning - this could break packages and only use this option if you're sure of what you're doing.

options.packageJson

Type: null|Object|String Default value: null

This option allow you to manually configure the path of your package.json. Valid options:

  • null - This will use matchdep own logic for finding your package.json (using findup to find nearest package.json). This is the recommended and default option.
  • String - specify a relative path from your process.cwd() to find your package.json.
  • Object - pass in an object representing your package.json

For better understanding the String and Object option, please see matchdep config.

options.reportOnlyPkgs

Type: Array Default value: []

Specify packages that will be checked for newer version but only reported if outdated.

This is useful if you are aware of packages that will be outdated, but don't want to update them.

Usage Examples

Default Options

Example usage with all options specified with defaults:

grunt.initConfig({
    devUpdate: {
        main: {
            options: {
                updateType: 'report', //just report outdated packages
                reportUpdated: false, //don't report up-to-date packages
                semver: true, //stay within semver when updating
                packages: {
                    devDependencies: true, //only check for devDependencies
                    dependencies: false
                },
                packageJson: null, //use matchdep default findup to locate package.json
                reportOnlyPkgs: [] //use updateType action on all packages
            }
        }
    }
})

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

MIT © Gilad Peleg

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].