digs-dev
Common development dependencies for digs
Last updated 5 years ago by boneskull .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install digs-dev 
SYNC missed versions from official npm registry.

digs-dev

Common development dependencies for digs.

NPM

Join the chat at https://gitter.im/digsjs/digs

Warning

This is an experiment.

What It Does

Provides common development requirements to digs and its minions.

Why It Does It

I have a fair amount of dotfiles, test fixtures and Grunt task files that are common to all packages in digsjs.

These files are necessary for development on our packages, but have nothing to do with production code.

I consulted with the folks @ npm on the best way to approach this problem, and this is the solution they suggested. If you have a better one, I'd love to hear it.

How It Works

Each package requiring digs-dev must have a prepublish script which will execute the install command of the digs-dev executable, like so:

$ cd path/to/some/digsjs-package
$ digs-dev install

In package.json, this is simply:

{ 
  "scripts": {
    "prepublish": "digs-dev install"
  }
}

The install command of the digs-dev executable does the following, as of this writing:

  1. Scans all development dependencies (devDependencies) in the current directory's package.json, and compares them to its own. If anything is missing or out of date, the package is added or updated, respectively. If the current directory has a .git subdirectory, the --save-dev option is added to the npm call. This means if you happen to clone, say, digs-common, if the development deps are out-of-date, package.json will be in the "modified" state. package.json is not added to Git's index, but somebody (you?) is expected to commit the changes.
  2. Symlinks a bunch of dotfiles and configuration into the appropriate places. Example: Gruntfile.js. Another example: .eslintrc. All packages under the digsjs banner have the same Gruntfile.js and .eslintrc; they are just not under version control, except in this package.
  3. Scans .gitignore for the symlinked files and adds an entry if not found. The same rule as in #1 applies; if digs-dev detects a .git folder, your working copy will be modified.

Any existing file which does not happen to be a symlink which digs-dev wants to overwrite will be skipped. That means packages can override these files simply by adding them to version control (and removing their entries from .gitignore).

The install command runs three other commands, corresponding to the above list, in series:

  1. upgrade (digs-dev upgrade)
  2. symlink (digs-dev symlink)
  3. gitignore (digs-dev gitignore)

If you just want to re-run one of these, they are available.

Author

Christopher Hiller

License

MIT

Current Tags

  • 0.2.6                                ...           devel (5 years ago)
  • 0.2.17                                ...           latest (5 years ago)

37 Versions

  • 0.2.17                                ...           5 years ago
  • 0.2.16                                ...           5 years ago
  • 0.2.15                                ...           5 years ago
  • 0.2.14                                ...           5 years ago
  • 0.2.13                                ...           5 years ago
  • 0.2.12                                ...           5 years ago
  • 0.2.11                                ...           5 years ago
  • 0.2.10                                ...           5 years ago
  • 0.2.9                                ...           5 years ago
  • 0.2.8                                ...           5 years ago
  • 0.2.7                                ...           5 years ago
  • 0.2.6                                ...           5 years ago
  • 0.2.5                                ...           5 years ago
  • 0.2.4                                ...           5 years ago
  • 0.2.3                                ...           5 years ago
  • 0.2.2                                ...           5 years ago
  • 0.2.2-8                                ...           5 years ago
  • 0.2.2-7                                ...           5 years ago
  • 0.2.2-6                                ...           5 years ago
  • 0.2.2-5                                ...           5 years ago
  • 0.2.2-4                                ...           5 years ago
  • 0.2.2-3                                ...           5 years ago
  • 0.2.2-2                                ...           5 years ago
  • 0.2.2-1                                ...           5 years ago
  • 0.2.2-0                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.9                                ...           5 years ago
  • 0.1.8                                ...           5 years ago
  • 0.1.7                                ...           5 years ago
  • 0.1.6                                ...           5 years ago
  • 0.1.5                                ...           5 years ago
  • 0.1.4                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 0
Dependencies (12)
Dev Dependencies (21)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |