-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sangtt/feature/init
feat(init): Setup project
- Loading branch information
Showing
10 changed files
with
216 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/* | ||
coverage/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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... | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = require('./lib/email-marketing'); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |