Skip to content

Commit

Permalink
Run tests with the minified files
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Dec 8, 2016
1 parent 8f18970 commit 607a4e1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

A standalone build of `socket.io-client` is exposed automatically by the
socket.io server as `/socket.io/socket.io.js`. Alternatively you can
serve the file `socket.io.js` or `socket.io.min.js` found in the `dist` folder.
serve the file `socket.io.js` found in the `dist` folder.

```html
<script src="/socket.io/socket.io.js"></script>
Expand All @@ -26,6 +26,8 @@ serve the file `socket.io.js` or `socket.io.min.js` found in the `dist` folder.
</script>
```

A slim build (without `JSON3`, a JSON polyfill for IE6/IE7, and `debug`) is also available: `socket.io.slim.js`.

Socket.IO is compatible with [browserify](http://browserify.org/).

### Node.JS (server-side usage)
Expand Down
7 changes: 0 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const webpack = require('webpack-stream');
const child = require('child_process');
const help = require('gulp-task-listing');
const eslint = require('gulp-eslint');
const minify = require('gulp-minify');

gulp.task('help', help);

Expand All @@ -25,12 +24,6 @@ gulp.task('build', function () {
require('./support/webpack.config.slim.js')
]
}))
.pipe(minify({
ext: {
src: '.js',
min: '.min.js'
}
}))
.pipe(gulp.dest(BUILD_TARGET_DIR));
});

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"gulp-eslint": "1.1.1",
"gulp-file": "0.2.0",
"gulp-istanbul": "0.10.3",
"gulp-minify": "0.0.14",
"gulp-mocha": "2.2.0",
"gulp-task-listing": "1.0.1",
"has-cors": "1.1.0",
Expand Down
12 changes: 11 additions & 1 deletion support/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

var webpack = require('webpack');

module.exports = {
name: 'default',
entry: './lib/index.js',
Expand All @@ -10,7 +12,15 @@ module.exports = {
externals: {
global: glob()
},
devtool: 'cheap-module-source-map',
devtool: 'source-map',
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
support_ie8: true
})
],
module: {
loaders: [{
test: /\.js$/,
Expand Down
10 changes: 8 additions & 2 deletions support/webpack.config.slim.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ module.exports = {
global: glob(),
json3: 'JSON'
},
devtool: 'cheap-module-source-map',
devtool: 'source-map',
plugins: [
new webpack.NormalModuleReplacementPlugin(/debug/, process.cwd() + '/support/noop.js')
new webpack.NormalModuleReplacementPlugin(/debug/, process.cwd() + '/support/noop.js'),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
support_ie8: true
})
],
module: {
loaders: [{
Expand Down

0 comments on commit 607a4e1

Please sign in to comment.