Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Commit

Permalink
Implementing code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinsonc committed Sep 17, 2018
1 parent 1afda7e commit bfaaa2b
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
coverage/
npm-debug.log
yarn-error.log

Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ node_js:
- "8"

script:
- yarn test -g "for production"
- yarn test -g "for development"
- ./node_modules/.bin/istanbul cover ./node_modules/.bin/codeceptjs run && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

cache:
yarn: true
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

[![Build Status](https://travis-ci.org/jrobinsonc/felicious.svg?branch=master)](https://travis-ci.org/jrobinsonc/felicious)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/80cac1bb731048498b718ce87df06a21)](https://www.codacy.com/app/jrobinsonc/felicious?utm_source=github.com&utm_medium=referral&utm_content=jrobinsonc/felicious&utm_campaign=Badge_Grade)
[![Coverage Status](https://coveralls.io/repos/github/jrobinsonc/felicious/badge.svg?branch=feature%2Fimplementing-code-coverage)](https://coveralls.io/github/jrobinsonc/felicious?branch=feature%2Fimplementing-code-coverage)

This is a Front-End starter kit with Browserify, PostCSS, BrowserSync and more. A solution to build modern web applications with zero initial configuration.

[https://felicious.netlify.com/](https://felicious.netlify.com/)
[https://github.com/jrobinsonc/felicious](https://github.com/jrobinsonc/felicious)

## Features

Expand All @@ -26,8 +27,8 @@ Includes:

## Requirements

* [NodeJS](https://nodejs.org/en/download/) >=6.11
* [NPM](https://nodejs.org/en/download/) >=3
* [NodeJS](https://nodejs.org/en/download/) >=8.9
* [NPM](https://nodejs.org/en/download/) >=5.6
* [Yarn](https://yarnpkg.com/en/docs/install) >=1.2

## Usage
Expand All @@ -38,7 +39,7 @@ Includes:
yarn install
```

If `yarn install` is giving an error, try deleting the file `yarn.lock` and run `yarn install` again.
**NOTE:** If `yarn install` is giving errors, try deleting the file `yarn.lock` and run `yarn install` again.

1. Then, to start development run:

Expand Down
5 changes: 5 additions & 0 deletions codecept.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const runSequence = require('run-sequence').use($.gulp);

exports.config = {
tests: './tests/*_test.js',
grep: 'for production', // By default, it will only test for production unless you specify otherwise.
timeout: 10000,
output: './tests/output',
helpers: {
Expand All @@ -14,6 +15,10 @@ exports.config = {
bootstrap: (done) => {
runSequence('clean', done);
},
teardown: (done) => {
// $.gulp.start('default');
done();
},
mocha: {},
name: 'FElicious'
};
6 changes: 5 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,20 @@ gulp.task('clean', () => {
`${config.destDir}/**/*`,
`!${config.destDir}/.gitkeep`,
`${config.tmpDir}/**/*`,
`!${config.tmpDir}/.gitkeep`
`!${config.tmpDir}/.gitkeep`,
'./coverage'
]);
});

/* istanbul ignore next */
gulp.task('build', ['clean'], (done) => {

tasksSequence.push(done);

runSequence.apply(null, tasksSequence);
});

/* istanbul ignore next */
gulp.task('serve', ['build'], () => {
browserSync.init({
server: {
Expand All @@ -62,6 +65,7 @@ gulp.task('serve', ['build'], () => {
}
});

/* istanbul ignore next */
gulp.task('default', () => {
gulp.start(config.dev ? 'serve' : 'build');
});
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"url": "https://github.com/jrobinsonc/felicious/issues"
},
"scripts": {
"codeceptjs": "./node_modules/.bin/codeceptjs run",
"test": "yarn codeceptjs -g 'for production' && yarn codeceptjs -g 'for development'",
"test": "./node_modules/.bin/codeceptjs run",
"cover": "./node_modules/.bin/istanbul cover ./node_modules/.bin/codeceptjs run",
"build": "./node_modules/.bin/gulp",
"start": "./node_modules/.bin/gulp --dev"
},
Expand All @@ -36,23 +36,25 @@
"browser-sync": "^2.24.7",
"browserify": "^16.2.2",
"codeceptjs": "^1.3.3",
"coveralls": "^3.0.2",
"cssnano": "^4.1.0",
"del": "^3.0.0",
"fancy-log": "^1.3.2",
"glob": "^7.1.3",
"gulp": "^3.9.1",
"gulp-eslint": "^5.0.0",
"gulp-htmlmin": "^5.0.1",
"gulp-if": "^2.0.2",
"gulp-imagemin": "^4.1.0",
"gulp-newer": "^1.4.0",
"gulp-postcss": "^8.0.0",
"gulp-pug": "^4.0.1 ",
"gulp-sass-lint": "^1.4.0",
"gulp-sass": "^4.0.1",
"gulp-sass-lint": "^1.4.0",
"gulp-sourcemaps": "^2.6.4",
"gulp-uglify": "^3.0.1",
"gulp.spritesmith": "^6.9.0",
"gulp": "^3.9.1",
"istanbul": "^0.4.5",
"minimist": "^1.2.0",
"node-notifier": "^5.2.1",
"run-sequence": "^2.2.1",
Expand Down
Loading

0 comments on commit bfaaa2b

Please sign in to comment.