Skip to content

Commit

Permalink
Merge pull request #1 from sangtt/feature/init
Browse files Browse the repository at this point in the history
feat(init): Setup project
  • Loading branch information
sangtt committed Nov 6, 2015
2 parents b92c6af + ccbc7be commit c6cc280
Show file tree
Hide file tree
Showing 10 changed files with 216 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
env:
node: true

rules:
indent: [2, 4, {SwitchCase: 1, VariableDeclarator: 1}]
brace-style: [2, "1tbs"]
comma-style: [2, "last"]
default-case: 2
func-style: [2, "declaration"]
no-floating-decimal: 2
no-nested-ternary: 2
no-undefined: 2
radix: 2
space-before-function-paren: [2, "never"]
space-after-keywords: [2, "always"]
space-before-blocks: 2
spaced-comment: [2, "always", { exceptions: ["-"]}]
valid-jsdoc: [1, { requireReturn: false, prefer: { return": "returns" }}]
wrap-iife: 2
guard-for-in: 2
strict: [2, "global"]
global-strict: 0
no-alert: 2
camelcase: 1
curly: [2, "all"]
eqeqeq: [2, "allow-null"]
no-empty: 2
no-underscore-dangle: 0
no-use-before-define: 2
no-obj-calls: 2
no-unused-vars: [0, {"vars": "local", "args": "after-used"}]
new-cap: 2
no-shadow: 1
no-invalid-regexp: 2
comma-dangle: [2, "never"]
no-undef: 2
no-new: 2
no-extra-semi: 2
no-debugger: 2
no-caller: 1
semi: 2
quotes: [1, "single", "avoid-escape"]
no-unreachable: 2
eol-last: 1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/*
coverage/*
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: node_js
node_js:
- "0.12"

env:
global:
- COVERALLS_REPO_TOKEN: BtMzrlEAH9VVpvorRtDwixrqXNCLUTS1D

cache:
directories:
- node_modules

before_install:
- npm --version
- npm install --global gulp-cli
- gulp --version

install:
- npm install

script:
- gulp lint
- gulp test
- gulp coveralls

23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
[![Build Status][travis-image]][travis-url]
[![Coverage Status][coveralls-image]][coveralls-url]

# email-marketing
Node email marketing
```sh
$ version 0.0.0
```

Email marketing project

## Installation

Install [email-marketing](https://travis-ci.org/sangtt/email-marketing) then run the following.

```shell
$ npm install email-marketing --save
```


[travis-image]: https://travis-ci.org/sangtt/email-marketing.svg?style=flat-square
[coveralls-image]: https://img.shields.io/coveralls/sangtt/email-marketing/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/sangtt/email-marketing
[coveralls-url]: https://coveralls.io/github/sangtt/email-marketing?branch=master
58 changes: 58 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
'use strict';

var gulp = require('gulp');
var eslint = require('gulp-eslint');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var coveralls = require('gulp-coveralls');
var serve = require('gulp-serve');
var del = require('del');

gulp.task('clean', function(done) {
return del([
'./coverage/'
], done);
});

gulp.task('lint', function() {
return gulp
.src([
'*.js',
'lib/**/*.js'
])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task('pre-test', ['clean'], function() {
return gulp
.src(['lib/**/*.js'])
.pipe(istanbul())
.pipe(istanbul.hookRequire());
});

gulp.task('test', ['pre-test'], function() {
return gulp
.src(['test/**/*.js'])
.pipe(mocha({reporter: 'spec'}))
.pipe(istanbul.writeReports())
.pipe(istanbul.enforceThresholds({thresholds: {
global: 25
}}));
});

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

gulp.task('serve:coverage', false, serve({
'port' : 3000,
'root' : 'coverage/lcov-report'
}));

gulp.task('default', ['lint', 'test'], function() {
// This will only run if the lint task is successful...
});
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use strict';

module.exports = require('./lib/email-marketing');
Empty file added lib/.gitignore
Empty file.
3 changes: 3 additions & 0 deletions lib/email-marketing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use strict';

module.exports = {};
49 changes: 49 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "email-marketing",
"description": "An easy way to email marketing",
"main": "./index",
"author": "Sang. Truong",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/sangtt/email-marketing.git"
},
"bugs": {
"url": "https://github.com/sangtt/email-marketing/issues"
},
"scripts": {
"test": "gulp test",
"lint": "gulp lint",
"coveralls": "gulp coveralls"
},
"dependencies": {},
"devDependencies": {
"del": "^2.0.2",
"gulp": "^3.9.0",
"gulp-coveralls": "^0.1.4",
"gulp-eslint": "^1.0.0",
"gulp-istanbul": "^0.10.2",
"gulp-mocha": "^2.1.3",
"gulp-serve": "^1.2.0"
},
"license": "MIT",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/sangtt/email-marketing/raw/master/LICENSE"
}
],
"engines": {
"node": ">= 0.12"
},
"homepage": "https://github.com/sangtt/email-marketing#readme",
"directories": {
"test": "test"
},
"keywords": [
"email",
"marketing",
"node",
"email-marketing"
]
}
10 changes: 10 additions & 0 deletions test/unit/basic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';

var assert = require('assert');
var index = require('./../../index');

describe('Email Marketing', function() {
describe('#should be true', function () {
assert.equal(true, true);
});
});

0 comments on commit c6cc280

Please sign in to comment.