Skip to content

Commit

Permalink
Update devDepenencies and tests. Add code coverage and update readme …
Browse files Browse the repository at this point in the history
…shields.
  • Loading branch information
pazguille committed Dec 25, 2016
1 parent e99a2ee commit 07fdd42
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 21 deletions.
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Logs
*.log

# Dependency directory
node_modules
components
build

# Trash
.DS_Store

# Test Files that should be ignored
coverage
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- 0.10
before_script:
- npm install -g gulp
- 6.9.1
# Send coverage data to Coveralls
after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
13 changes: 8 additions & 5 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,25 @@ mkdirp('./dist');
* Build task
*/
gulp.task('build', function() {
mkdirp('./dist');
gulp.src('./index.js')
.pipe(header(prefix, { 'pkg' : pkg }))
.pipe(replace('module.exports = ', ''))
.pipe(rename(pkg.name + '.js'))
.pipe(gulp.dest('./dist/'))
});

/**
* Min task
*/
/**
* Min task
*/
gulp.task('min', function() {
gulp.src('./dist/' + pkg.name + '.js')
.pipe(ugifyjs())
.pipe(rename(pkg.name + '.min.js'))
.pipe(gulp.dest('./dist/'))
.pipe(gulp.dest('./dist/'));
});

/**
* Register tasks
*/
gulp.task('default', ['build']);
gulp.task('dist', ['build', 'min']);
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# aload.js [![Build Status](https://secure.travis-ci.org/pazguille/aload.png)](http://travis-ci.org/pazguille/aload) [![devDependency Status](https://david-dm.org/pazguille/aload/dev-status.png)](https://david-dm.org/pazguille/aload#info=devDependencies)
# aload.js

[![NPM version][npm-image]][npm-link] [![License][lic-image]][npm-link] [![Build status][travis-image]][travis-link] [![Coverage Status][coverage-image]][coverage-link] [![Dependency status][deps-image]][deps-link] [![devDependency status][devdeps-image]][devdeps-link] [![downloads][dt-image]][npm-link]

> Loads images, background images, scripts, styles, iframes, videos and audios asynchronously (just 241 bytes).
Expand All @@ -16,6 +18,10 @@ aload();

$ npm install aload

$ bower install aload

*Note:* I recommend to use `aload` inline in your HTML.

As standalone just include `aload` function (just 241 bytes) inline into your HTML file:

```html
Expand Down Expand Up @@ -160,13 +166,26 @@ For example, to show images when JavaScript is not enabled you should include th
- `npm run dist`: Creates a distribution version of `aload`. You should find two files: `./dist/aload.js` and `./dist/aload.min.js`.
- `npm test`: Runs mocha tests.

## Made with ❤ by
## With :heart: by

- Guille Paz (Front-end developer | Web standards lover)
- E-mail: [guille87paz@gmail.com](mailto:guille87paz@gmail.com)
- Twitter: [@pazguille](http://twitter.com/pazguille)
- Web: [http://pazguille.me](http://pazguille.me)
- Web: [https://pazguille.me](https://pazguille.me)

## License

MIT license. Copyright © 2015.
MIT license. Copyright © 2016.

[npm-image]: https://img.shields.io/npm/v/aload.svg
[lic-image]: https://img.shields.io/npm/l/aload.svg
[npm-link]: https://npmjs.org/package/aload
[travis-image]: https://img.shields.io/travis/pazguille/aload.svg
[travis-link]: https://travis-ci.org/pazguille/aload
[deps-image]: https://img.shields.io/david/pazguille/aload.svg
[deps-link]: https://david-dm.org/pazguille/aload
[devdeps-image]: https://img.shields.io/david/dev/pazguille/aload.svg
[devdeps-link]: https://david-dm.org/pazguille/aload#info=devDependencies
[dt-image]: https://img.shields.io/npm/dt/aload.svg
[coverage-image]: https://img.shields.io/coveralls/pazguille/aload.svg
[coverage-link]: https://coveralls.io/github/pazguille/aload
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "aload",
"main": "aload.js",
"version": "1.2.2",
"version": "1.2.3",
"homepage": "http://pazguille.github.io/aload/",
"authors": [
"Guille Paz <[email protected]>"
Expand Down
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
{
"name": "aload",
"version": "1.2.2",
"version": "1.2.3",
"description": "Loads images, scripts, styles, iframes, videos and audios asynchronously.",
"author": "@pazguille <[email protected]>",
"scripts": {
"dist": "node_modules/.bin/gulp",
"test": "npm run dist && node_modules/.bin/_mocha"
"build": "node_modules/.bin/gulp",
"dist": "node_modules/.bin/gulp dist",
"test": "npm run build && NODE_ENV=test istanbul cover _mocha -- ./test/*.spec.js",
"lint": "eslint index.js"
},
"repository": "[email protected]:pazguille/aload.git",
"dependencies": {},
"devDependencies": {
"better-assert": "1.0.2",
"coveralls": "^2.11.15",
"gulp": "3.9.1",
"gulp-header": "1.8.8",
"gulp-rename": "1.2.2",
"gulp-replace": "0.5.4",
"gulp-uglify": "2.0.0",
"mkdirp": "0.5.1",
"istanbul": "^0.4.5",
"jsdom": "9.9.1",
"mocha": "3.2.0",
"better-assert": "1.0.2"
"mkdirp": "0.5.1",
"mocha": "^3.2.0"
},
"keywords": [
"aload",
Expand Down
File renamed without changes.

0 comments on commit 07fdd42

Please sign in to comment.