Skip to content

Commit

Permalink
Scaffold: Normalize repository
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Oct 2, 2017
1 parent d2e3335 commit 6b1c9ed
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 27 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.md]
trim_trailing_whitespace = false
10 changes: 8 additions & 2 deletions .gitignore
Expand Up @@ -20,6 +20,12 @@ coverage
build/Release

# Dependency directory
# Deployed apps should consider commenting this line out:
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules

# Users Environment Variables
.lock-wscript

# Garbage files
.DS_Store
6 changes: 5 additions & 1 deletion .travis.yml
@@ -1,7 +1,11 @@
sudo: false
language: node_js
node_js:
- 'stable'
- '8'
- '6'
- '5'
- '4'
- '0.12'
- '0.10'
after_script:
- npm run coveralls
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall and other contributors
Copyright (c) 2015, 2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
26 changes: 26 additions & 0 deletions appveyor.yml
@@ -0,0 +1,26 @@
# http://www.appveyor.com/docs/appveyor-yml
# http://www.appveyor.com/docs/lang/nodejs-iojs

environment:
matrix:
# node.js
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "4"
- nodejs_version: "5"
- nodejs_version: "6"
- nodejs_version: "8"

install:
- ps: Install-Product node $env:nodejs_version
- npm install

test_script:
- node --version
- npm --version
- cmd: npm test

build: off

# build version format
version: "{build}"
20 changes: 13 additions & 7 deletions package.json
@@ -1,9 +1,11 @@
{
"name": "undertaker-registry",
"version": "1.0.0",
"description": "Default registry in gulp 4",
"author": "Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com/)",
"contributors": [],
"description": "Default registry in gulp 4.",
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
"contributors": [
"Blaine Bublitz <blaine.bublitz@gmail.com>"
],
"repository": "gulpjs/undertaker-registry",
"license": "MIT",
"engines": {
Expand All @@ -17,15 +19,19 @@
"scripts": {
"lint": "eslint . && jscs index.js test/",
"pretest": "npm run lint",
"test": "lab -cv"
"test": "mocha --async-only",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
},
"devDependencies": {
"code": "^1.2.1",
"eslint": "^1.7.3",
"eslint-config-gulp": "^2.0.0",
"jscs": "^2.4.0",
"expect": "^1.19.0",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"jscs": "^2.3.5",
"jscs-preset-gulp": "^1.0.0",
"lab": "^6.2.0"
"mocha": "^3.5.0"
},
"keywords": [
"registry",
Expand Down
28 changes: 12 additions & 16 deletions test/index.js
@@ -1,10 +1,6 @@
'use strict';

var lab = exports.lab = require('lab').script();
var expect = require('code').expect;

var describe = lab.describe;
var it = lab.it;
var expect = require('expect');

var Registry = require('../');

Expand All @@ -16,17 +12,17 @@ describe('undertaker-registry', function() {

it('can be constructed with new', function(done) {
var reg = new Registry();
expect(reg.get).to.be.a.function();
expect(reg.set).to.be.a.function();
expect(reg.tasks).to.be.a.function();
expect(reg.get).toBeA('function');
expect(reg.set).toBeA('function');
expect(reg.tasks).toBeA('function');
done();
});

it('can be constructed without new', function(done) {
var reg = Registry();
expect(reg.get).to.be.a.function();
expect(reg.set).to.be.a.function();
expect(reg.tasks).to.be.a.function();
expect(reg.get).toBeA('function');
expect(reg.set).toBeA('function');
expect(reg.tasks).toBeA('function');
done();
});
});
Expand All @@ -35,7 +31,7 @@ describe('undertaker-registry', function() {

it('is a noop', function(done) {
var reg = new Registry();
expect(reg.init).to.be.a.function();
expect(reg.init).toBeA('function');
done();
});
});
Expand All @@ -45,7 +41,7 @@ describe('undertaker-registry', function() {
it('returns a task from the registry', function(done) {
var reg = new Registry();
reg._tasks.test = noop;
expect(reg.get('test')).to.equal(noop);
expect(reg.get('test')).toEqual(noop);
done();
});
});
Expand All @@ -55,14 +51,14 @@ describe('undertaker-registry', function() {
it('registers a task', function(done) {
var reg = new Registry();
reg.set('test', noop);
expect(reg._tasks.test).to.equal(noop);
expect(reg._tasks.test).toEqual(noop);
done();
});

it('returns the task (useful for inheriting)', function(done) {
var reg = new Registry();
var task = reg.set('test', noop);
expect(task).to.equal(noop);
expect(task).toEqual(noop);
done();
});
});
Expand All @@ -73,7 +69,7 @@ describe('undertaker-registry', function() {
var reg = new Registry();
reg.set('test1', noop);
reg.set('test2', noop);
expect(reg.tasks()).to.deep.equal({ test1: noop, test2: noop });
expect(reg.tasks()).toEqual({ test1: noop, test2: noop });
done();
});
});
Expand Down

0 comments on commit 6b1c9ed

Please sign in to comment.