- Implement 'search' textbox in navbar - use typeahead compt from https://angular-ui.github.io/bootstrap/
- Implement search page - empty page that displays all contacts in card form. Narrows it down based on what's typed into search box.
-
start mongo
-
start REST server $ npm run start_server
-
start UI $ gulp clean $ gulp
-
To generate test data, fire up your browser and enter following url http://localhost:9090/api/contacts/generate/1234 This will generate sample contact everytime you refresh this url.
based on seed gulp-karma project @
-
https://github.com/karma-runner/gulp-karma Will also use sample gulp file from here
-
https://artifact.me/simple-gulp-configuration-for-angular-applications/
-
see http://quickui.org/docs/contacts.html for card layout example
You don't need any gulp plugins (why?) to run Karma from the Gulp-based build, use Karma directly:
var gulp = require('gulp');
var Server = require('karma').Server;
/**
* Run test once and exit
*/
gulp.task('test', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, done).start();
});
This sample project illustrates 2 usage scenarios of Karma integration in the Gulp.js build:
gulp test
- a task that runs all the tests with Karma once and exits. Such a task is often used on CI servers etc.gulp tdd
- a task that runs the tests and pauses, watching for file changes. Upon detecting a change Karma re-runs the tests. Such a task is often used during development.
While there exist integration of the karma-runner into Grunt based builds (https://github.com/karma-runner/grunt-karma) we've decided not to create a dedicated plugin for Gulp.js. The reasoning here is that it is very, very easy to invoke Karma's public API directly from a Gulp.js task, as illustrated in this repository. Writing a dedicated plugin would bring little benefit and could limit possible usage scenarios.
To see how easy is to integrate Karma into an existing Gulp.js build just check the included gulpfile.js.
There are several people moving from Grunt.js to Gulp.js who noticed that with Gulp we often don't need a dedicated plugin anymore. For example, a good overview of such situation can be found in the following article.