Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
2 parents fb8593f + 9b55f73 commit aeb0bdc8d0c6e9a49570971afc0e089ac5c25ec4 @nstanard nstanard committed Oct 3, 2016
View
@@ -6,16 +6,17 @@ cache:
notifications:
email: false
node_js:
- - '4'
+ - '5.2'
before_install:
- - npm i -g npm@^2.0.0
+ - npm i -g npm@^3.3
before_script:
- npm prune
- 'curl -Lo travis_after_all.py https://git.io/vLSON'
script: "npm run travis"
after_success:
- python travis_after_all.py
- export $(cat .to_export_back)
+ - test $TRAVIS_BRANCH = "master" && test $TRAVIS_PULL_REQUEST = false && test $SAUCE_ACCESS_KEY && test $SAUCE_USERNAME && npm run "karma-sauce"
- npm run semantic-release
branches:
except:
View
@@ -1,6 +1,6 @@
<p align="center">
- <img src="./demo/lory.png" width="200px" />
+ <img src="./static/lory.png" width="200px" />
</p>
Please visit: [http://meandmax.github.io/lory/](http://meandmax.github.io/lory/ "lory")
@@ -27,8 +27,8 @@ Please visit: [http://meandmax.github.io/lory/](http://meandmax.github.io/lory/
lory is released under the MIT license & supports modern environments.
There is also a prebundled CDN version which you can use.
-#### Vanilla JavaScript: https://cdn.jsdelivr.net/lory-js/2.1.0/lory.min.js
-#### jQuery plugin: https://cdn.jsdelivr.net/lory-js/2.1.0/jquery.lory.min.js
+#### Vanilla JavaScript: https://cdnjs.cloudflare.com/ajax/libs/lory.js/2.2.0/lory.min.js
+#### jQuery plugin: https://cdnjs.cloudflare.com/ajax/libs/lory.js/2.2.0/jquery.lory.min.js
## Install with node:
@@ -79,7 +79,7 @@ npm install
// To start the development server run:
-npm start
+npm run dev
// To lint your code run:
@@ -103,7 +103,7 @@ npm run karma-local
```
<p align="center">
- <img src="./demo/tests.png" />
+ <img src="./static/tests.png" />
</p>
## Prerequisited markup
@@ -180,7 +180,7 @@ li {
## Integration as a jQuery Plugin
```js
-<script src="js/jquery.lory.min.js"></script>
+<script src="dist/jquery.lory.js"></script>
<script>
'use strict';
@@ -195,7 +195,7 @@ li {
## Integration of multiple sliders on one page
```javascript
-<script src="js/lory.js"></script>
+<script src="dist/lory.js"></script>
<script>
'use strict';
View
@@ -0,0 +1,49 @@
+import webpack from 'webpack';
+import _debug from 'debug';
+import fs from 'fs-extra';
+import config from '../webpack.config.prod.js';
+import {COMPILER_STATS} from '../webpack.config.base.js';
+
+const debug = _debug('app:build:webpack-compiler');
+
+function webpackCompiler (webpackConfig, statsFormat = COMPILER_STATS) {
+ return new Promise((resolve, reject) => {
+ const compiler = webpack(webpackConfig);
+
+ compiler.run((err, stats) => {
+ const jsonStats = stats.toJson();
+
+ debug('Webpack compile completed.');
+ debug(stats.toString(statsFormat));
+
+ if (err) {
+ debug('Webpack compiler encountered a fatal error.', err);
+ return reject(err);
+ } else if (jsonStats.errors.length > 0) {
+ debug('Webpack compiler encountered errors.');
+ debug(jsonStats.errors.join('\n'));
+ return reject(new Error('Webpack compiler encountered errors'));
+ } else if (jsonStats.warnings.length > 0) {
+ debug('Webpack compiler encountered warnings.');
+ debug(jsonStats.warnings.join('\n'));
+ } else {
+ debug('No errors or warnings encountered.');
+ }
+ resolve(jsonStats);
+ });
+ });
+}
+
+;(async function () {
+ try {
+ debug('Run compiler');
+ const stats = await webpackCompiler(config);
+ if (stats.warnings.length && config.compiler_fail_on_warning) {
+ debug('Config set to fail on warning, exiting with status code "1".');
+ process.exit(1);
+ }
+ } catch (e) {
+ debug('Compiler encountered an error.', e);
+ process.exit(1);
+ }
+})();
View
@@ -0,0 +1,17 @@
+import webpack from 'webpack';
+import config from '../webpack.config.dev.js';
+import _debug from 'debug';
+import WebpackDevServer from 'webpack-dev-server';
+import {COMPILER_STATS, PORT} from '../webpack.config.base.js';
+
+const debug = _debug('app:server');
+
+config.entry.app.unshift(`webpack-dev-server/client?http://localhost:${PORT}/`, "webpack/hot/dev-server");
+const compiler = webpack(config);
+const server = new WebpackDevServer(compiler, {
+ hot: true,
+ stats: COMPILER_STATS
+});
+
+debug(`Start webpack-dev-server on port: ${PORT}`);
+server.listen(PORT);
View
@@ -1,6 +1,6 @@
{
"name": "lory",
- "version": "1.2.6",
+ "version": "2.2.1",
"homepage": "http://meandmax.github.io/lory/",
"authors": [
"Maximilian Heinz <info@maximilian-heinz.de>"
@@ -29,4 +29,4 @@
"test",
"tests"
]
-}
+}
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>lory.js</title>
- <meta name="description" content="slider, carousel, infinite, swipe, touch">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="shortcut icon" type="image/ico" href="favicon.ico" />
- <link rel="stylesheet" type="text/css" href="./app.css" />
- <link rel="stylesheet" type="text/css" href="./vendor/railscasts.css" />
- <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700' rel='stylesheet' type='text/css'>
- </head>
-
- <body>
- <header>
- <div class="ribbon">
- <a href="https://github.com/meandmax/lory">Fork me on GitHub</a>
- </div>
-
- <img class="logo" src="lory.png" />
- <p class="description">Touch enabled minimalistic slider written in vanilla JavaScript</p>
-
- <a class="dist" href="./js/lory.min.js">Download Here</a>
- </header>
-
- <section class="examples">
- <h2>Slide to Index 5</h2>
-
- <div class="slider js_simple simple">
- <div class="frame js_frame">
- <ul class="slides js_slides">
- <li class="js_slide">1</li>
- <li class="js_slide">2</li>
- <li class="js_slide">3</li>
- <li class="js_slide">4</li>
- <li class="js_slide">5</li>
- <li class="js_slide">6</li>
- </ul>
- </div>
-
- <span class="js_prev prev">
- <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 501.5 501.5"><g><path fill="#2E435A" d="M302.67 90.877l55.77 55.508L254.575 250.75 358.44 355.116l-55.77 55.506L143.56 250.75z"/></g></svg>
- </span>
-
- <span class="js_next next">
- <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 501.5 501.5"><g><path fill="#2E435A" d="M199.33 410.622l-55.77-55.508L247.425 250.75 143.56 146.384l55.77-55.507L358.44 250.75z"/></g></svg>
- </span>
- </div>
-
-<div class="examplecode"><pre><code class="javascript">
- 'use strict';
-
- document.addEventListener('DOMContentLoaded', function () {
- var simple = document.querySelector('.js_simple');
-
- var lory = lory(simple, {
- infinite: 1
- });
-
- lory.slideTo(3);
- });
-
-</code></pre></div>
-
- </body>
-
- <script src="vendor/highlight.js"></script>
- <script>hljs.initHighlightingOnLoad();</script>
-
- <script src="vendor/jquery-2.1.3.min.js"></script>
- <script src="js/lory.min.js"></script>
- <script>
- 'use strict';
-
- document.addEventListener('DOMContentLoaded', function () {
- var simple = document.querySelector('.js_simple');
-
- var lorySlider = lory(simple, {
- infinite: 1
- });
-
- lorySlider.slideTo(3);
- });
- </script>
- </script>
-</html>
View
Binary file not shown.
View
Deleted file not rendered
Oops, something went wrong.

0 comments on commit aeb0bdc

Please sign in to comment.