Skip to content

Commit a5b662c

Browse files
committed
添加webpack打包输出
1 parent 94e3ee0 commit a5b662c

11 files changed

Lines changed: 42 additions & 22 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
"index.html",
4242
"gulp"
4343
],
44-
"version": "2.1.8"
44+
"version": "2.2.0"
4545
}

build/iSlider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
* version
168168
* @type {string}
169169
*/
170-
iSlider.VERSION = '2.1.8';
170+
iSlider.VERSION = '2.2.0';
171171

172172
/**
173173
* Event white list

build/iSlider.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.bundle.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
/******/ (function(modules) { // webpackBootstrap
1+
(function webpackUniversalModuleDefinition(root, factory) {
2+
if(typeof exports === 'object' && typeof module === 'object')
3+
module.exports = factory();
4+
else if(typeof define === 'function' && define.amd)
5+
define([], factory);
6+
else if(typeof exports === 'object')
7+
exports["iSlider"] = factory();
8+
else
9+
root["iSlider"] = factory();
10+
})(this, function() {
11+
return /******/ (function(modules) { // webpackBootstrap
212
/******/ // The module cache
313
/******/ var installedModules = {};
414

@@ -45,13 +55,16 @@
4555
/***/ function(module, exports, __webpack_require__) {
4656

4757
__webpack_require__(1);
48-
__webpack_require__(5);
58+
// require("exports?iSlider!./export-iSlider");
59+
var iSlider = __webpack_require__(5);
4960
__webpack_require__(8);
5061
__webpack_require__(9);
5162
__webpack_require__(10);
5263
__webpack_require__(11);
5364
__webpack_require__(12);
5465

66+
module.exports = iSlider;
67+
5568
/***/ },
5669
/* 1 */
5770
/***/ function(module, exports, __webpack_require__) {
@@ -573,7 +586,7 @@
573586
* version
574587
* @type {string}
575588
*/
576-
iSlider.VERSION = '2.1.8';
589+
iSlider.VERSION = '2.2.0';
577590

578591
/**
579592
* Event white list
@@ -3424,4 +3437,6 @@
34243437
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)(module)))
34253438

34263439
/***/ }
3427-
/******/ ]);
3440+
/******/ ])
3441+
});
3442+
;

build/index.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

demo/public/js/iSlider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
* version
168168
* @type {string}
169169
*/
170-
iSlider.VERSION = '2.1.8';
170+
iSlider.VERSION = '2.2.0';
171171

172172
/**
173173
* Event white list

demo/public/js/iSlider.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulp/tasks/webpack.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,23 @@ module.exports = function (gulp, PLUGIN, CONF) {
55
var path = require('path');
66
var ExtractTextPlugin = require('extract-text-webpack-plugin');
77
var options = {
8-
entry: {index: path.resolve(__dirname, '../../build/index.js')},
8+
entry: {index: path.resolve(__dirname, '../../src/index.js')},
99

1010
output: {
1111
path: path.resolve(__dirname, '../../build/'),
12-
filename: 'index.bundle.js'
12+
filename: 'index.bundle.js',
13+
library: 'iSlider',
14+
libraryTarget: 'umd'
1315
},
1416

1517
module: {
1618
loaders: [
17-
{test: /\.css$/, loader: 'style-loader!css-loader'}
19+
{test: /\.css$/, loader: 'style-loader!css-loader'}
1820
]
1921
}
2022
};
2123

22-
gulp.task('webpack', function () {
24+
gulp.task('webpack', ['build'], function () {
2325
return webpack(options).run(function(err, state) {
2426
console.log(err);
2527
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "islider.js",
3-
"version": "2.1.8",
3+
"version": "2.2.0",
44
"author": "EUX team",
55
"main": "build/index.bundle.js",
66
"description": "Smooth and high-performance slide web framework. Suitable for PC, Mobile WebApp, HTML5 App, Hybrid App",

src/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require('../build/iSlider.css');
2+
// require("exports?iSlider!./export-iSlider");
3+
var iSlider = require("../build/iSlider.js");
4+
require('../build/iSlider.animate');
5+
require('../build/iSlider.plugin.dot');
6+
require('../build/iSlider.plugin.button');
7+
require('../build/iSlider.plugin.BIZone');
8+
require('../build/iSlider.plugin.zoompic');
9+
10+
module.exports = iSlider;

0 commit comments

Comments
 (0)