Skip to content
No description, website, or topics provided.
JavaScript CSS HTML
Branch: master
Clone or download
Pull request Compare This branch is 1 commit ahead, 4 commits behind smb4u:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.DS_Store
.coveralls.yml
.eslintrc
.gitignore
.travis.yml
README.md
index.template.ejs
package.json
webpack.config.js

README.md

node-travis-v3

MIT license

This is an example using Travis CI for continuous integration and Istanbul/Coveralls for code coverage.

Getting Started

Install dependencies:

$ npm install

Run tests:

$ npm coveralls

Stack

  • Node v6.5.0
  • Mocha v3.0.2
  • Chai v3.5.0
  • Istanbul v0.4.5
  • Coveralls v2.11.12

Working with Webpack

Using the html-webpack-plugin

Install the dependency:

npm i --save-dev html-webpack-plugin

Require the plugin in your webpack.config.js:

var HtmlWebpackPlugin = require('html-webpack-plugin');

Add an entry to the plugins array where I instantiate the plugin with two properties:

  • template defines the template the plugin will use to generate the HTML
  • inject: body tells the plugin to inject Javascript into the bottom of the page, just before the closing <body> tag, instead of the <head> tag
plugins: [
  ...
  new HtmlWebpackPlugin({
    template: 'index.template.ejs',
    inject: 'body',
  })
],

Working with Enzyme

Enzyme is a Javascript Testing Utility for React to make it easier to assert, manipulate, and traverse your React Component's output. It mimicks jQuery's API for DOM manipulation and traversal. Install the dependencies below for compatibility with React 0.14.x or React 15.x:

npm i --save-dev enzyme react-addons-test-utils
npm i --save react-dom

##Credits

License

MIT © AJ Grande

You can’t perform that action at this time.