Skip to content

Commit

Permalink
Resolves #198
Browse files Browse the repository at this point in the history
  • Loading branch information
ClickerMonkey committed May 26, 2016
0 parents commit 7fc96ec
Show file tree
Hide file tree
Showing 51 changed files with 11,506 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
Empty file added .npmignore
Empty file.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- "0.10"
before_script:
- npm install -g gulp
63 changes: 63 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
'use strict';

var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var plugins = require('gulp-load-plugins')();
var gutil = require('gulp-util');
var qunit = require('gulp-qunit');
var shell = require('gulp-shell');
var merge = require('merge-stream');
var size = require('gulp-check-filesize');

var build = {
filename: 'rekord-validation.js',
minified: 'rekord-validation.min.js',
output: './build/',
include: [
'./src/header.js',
'./src/lib/**/*.js',
'./src/footer.js'
]
};

var executeMinifiedBuild = function(props)
{
return function() {
return gulp
.src( props.include )
.pipe( sourcemaps.init() )
.pipe( plugins.concat( props.minified ) )
.pipe( plugins.uglify().on('error', gutil.log) )
.pipe( sourcemaps.write('.') )
.pipe( size({enableGzip: true}) )
.pipe( gulp.dest( props.output ) )
;
};
};

var executeBuild = function(props)
{
return function() {
return gulp
.src( props.include )
.pipe( plugins.concat( props.filename ) )
.pipe( size({enableGzip: true}) )
.pipe( gulp.dest( props.output ) )
;
};
};

var executeTest = function(file)
{
return function() {
return gulp.src( file ).pipe( qunit() );
};
};

gulp.task( 'docs', shell.task(['./node_modules/.bin/jsdoc -c jsdoc.json']));
gulp.task( 'clean', shell.task(['rm -rf build/*.js', 'rm -rf build/*.map']));
gulp.task( 'test', executeTest( './test/index.html' ) );

gulp.task( 'js:min', executeMinifiedBuild( build ) );
gulp.task( 'js', executeBuild( build ) );
gulp.task( 'default', ['js:min', 'js']);
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2015-2016 Magnos, LLC. https://github.com/Rekord/rekord-validation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# <img src="https://raw.githubusercontent.com/Rekord/rekord/master/images/rekord-color.png" width="60"> Rekord Validation

[![Build Status](https://travis-ci.org/Rekord/rekord-validation.svg?branch=master)](https://travis-ci.org/Rekord/rekord-validation)
[![devDependency Status](https://david-dm.org/Rekord/rekord-validation/dev-status.svg)](https://david-dm.org/Rekord/rekord-validation#info=devDependencies)
[![Dependency Status](https://david-dm.org/Rekord/rekord-validation.svg)](https://david-dm.org/Rekord/rekord-validation)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Rekord/rekord-validation/blob/master/LICENSE)
[![Alpha](https://img.shields.io/badge/State-Alpha-orange.svg)]()

Rekord is a javascript REST ORM that is offline and real-time capable.

rekord-validation adds rules, expressions, transforms, and custom validation functionality.

**Installation**

The easiest way to install rekord-validation is through bower via `bower install rekord-validation`.

- rekord-validation.js is `46KB` (`7.55KB` gzipped)
- rekord-validation.min.js is `18KB` (`5.24KB` gzipped)
25 changes: 25 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "rekord-validation",
"version": "1.0.0",
"homepage": "https://github.com/Rekord/rekord-validation",
"authors": [
"Philip Diffenderfer <[email protected]>"
],
"description": "Advanced validation rules for rekord",
"main": "build/rekord-validation.js",
"keywords": [
"javascript",
"orm",
"offline",
"realtime",
"validation"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
Loading

0 comments on commit 7fc96ec

Please sign in to comment.