A collection that holds all projects and allows you to manipulate & sync them with ease
Switch branches/tags
gh-pages greenkeeper-babel-cli-6.5.1 greenkeeper-babel-cli-6.6.0 greenkeeper-babel-cli-6.6.4 greenkeeper-babel-cli-6.6.5 greenkeeper-babel-cli-6.7.5 greenkeeper-babel-cli-6.7.7 greenkeeper-babel-cli-6.8.0 greenkeeper-babel-cli-6.9.0 greenkeeper-babel-cli-6.10.0 greenkeeper-babel-cli-6.10.1 greenkeeper-babel-cli-6.11.4 greenkeeper-babel-cli-6.14.0 greenkeeper-babel-cli-6.16.0 greenkeeper-babel-cli-6.18.0 greenkeeper-babel-cli-6.22.0 greenkeeper-babel-cli-6.22.1 greenkeeper-babel-cli-6.22.2 greenkeeper-babel-cli-6.23.0 greenkeeper-babel-cli-6.24.0 greenkeeper-babel-cli-6.24.1 greenkeeper-babel-preset-es2015-6.5.0 greenkeeper-babel-preset-es2015-6.6.0 greenkeeper-babel-preset-es2015-6.9.0 greenkeeper-babel-preset-es2015-6.13.0 greenkeeper-babel-preset-es2015-6.13.1 greenkeeper-babel-preset-es2015-6.13.2 greenkeeper-babel-preset-es2015-6.14.0 greenkeeper-babel-preset-es2015-6.16.0 greenkeeper-babel-preset-es2015-6.18.0 greenkeeper-babel-preset-es2015-6.22.0 greenkeeper-babel-preset-es2015-6.24.0 greenkeeper-babel-preset-es2015-6.24.1 greenkeeper-esdoc-importpath-plugin-0.1.0 greenkeeper-esdoc-importpath-plugin-0.1.1 greenkeeper-esdoc-importpath-plugin-0.1.2 greenkeeper-esdoc-importpath-plugin-0.1.3 greenkeeper-gh-pages-0.11.0 greenkeeper-gh-pages-0.12.0 greenkeeper-gh-pages-1.0.0 greenkeeper-lodash.clone-4.3.1 greenkeeper-lodash.clone-4.3.2 greenkeeper-lodash.clone-4.4.0 greenkeeper-lodash.clone-4.4.1 greenkeeper-lodash.clone-4.5.0 greenkeeper-lodash.merge-4.3.2 greenkeeper-lodash.merge-4.3.3 greenkeeper-lodash.merge-4.3.4 greenkeeper-lodash.merge-4.3.5 greenkeeper-lodash.merge-4.4.0 greenkeeper-lodash.merge-4.5.0 greenkeeper-lodash.merge-4.5.1 greenkeeper-lodash.merge-4.6.0 greenkeeper-update-all greenkeeper/remove-node-0.10 master
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
src
.babelrc
.codeclimate.yml
.eslintrc
.gitignore
.travis.yml
LICENSE
README.md
esdoc.json
package.json
publish-docs.js

README.md

project-collection

A collection that holds all projects and allows you to manipulate & sync them with ease

build status Docs status Code Climate Dependencies License

Installation

npm install --save schema-mapper-project-collection

Usage

var ProjectCollection = require('schema-mapper-project-collection');
var differ = require('schema-mapper-differ');

var projects = new ProjectCollection({}, differ);
var project = {
  name: 'demo', // Project name (similar to a database name)
  version: 1, // Project version (versions is where schema-mapper shines)
  schemas: {
    // The keys in this oject are the unique id's for the schema
    '0': {
      name: 'users', // Schema name (similar to a database table)
      primary: '0', // The schema id of the primary key
      columns: {
        // The keys in this object are the unique id's for the columns
        '0': {
          name: 'id', // Column name (similar to database column name)
          type: 'integer' // Column type (see spec which types are supported)
        },
        '1': {
          name: 'email',
          type: 'string'
        }
      }
    }
  }
};
projectCollection.putProject('0', project);
console.log(projectCollection.getStagingChanges());

// shows a project.create and project.tag change

API docs

Api Docs

Licence

MIT