Giter Club home page Giter Club logo

npm-auto-snapshot's Introduction

npm-auto-snapshot

Build Status Coverage Status

This package was inspired by npm-snapshot but automates versioning and adds several features, including a version check for production builds.

It's very easy to use.

Unless your build is contained entirely within your js-package I recommend installing globally for use across multiple projects.

CLI

There are two cli commands available. Call them in a directory with the relevant package.json file, or pass the path to the package.json file.

>> npm_update_snapshot

This command updates the current version of a package.json file to x.y.z-SNAPSHOT.

Intended use

Run before build publishes development package version to npm.

requirements

The package.json's .version property must be of the format /d+.d+.d+-SNAPSHOT/

arguments

When called within the same directory as the package.json file you wish to modify, this command needs no arguments. Alternatively, you may pass a relative or absolute path to the package.json or its directory.

>> npm_check_no_snapshots

This command scans a package.json file for a version or dependencies ending in /-SNAPSHOT(.\d+)?$/ If any are found it throws an exception.

Intended use -

Run at the start of a build intended to produce production artifacts.

requirements

There should be no instances of -SNAPSHOT in any versions within the package.json.

Within another package

If used within another package, the following functions are exposed. They throw exceptions if they encounter errors.

snapshotUpdate:

NpmSnapshot = require('npm-auto-snapshot');

NpmSnapshot.snapshotUpdate('/path/to/the/package.json', console.log);

noSnapshotScan

NpmSnapshot = require('npm-auto-snapshot');

NpmSnapshot.noSnapshotScan('/path/to/the/package.json', console.log);

npm-auto-snapshot's People

Contributors

relativityboy avatar

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.