Skip to content

Commit

Permalink
Add minimization
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronCCWong committed Jul 20, 2019
1 parent 8b6da0e commit 315c00e
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 31 deletions.
2 changes: 1 addition & 1 deletion example/build/main.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/react-card-flip.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-card-flip.js.map

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions lib/react-card-flip.min.js

This file was deleted.

1 change: 0 additions & 1 deletion lib/react-card-flip.min.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "ReactCardFlip",
"main": "./lib/react-card-flip.js",
"scripts": {
"build": "webpack --env dev --config webpack.dist.js && webpack --env build --config webpack.dist.js",
"build-example": "webpack --env dev && webpack --env build",
"build-e2e": "webpack --env dev --config webpack.e2e.js && webpack --env build --config webpack.e2e.js",
"build": "webpack --env production --config webpack.dist.js",
"build-example": "webpack --env production",
"build-e2e": "webpack --env production --config webpack.e2e.js",
"start": "webpack-dev-server --progress --colors --open",
"test": "npm run build-e2e && jest",
"test:coverage": "jest --coverage",
Expand Down
Binary file added react-card-flip-0.8.0.tgz
Binary file not shown.
8 changes: 1 addition & 7 deletions webpack.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@

const webpack = require('webpack');
const path = require('path');
const env = require('yargs').argv.env; // use --env with webpack 2
const pkg = require('./package.json');

let libraryName = pkg.name;

let plugins = [], outputFile;

if (env === 'build') {
outputFile = libraryName + '.min.js';
} else {
outputFile = libraryName + '.js';
}
outputFile = libraryName + '.js';

const config = {
mode: 'production',
Expand Down

0 comments on commit 315c00e

Please sign in to comment.