Skip to content

Commit

Permalink
Update how to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw committed Jan 23, 2016
1 parent bcf732c commit 1cec33c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 45 deletions.
15 changes: 0 additions & 15 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
],
"description": "May the force label you",
"main": "dist/labella.min.js",
"license": "Apache-2.0",
"moduleType": [
"amd",
"globals",
Expand Down
14 changes: 8 additions & 6 deletions docs/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ gulp
- Unit test

```bash
gulp test # Run once
gulp tdd # Run, watch for file changes and re-run the tests automatically.
npm test # Run once
npm run tdd # Run, watch for file changes and re-run the tests automatically.
```

- Build library once (will create files in the dist folder)
Expand All @@ -47,8 +47,10 @@ gulp build

Use one of these commands to build, bump version and publish to both npm and bower.

```
gulp publish:patch // will add version by 0.0.1
gulp publish:minor // will add version by 0.1
gulp publish:major // will add version by 1
```bash
gulp tag --npm --patch # will add version by 0.0.1
gulp tag --npm --minor # will add version by 0.1
gulp tag --npm --major # will add version by 1
# then
npm publish
```
18 changes: 1 addition & 17 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ var del = require('del');
var browserSync = require('browser-sync');
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var Server = require('karma').Server;
var webpack = require('webpack-stream');
var argv = require('yargs').argv;
var runSequence = require('run-sequence');
Expand All @@ -23,7 +22,7 @@ var paths = {
};

var patterns = {
js : paths.src + '/**/*.js'
js : paths.src + '/**/*.js'
};

gulp.task('clean', function () {
Expand Down Expand Up @@ -60,21 +59,6 @@ gulp.task('webpack', function() {
.pipe(gulp.dest(paths.examples+'/dist'));
});

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

/* Watch for file changes and re-run tests on each change */
gulp.task('tdd', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js'
}, done).start();
});

/* Start browser-sync */
gulp.task('browser-sync', ['build'], function() {
browserSync.init({
Expand Down
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
"version": "0.1.1",
"description": "May the force label you.",
"main": "dist/labella.min.js",
"directories": {
"example": "examples"
},
"files": [
"dist/*.*"
],
"dependencies": {},
"engines": {
"node": "~5.2"
},
"devDependencies": {
"babel-core": "~6.3.21",
"babel-loader": "~6.2.0",
Expand Down Expand Up @@ -47,7 +44,8 @@
"scripts": {
"prepublish": "pkgfiles",
"start": "gulp --debug",
"test": "gulp test"
"test": "karma start --single-run",
"tdd": "karma start"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 1cec33c

Please sign in to comment.