@meom/navigation
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "@meom/navigation", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "MEOM navigation", | ||
@@ -10,5 +10,10 @@ "homepage": "https://github.com/MEOM/navigation", | ||
}, | ||
"main": "index.js", | ||
"main": "dist/index.js", | ||
"module": "dist/index.esm.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"build": "rollup -c", | ||
"compress": "gzip -9 -fkc dist/index.min.js > dist/index.min.js.gz", | ||
"show": "ls -lh dist/index.min.js.gz | awk '{print \"Gzipped script size:\", $5\"B\"}'", | ||
"size": "npm run build -- --silent && npm run compress --silent && npm run show && rm dist/index.min.js.gz" | ||
}, | ||
@@ -21,6 +26,10 @@ "keywords": [ | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^19.0.1", | ||
"@rollup/plugin-node-resolve": "^13.0.1", | ||
"@wordpress/eslint-plugin": "^9.0.6", | ||
"@wordpress/prettier-config": "^1.0.5", | ||
"eslint": "^7.30.0" | ||
"eslint": "^7.30.0", | ||
"rollup": "^2.53.2", | ||
"rollup-plugin-terser": "^7.0.2" | ||
} | ||
} |
@@ -24,3 +24,3 @@ # MEOM navigation | ||
```js | ||
import Navigation from '@meom/navigation'; | ||
import { Navigation } from '@meom/navigation'; | ||
@@ -39,2 +39,8 @@ // Mandatory elements. | ||
You can also import helper functions and use them in your Javascript. | ||
```js | ||
import { Navigation, animate, updateAria } from '@meom/navigation'; | ||
``` | ||
### Mandatory elements | ||
@@ -54,2 +60,6 @@ | ||
action: 'click', | ||
toggleNavClass: true, | ||
navClass: 'is-opened', | ||
closeNavOnEscKey: true, | ||
closeNavOnLastTab: false, | ||
subNavAnchors: '.menu-item-has-children.is-item-level-0 > a', | ||
@@ -62,4 +72,2 @@ subSubNavAnchors: 'ul .menu-item-has-children > a', | ||
animateSubNavClass: '', | ||
closeNavOnEscKey: true, | ||
closeNavOnLastTab: false, | ||
visuallyHiddenClass: 'screen-reader-text', | ||
@@ -66,0 +74,0 @@ expandChildNavText: 'Child menu', |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
73855
16
1617
1
81
7
1