BunnyJS - Lightweight native (vanilla) JavaScript (JS) and ECMAScript 6 (ES6) browser library, package of small stand-alone components without dependencies: FormData, upload, image preview, HTML5 validation, Autocomplete, Dropdown, Calendar, Datepicker, Ajax, Datatable, Pagination, URL, Template engine, Element positioning, smooth scrolling, routing, inversion of control and more. Simple syntax and architecture. Next generation jQuery and front-end framework. Documentation and examples available.
New license, coding style changes, ability to create plugins, new fully accessible components, utils, examples, all dists included and more.
This is first Beta release. BunnyJS Beta version is still a pre-release, however, BunnyJS already used on production. Beta release brings almost stable API, solid architecture and it won't change much anymore. There are still old components available for backward compatibility, however, all of them will be removed in 1.0.
Nevertheless, BunnyJS Beta is stable and reliable open source product and many developers now might use it in real business, production, change it and do whatever they want. It is now possible with the changed license from GPL to MIT.
ESLint going to be used. Coding style based on airbnb-base. The most important change for now - 4 spaces replaced with 2.
Accessibility is very important in modern world, moreover, it is also legal requirement. Unfortunately many libraries doesn't have even basic keyboard navigation support. BunnyJS is going to make next generation web apps accessible out of the box.
Add basic accessibility feature to any list-type component or DOM element - keyboard navigation with the help of addEventKeyNavigation()
Now everyone will be able easily write plugins (extensions) for BunnyJS components. Importing one additional plugin might add functionality to any component
src/plugins
import { Autocomplete } from 'bunnyjs/src/Autocomplete';
import 'bunnyjs/src/plugins/AutocompleteIcons'; // just add/remove this line to enable/disable plugin
Plugins are changes to the original object using Object.assign()
and containing init<PluginName>()
method.
BunnyJS plugins are Vanilla JS object extensions like Traits/Mixins/Extensions in other programming languages.
src/bunny.dropdown
-> use src/Dropdown
src/bunny.autocomplete
-> use src/Autocomplete
based on refactored src/Dropdown insteadsrc/utils/DOM/ready.js
-> use src/utils/DOM
To reduce code duplication many components now also requires to use src/utils/core
;
<svg><use...></svg>
elements developers should care more then just about createElement(), setAttribute(). Now there are couple of functions available in src/utils/svg
to create SVG use elements and change the icon.examples/dropdown
contains examples for all Dropdown-based components.dists
folderassets-builder
, custom node scripts instead of gulpGenerating assets is a painful work. All build process is going to be moved into separate NPM package assets-builder
which is currently not recommended for any usage. It will be a simple API which developers will be able to extend and configure easily. Transpiling and bundling all JavaScript might now take only one line of code in custom node build script.
Gulp won't be used anymore in the future.