Skip to content

Commit

Permalink
添加webpack打包输出
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyu33333 committed Aug 29, 2016
1 parent 94e3ee0 commit a5b662c
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 22 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@
"index.html",
"gulp"
],
"version": "2.1.8"
"version": "2.2.0"
}
2 changes: 1 addition & 1 deletion build/iSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
* version
* @type {string}
*/
iSlider.VERSION = '2.1.8';
iSlider.VERSION = '2.2.0';

/**
* Event white list
Expand Down
2 changes: 1 addition & 1 deletion build/iSlider.min.js

Large diffs are not rendered by default.

23 changes: 19 additions & 4 deletions build/index.bundle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
/******/ (function(modules) { // webpackBootstrap
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["iSlider"] = factory();
else
root["iSlider"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

Expand Down Expand Up @@ -45,13 +55,16 @@
/***/ function(module, exports, __webpack_require__) {

__webpack_require__(1);
__webpack_require__(5);
// require("exports?iSlider!./export-iSlider");
var iSlider = __webpack_require__(5);
__webpack_require__(8);
__webpack_require__(9);
__webpack_require__(10);
__webpack_require__(11);
__webpack_require__(12);

module.exports = iSlider;

/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
Expand Down Expand Up @@ -573,7 +586,7 @@
* version
* @type {string}
*/
iSlider.VERSION = '2.1.8';
iSlider.VERSION = '2.2.0';

/**
* Event white list
Expand Down Expand Up @@ -3424,4 +3437,6 @@
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)(module)))

/***/ }
/******/ ]);
/******/ ])
});
;
7 changes: 0 additions & 7 deletions build/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion demo/public/js/iSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
* version
* @type {string}
*/
iSlider.VERSION = '2.1.8';
iSlider.VERSION = '2.2.0';

/**
* Event white list
Expand Down
2 changes: 1 addition & 1 deletion demo/public/js/iSlider.min.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions gulp/tasks/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ module.exports = function (gulp, PLUGIN, CONF) {
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var options = {
entry: {index: path.resolve(__dirname, '../../build/index.js')},
entry: {index: path.resolve(__dirname, '../../src/index.js')},

output: {
path: path.resolve(__dirname, '../../build/'),
filename: 'index.bundle.js'
filename: 'index.bundle.js',
library: 'iSlider',
libraryTarget: 'umd'
},

module: {
loaders: [
{test: /\.css$/, loader: 'style-loader!css-loader'}
{test: /\.css$/, loader: 'style-loader!css-loader'}
]
}
};

gulp.task('webpack', function () {
gulp.task('webpack', ['build'], function () {
return webpack(options).run(function(err, state) {
console.log(err);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "islider.js",
"version": "2.1.8",
"version": "2.2.0",
"author": "EUX team",
"main": "build/index.bundle.js",
"description": "Smooth and high-performance slide web framework. Suitable for PC, Mobile WebApp, HTML5 App, Hybrid App",
Expand Down
10 changes: 10 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require('../build/iSlider.css');
// require("exports?iSlider!./export-iSlider");
var iSlider = require("../build/iSlider.js");
require('../build/iSlider.animate');
require('../build/iSlider.plugin.dot');
require('../build/iSlider.plugin.button');
require('../build/iSlider.plugin.BIZone');
require('../build/iSlider.plugin.zoompic');

module.exports = iSlider;
2 changes: 1 addition & 1 deletion src/js/iSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
* version
* @type {string}
*/
iSlider.VERSION = '2.1.8';
iSlider.VERSION = '2.2.0';

/**
* Event white list
Expand Down

0 comments on commit a5b662c

Please sign in to comment.