diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..02e5fdc --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,45 @@ +# 1.0.0 (2017-02-23) + +This release is a special one since it sets up in the path of a better development environment. Although it's far from +perfect, it's a solid beginning. + +All the code has been migrated from jQuery with ES5 to vanilla JavaScript with ES2015 (or ES6) and is fully modular. +This means that WebSlides is a (base module)[src/js/modules/webslides.js] with a solid API (few public methods) and +it's extended by (plugins)[src/js/plugins]. This leads to more granularity and less code to dive through while fixing a +bug. + +The benefit from this approach is that now it's really easy to extend WebSlides to achieve what you need. You can also +overwrite current plugins. Say you don't like the current navigation with arrows and want to create a menu instead, you +can just write that for yourself with your custom needs and register it as `nav` and it will overwrite our nav with +your code. + +We hope this leads to a better environment in which WebSlides can grow better. + +All the technical specs live now in [this document](docs/technical.md). + +## Bugfixes + +- Fixed a bug with back/next buttons on the browser which lead the nav bar to not work. + +## New Features + +- Linking to slides without window open. +- Added custom events to listen for. `ws:init` whenever webslides is ready and `ws:slide-change` whenever a slide changes. +- Added play/stop methods. + +## Breaking Changes + +- This "stable" release drops the jQuery requirement and leans on ES2015 for the architecture. Hence, it's no longer possible +to use the library as before. + +# 0.2.0 (2017-02-22) + +## New Features + +- Adding autoslide option. + +# 0.1.1 (2017-02-11) + +- Transform the library into an object. +- `.tabs` removed. +- `webslides-lite.js` removed. diff --git a/README.md b/README.md index cd6b9af..b0a6414 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT) [![Twitter](https://img.shields.io/twitter/url/https/github.com/jlantunez/webslides.svg?style=social)](https://twitter.com/webslides) -Finally, everything you need to make HTML presentations in a beautiful way. Just the essentials. You can create your own presentation instantly. Simply choose a demo and customize it in minutes — [https://webslides.tv/demos](https://webslides.tv/demos) +Finally, everything you need to make HTML presentations in a beautiful way. Just the essentials. You can create your own presentation instantly. Simply choose a demo and customize it in minutes — https://webslides.tv/demos. + +A new release (at least) every 8th day of the month. ### Why WebSlides? Good karma and productivity. Just a basic knowledge of HTML and CSS is required. Designers, marketers, and journalists can now focus on the content. diff --git a/docs/technical.md b/docs/technical.md index 3bc54a2..f3d5248 100644 --- a/docs/technical.md +++ b/docs/technical.md @@ -115,15 +115,15 @@ Almost every single feature of WebSlides is a plugin that can be overwritten and ``` // Adding the constructor to WebSlides -WebSlides.registerPlugin('MyPlugin', MyPlugin); +WebSlides.registerPlugin('myPlugin', MyPlugin); // Starting WebSlides // Your plugin will be constructed at this time and it will receive the webslides instance as the only parameter. const ws = new WebSlides(); -// You can also access ws.plugins.MyPlugin now +// You can also access ws.plugins.myPlugin now ``` -This allows you to rewrite the navigation to use a menu (for example) or add that missing piece of functionality you'd like to see. +This allows you to rewrite the navigation to use a menu (for example) or add that missing piece of functionality you'd like to see. See [this part of the code](../src/js/modules/webslides.js#L11) to see all the plugins we're using and the name they're using. Make sure to let us know so it could get added to the repo! diff --git a/package.json b/package.json index 4e651ef..28c3a04 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "babel-core": "^6.23.1", "babel-loader": "^6.3.2", "babel-preset-es2015": "^6.22.0", - "npm-run-all": "^4.0.1", + "npm-run-all": "^4.0.2", "rimraf": "^2.6.0", "webpack": "^2.2.1", "webpack-dev-server": "^2.4.1" diff --git a/src/js/dev.js b/src/js/dev.js deleted file mode 100644 index 567cbed..0000000 --- a/src/js/dev.js +++ /dev/null @@ -1,10 +0,0 @@ -import WebSlides from './modules/webslides'; -import Scroll from './plugins/scroll'; -import Touch from './plugins/touch'; -import Grid from './plugins/grid'; - -WebSlides.registerPlugin('Scroll', Scroll); -WebSlides.registerPlugin('Touch', Touch); -WebSlides.registerPlugin('Grid', Grid); - -window.WebSlides = WebSlides; diff --git a/src/js/full.js b/src/js/full.js index 593d7c0..ad71d64 100644 --- a/src/js/full.js +++ b/src/js/full.js @@ -1,8 +1,3 @@ import WebSlides from './modules/webslides'; -import Scroll from './plugins/scroll'; -import Touch from './plugins/touch'; - -WebSlides.registerPlugin('Scroll', Scroll); -WebSlides.registerPlugin('Touch', Touch); window.WebSlides = WebSlides; diff --git a/src/js/modules/webslides.js b/src/js/modules/webslides.js index 0851b14..748d03f 100644 --- a/src/js/modules/webslides.js +++ b/src/js/modules/webslides.js @@ -9,9 +9,12 @@ const CLASSES = { // Default plugins const PLUGINS = { - 'nav': Plugins.Navigation, + 'grid': Plugins.Grid, 'hash': Plugins.Hash, - 'keyboard': Plugins.Keyboard + 'keyboard': Plugins.Keyboard, + 'nav': Plugins.Navigation, + 'scroll': Plugins.Scroll, + 'touch': Plugins.touch }; export default class WebSlides { @@ -166,7 +169,7 @@ export default class WebSlides { const nextSlide = this.slides[slideI]; if (this.currentSlide_ !== null && this.isVertical && - (!this.plugins.Touch || !this.plugins.Touch.isEnabled)) { + (!this.plugins.touch || !this.plugins.touch.isEnabled)) { this.scrollTransitionToSlide_( isMovingForward, nextSlide, this.onSlideChange_); } else { diff --git a/src/js/plugins/plugins.js b/src/js/plugins/plugins.js index 3bdb403..4e7d6e2 100644 --- a/src/js/plugins/plugins.js +++ b/src/js/plugins/plugins.js @@ -1,9 +1,15 @@ -import Navigation from './navigation'; +import Grid from './grid'; import Hash from './hash'; import Keyboard from './keyboard'; +import Navigation from './navigation'; +import Scroll from './scroll'; +import Touch from './touch'; export default { - Navigation, + Grid, Hash, - Keyboard + Keyboard, + Navigation, + Scroll, + Touch }; diff --git a/webpack.config.babel.js b/webpack.config.babel.js index d84e597..6d0e22d 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -5,13 +5,12 @@ const src = path.join(__dirname, 'src'); module.exports = { context: src, entry: { - webslides: './js/full.js', - 'webslides-dev': './js/dev.js', + webslides: './js/full.js' }, output: { filename: '[name].js', path: path.join(__dirname, 'static/js'), - publicPath: '/static/js/', + publicPath: '/static/js/' }, devServer: { contentBase: __dirname,