Display a voucher
npm install @abtasty/ff-widget-voucherbash
npm start
`
Main files
* main.js
Main source code of your widget
* form.js
Configuration form for your widget
* icon.png
Icon for your widget (recommended size: 200x200px)
You can specify each file location in the package.json like this:
`json
"main": "dist/main.js",
"form": "dist/form.js",
"icon": "icon.png",
`
Included
* Rollup.js module bundler (like Webpack but smaller and faster).
* ES6 support using Babel.
* JavaScript Linting with ESLint and Airbnb style.
* JavaScript minified with UglifyJS.
* Prettier to format code.
We heard your widget have an UI, so we allowed ourselves to include some extra:
* Pug (aka Jade) to transforms html files into JS template.
* PostCSS to automatically append your CSS to head just using import 'yourstyle.css' and also use CSS plugins including:
* CSSnext to use the latest CSS syntax today.
* cssnano to minify CSS.
Add your widget to AB Tasty
1. First, you'll need to have your widget on NPM:
* Create a minified bundle with npm run build
* Bump the version of your widget (using semver) with npm version [patch|minor|major]
* Publish it to NPM: npm publish`