Comparing version 1.0.0 to 2.0.0
# Changes to Watch Size | ||
### 2.0.0 (June 24, 2018) | ||
- The package now exports to commonjs and es modules, rather than attaching | ||
itself to `this`. | ||
### 1.0.0 (June 20, 2018) | ||
- Initial version |
{ | ||
"name": "watch-size", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Watch the size changes of a DOM element", | ||
@@ -10,9 +10,11 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"bugs": "https://github.com/jonathantneal/watch-size/issues", | ||
"main": "index.iife.js", | ||
"main": "index.cjs.js", | ||
"module": "index.es.mjs", | ||
"files": [ | ||
"index.iife.js" | ||
"index.cjs.js", | ||
"index.es.mjs" | ||
], | ||
"scripts": { | ||
"build:iife": "babel index.js | uglifyjs -c unsafe=true --mangle --output index.iife.js; gzip-size index.iife.js", | ||
"prepublishOnly": "npm test", | ||
"pretest": "rollup -c .rollup.js --silent", | ||
"test": "echo 'Running tests...'; npm run test:js", | ||
@@ -22,11 +24,11 @@ "test:js": "eslint *.js --cache --ignore-path .gitignore --quiet" | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-eslint": "^8.2.3", | ||
"babel-core": "^6.26.3", | ||
"babel-eslint": "^8.2.6", | ||
"babel-preset-env": "^1.7.0", | ||
"browserify": "^16.2.2", | ||
"eslint": "^4.19.1", | ||
"eslint": "^5.2.0", | ||
"eslint-config-dev": "^2.0.0", | ||
"gzip-size-cli": "^2.1.0", | ||
"pre-commit": "^1.2.2", | ||
"uglify-js": "^3.4.1" | ||
"rollup": "^0.63.4", | ||
"rollup-plugin-babel": "^3.0.7", | ||
"rollup-plugin-uglify-es": "0.0.1" | ||
}, | ||
@@ -33,0 +35,0 @@ "eslintConfig": { |
@@ -21,3 +21,3 @@ # Watch Size [<img src="https://jonathantneal.github.io/dom-logo.svg" alt="PostCSS" width="90" height="90" align="right">][Watch Size] | ||
```js | ||
import 'watch-size'; | ||
import watchSize from 'watch-size'; | ||
@@ -37,5 +37,5 @@ const stop = watchSize( | ||
This allows the listener to avoid polling, and to truly respond to size changes. | ||
This technique can be used back to Internet Explorer 9. | ||
This technique can be used in all browsers going back to Internet Explorer 9. | ||
The entire script is about 400 bytes. | ||
The entire script is about 400 bytes when minified and gzipped. | ||
@@ -42,0 +42,0 @@ [cli-img]: https://img.shields.io/travis/jonathantneal/watch-size.svg |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
12834
6
82
0