Skip to content

Commit

Permalink
Merge pull request #32 from radify/gulp-refactor
Browse files Browse the repository at this point in the history
Gulp Refactor
  • Loading branch information
nateabele committed Oct 30, 2015
2 parents 9231899 + 4c00f8f commit 9e669f2
Show file tree
Hide file tree
Showing 14 changed files with 881 additions and 766 deletions.
7 changes: 7 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
languages:
JavaScript: true
exclude_paths:
- "lib/*"
- "config/*"
- "spec/*"
- "Gulpfile.js"
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"preset" : "google",
"maximumLineLength" : 120,
"disallowMultipleVarDecl" : false
}
14 changes: 14 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"maxerr" : 50,
"camelcase" : true,
"indent" : 2,
"latedef" : true,
"newcap" : true,
"noempty" : true,
"quotmark" : "single",
"undef" : true,
"strict" : true,
"phantom" : true,
"browser" : true,
"globals" : {}
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ before_script:
- npm install

script:
- script/test
- gulp
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,27 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## 0.4.1 - 2015-08-19
## [0.5.0] - 2015-10-31
### Added
- Gulp
- CodeClimate reporting and badge
- runSequence for Gulp
- jscs for code style
- jshint for linting
- dependency badges
### Changed
- Gulp, rather than Karma, handles Coveralls reporting
### Fixed
- Coveralls reporting and badge
### Security
- Adds requireSafe security check to Gulp
### Updated
- Updates package.json
- Style updates in `angular-model.js`

## [0.4.1] - 2015-08-19
* Adds a CHANGELOG

[Unreleased]: https://github.com/radify/angular-model/compare/v0.5.0...HEAD
[0.5.0]: https://github.com/radify/angular-model/compare/v0.4.1...v0.5.0
[0.4.1]: https://github.com/radify/angular-model/compare/v0.4.0...v0.4.1
54 changes: 54 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use strict';

var gulp = require('gulp');
var Server = require('karma').Server;
var coveralls = require('gulp-coveralls');
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var runSequence = require('run-sequence');
var gulpRequireSafe = require('gulp-requiresafe');

/*
* PLEASE NOTE: run-sequence is a
* temporary solution until the release of
* Gulp 4.0, which contains run-sequence's
* functionality.
*/

var paths = {
'spec': 'spec/**/*.js',
'src': 'src/**/*.js'
};

gulp.task('test', function(done) {
new Server({
configFile: __dirname + '/config/karma.conf.js',
singleRun: true
}, done).start();
});

gulp.task('coveralls', function() {
gulp.src('coverage/**/lcov.info')
.pipe(coveralls());
});

gulp.task('lint', function() {
return gulp.src([paths.src])
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});

gulp.task('style', function() {
return gulp.src([paths.src, paths.spec])
.pipe(jscs())
.pipe(jscs.reporter());
});

gulp.task('security', function(cb) {
gulpRequireSafe({package: __dirname + '/package.json', stopOnError: true}, cb);
});

gulp.task('default', function(cb) {
runSequence('test', ['lint', 'style', 'coveralls', 'security'], cb);
});
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[ ![Travis Status for radify/angular-model](https://travis-ci.org/radify/angular-model.svg)](https://travis-ci.org/radify/angular-model)
[![Travis Status for radify/angular-model](https://travis-ci.org/radify/angular-model.svg)](https://travis-ci.org/radify/angular-model)
[![Coverage Status](https://coveralls.io/repos/radify/angular-model/badge.svg?branch=master&service=github)](https://coveralls.io/github/radify/angular-model?branch=master)
[ ![Dependency Status](https://david-dm.org/radify/angular-model.svg)](https://david-dm.org/radify/angular-model)
[ ![devDependency Status](https://david-dm.org/radify/angular-model/dev-status.svg)](https://david-dm.org/radify/angular-model#info=devDependencies)
[![Dependency Status](https://david-dm.org/radify/angular-model.svg)](https://david-dm.org/radify/angular-model)
[![devDependency Status](https://david-dm.org/radify/angular-model/dev-status.svg)](https://david-dm.org/radify/angular-model#info=devDependencies)
[![Code Climate](https://codeclimate.com/github/radify/angular-model/badges/gpa.svg)](https://codeclimate.com/github/radify/angular-model)

# Angular Model

Expand Down
17 changes: 7 additions & 10 deletions config/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
module.exports = function(config) {
config.set({
basePath: '../',
frameworks: ["jasmine"],
files: ['lib/*.js', 'src/*.js', 'test/*Spec.js'],
frameworks: ['jasmine'],
files: ['lib/**/*.js', 'src/**/*.js', 'spec/**/*Spec.js'],
exclude: [],
singleRun: true,
browsers: ['PhantomJS'],
reporters: ['progress', 'coverage', 'coveralls'],
preprocessors: { 'src/*.js': ['coverage'] },
reporters: ['progress', 'coverage'],
preprocessors: {'src/**/*.js': ['coverage']},
coverageReporter: {
type: "lcovonly",
dir: "coverage/"
},
coverallsReporter: {
repoToken: "wJub3kYtybW9CExyDHDd5Yhk7ZGhVsEBZ"
type: 'lcovonly',
dir: 'coverage/'
}
});
};
};
48 changes: 34 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,56 @@
{
"name": "angular-model",
"description": "Simple HATEOS-oriented persistence module for AngularJS.",
"version": "0.4.2",
"version": "0.5.0",
"license": "BSD-3-Clause",
"maintainers": [
{
"name": "Nate Abele",
"email": "nate@unionofrad.com",
"web": "http://unionofrad.com"
"email": "nate@radify.io",
"web": "http://radify.io"
}
],
"contributors": [
{
"name": "Warren Seymour",
"email": "warren@unionofrad.com",
"web": "http://unionofrad.com"
"email": "warren@radify.io",
"web": "http://radify.io"
},
{
"name": "John Mercer",
"email": "john@radify.io",
"web": "http://radify.io"
}
],
"repository": {
"type": "git",
"url": "git@github.com/uor/angular-model.git"
"url": "git+https://github.com/radify/angular-model.git"
},
"bugs": {
"url": "https://github.com/uor/angular-model/issues"
"url": "https://github.com/radify/angular-model/issues"
},
"devDependencies": {
"karma": "~0.13.11",
"karma-jasmine": "~0.3.6",
"karma-coverage": "~0.5",
"karma-coveralls": "~1.1.x",
"karma-script-launcher": "~0.1.0",
"karma-phantomjs-launcher": "~0.2.1"
"gulp": "^3.9.0",
"gulp-coveralls": "^0.1.4",
"gulp-jscs": "^3.0.1",
"gulp-jshint": "^1.11.2",
"jasmine-core": "^2.3.4",
"karma": "^0.13.11",
"karma-coverage": "^0.5.2",
"karma-coveralls": "^1.1.2",
"karma-jasmine": "^0.3.6",
"karma-phantomjs-launcher": "^0.2.1",
"phantomjs": "^1.9.18",
"run-sequence": "^1.1.4"
},
"dependencies": {
"gulp-requiresafe": "^1.1.2"
},
"dependencies": {}
"keywords": [
"angular",
"angularjs",
"HATEOS",
"hypermedia",
"architecture"
]
}
4 changes: 0 additions & 4 deletions script/test

This file was deleted.

Loading

0 comments on commit 9e669f2

Please sign in to comment.