Skip to content

Commit

Permalink
remove istanbul comment on release, clean README
Browse files Browse the repository at this point in the history
  • Loading branch information
chemerisuk committed Oct 12, 2014
1 parent 6296b6f commit 80897b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
12 changes: 2 additions & 10 deletions README.md
Expand Up @@ -8,17 +8,16 @@ This library is about __ideas__. After some time of using jQuery I found that it

## Features
* lightweight: ~5 kB gzipped
* clear, minimalistic and standards-based (where possible) APIs
* [live extensions](https://github.com/chemerisuk/better-dom/wiki/Live-extensions)
* [getter and setter](https://github.com/chemerisuk/better-dom/wiki/Getter-and-setter)
* [animations via CSS3](http://jsfiddle.net/C3WeM/5/)
* [microtemplating using the Emmet syntax](https://github.com/chemerisuk/better-dom/wiki/Microtemplating)
* [improved event handling](https://github.com/chemerisuk/better-dom/wiki/Event-handling)
* [getter and setter](https://github.com/chemerisuk/better-dom/wiki/Getter-and-setter)

## Installation
The simplest way is to use [bower](http://bower.io/):

$ bower install better-dom --save
$ bower install better-dom

This will clone the latest version of the __better-dom__ with dependencies into the `bower_components` directory at the root of your project. Then just include the script below on your web page:

Expand All @@ -43,13 +42,6 @@ The project uses set of ES6 transpilers to compile a file that works in current

Of course any pull request should pass all tests. Code style guide is not formalized yet, but I'll look at it manully.

## Performance
* [DOM.create vs jquery](http://jsperf.com/dom-create-vs-jquery/26)
* [DOM.find[All] vs jQuery.find](http://jsperf.com/dom-find-all-vs-jquery-find/10)
* [DOM getter/setter vs jQuery.attr/prop](http://jsperf.com/dom-getter-setter-vs-jquery-attr-prop/5)
* [better-dom vs jquery: classes manipulation](http://jsperf.com/better-dom-vs-jquery-classes-manipulation/6)
* [better-dom vs jquery: array methods](http://jsperf.com/better-dom-vs-jquery-array-methods/4)

## Notes about old IEs
For IE8-9 support you have to incude an extra file via the conditional comment below into `<head>` on your page:

Expand Down
5 changes: 2 additions & 3 deletions conf/karma.conf-ci.js
Expand Up @@ -101,9 +101,8 @@ module.exports = function(config) {

files: [
// legacy IE file includes
{pattern: "./build/better-dom.htc", served: true, included: false},
"./bower_components/es5-shim/es5-shim.js",
"./bower_components/html5shiv/dist/html5shiv.js",
{pattern: "./build/better-dom-legacy.htc", served: true, included: false},
"./build/better-dom-legacy.js",
// normal browser file includes
"./test/lib/jasmine-better-dom-matchers.js",
"./build/better-dom.js",
Expand Down
3 changes: 1 addition & 2 deletions gulpfile.js
Expand Up @@ -32,7 +32,6 @@ gulp.task("lint", function() {

gulp.task("compile", ["lint"], function() {
var version = argv.tag;
var jsdoc = !version;
var dest = version ? "dist/" : "build/";

if (version) {
Expand All @@ -47,7 +46,7 @@ gulp.task("compile", ["lint"], function() {
});

return gulp.src(["*.js", "dom/*.js", "element/*.js", "util/*.js"], {buffer: false, cwd: "./src"})
.pipe(compile("better-dom.js", {jsdoc: jsdoc}))
.pipe(compile("better-dom.js", {compress: dest === "dist/"}))
.pipe(template({ pkg: pkg, VERSION_NUMBER: version }))
.pipe(es6transpiler())
.pipe(gulp.dest(dest));
Expand Down
4 changes: 3 additions & 1 deletion task/compile.js
Expand Up @@ -50,9 +50,11 @@ module.exports = function(dest, options) {
var ast = container.convert();
var code = recast.print(ast[0]).code;

if (options.jsdoc === false) {
if (options.compress) {
// remove jsdoc comments from the output
code = code.replace(/\/\*\*([\s\S]*?)\*\/\s+/gm, "");
// remove istanbul comments from output
code = code.replace(/\/\* istanbul[^\/]+\/\s*/g, "");
}

code = banner + "\n" + code;
Expand Down

0 comments on commit 80897b9

Please sign in to comment.