Skip to content

Commit

Permalink
Introduced a browser entry point that is ES5 compatible and minified.
Browse files Browse the repository at this point in the history
  • Loading branch information
lsphillips committed Jun 4, 2019
1 parent acb1c2b commit 5acbe67
Show file tree
Hide file tree
Showing 12 changed files with 934 additions and 1,623 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
# -----------------

/node_modules

# Build
# -----------------

/waitForTheElement.js
7 changes: 6 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@

karma.conf.js

# Rollup
# -----------------

rollup.config.js

# Directories
# -----------------

/tests
/test
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.2.0] (2019-06-04)

### Added

- Introduced a browser entry point that is ES5 compatible and minified.

## [2.1.0] (2018-12-05)

### Added
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,32 @@ This project uses mutation observers to improve performance, which is subject to

## Getting started

This project is available through the Node Package Manager (NPM), so you can install it like so:
This module is available through the Node Package Manager (NPM):

```
npm install wait-for-the-element
```

This is a `commonjs` module; so you will need to use a bundler.

## Development

This project doesn't have much of a build process. It does have tests though; which you can run like so:
### Building

You can build a browser entry point that is ES5 compatible and minified:

``` sh
npm run build
```

### Testing

This module also has a robust test suite:

``` sh
npm test
npm run test
```

This also runs code quality checks using ESLint. Please refer to the `.eslintrc` files to familiar yourself with the rules.
This includes a code quality check using ESLint. Please refer to the `.eslintrc` files to familiar yourself with the rules.

## License

This project is released under the MIT license.
This project is released under the [MIT license](LICENSE.txt).
39 changes: 29 additions & 10 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,32 @@

// - - - - - - - - - - - - - - - - - - - - - - - - - - - -

module.exports = function (config)
const build = require('./rollup.config');

// - - - - - - - - - - - - - - - - - - - - - - - - - - - -

module.exports = function test (config)
{
config.set(
{
files :
[
'tests/waitForTheElement.test.js'
'test/specs/**/*.spec.js'
],

preprocessors :
{
'test/**/*.js' : ['rollup']
},

frameworks :
[
'browserify',
'mocha',
'source-map-support'
'mocha'
],

reporters :
[
'mocha'
],

browsers :
Expand All @@ -24,16 +36,23 @@ module.exports = function (config)
'FirefoxHeadless'
],

preprocessors :
concurrency : 1,

client :
{
'tests/waitForTheElement.test.js' : ['browserify']
mocha :
{
timeout : 5000
}
},

client :
mochaReporter :
{
mocha : { timeout : 10000 }
showDiff : true
},

browserify : { debug : true }
rollupPreprocessor : build({
forTest : true
})
});
};
Loading

0 comments on commit 5acbe67

Please sign in to comment.