Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
feat: use Webpack 4
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidRouyer committed Jun 28, 2018
1 parent b0dc58d commit b49b3ce
Show file tree
Hide file tree
Showing 8 changed files with 33,107 additions and 27,876 deletions.
36,244 changes: 19,065 additions & 17,179 deletions dist/oidc-client.js

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions dist/oidc-client.min.js

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ var webpackStream = require('webpack-stream');
var webpack = require('webpack');
var createWebpackConfig = require('./webpack.base');

var Uglify = require('uglifyjs-webpack-plugin');
var uglifyPlugin = new Uglify();

// entry points for both configs
var npmEntry ='./index.js';
var classicEntry = ['babel-polyfill', npmEntry];
Expand All @@ -15,36 +12,39 @@ var classicEntry = ['babel-polyfill', npmEntry];
gulp.task('build-lib-sourcemap', ['jsrsasign'], function() {
// run webpack
return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
mode: 'development',
entry: npmEntry,
output: {
filename:'oidc-client.js',
libraryTarget:'umd'
},
plugins: [],
devtool:'inline-source-map'
})))
}), webpack))
.pipe(gulp.dest('lib/'));
});

// npm compliant build without source-maps & minified
gulp.task('build-lib-min', ['jsrsasign'], function() {
// run webpack
return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
mode: 'production',
entry: npmEntry,
output: {
filename:'oidc-client.min.js',
libraryTarget:'umd',
},
plugins: [uglifyPlugin],
plugins: [],
devtool: false
})))
}), webpack))
.pipe(gulp.dest('lib/'));
});

// classic build with sourcemaps
gulp.task('build-dist-sourcemap', ['jsrsasign'], function() {
// run webpack
return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
mode: 'development',
entry: classicEntry,
output: {
filename:'oidc-client.js',
Expand All @@ -53,23 +53,24 @@ gulp.task('build-dist-sourcemap', ['jsrsasign'], function() {
},
plugins: [],
devtool:'inline-source-map'
})))
}), webpack))
.pipe(gulp.dest('dist/'));
});

// classic build without sourcemaps & minified
gulp.task('build-dist-min', ['jsrsasign'], function() {
// run webpack
return gulp.src('index.js').pipe(webpackStream(createWebpackConfig({
mode: 'production',
entry: classicEntry,
output: {
filename:'oidc-client.min.js',
libraryTarget:'var',
library:'Oidc'
},
plugins: [uglifyPlugin],
plugins: [],
devtool: false
})))
}), webpack))
.pipe(gulp.dest('dist/'));
});

Expand Down
Loading

0 comments on commit b49b3ce

Please sign in to comment.