Ver a proveniência

reduce bundle size

pull/342/head
Guillaume Vincent há 8 anos
ascendente
cometimento
5635b36ac8
8 ficheiros alterados com 94 adições e 25733 eliminações
  1. +0
    -25692
      dist/lesspass.js
  2. +5
    -8
      dist/lesspass.min.css
  3. +10
    -10
      dist/lesspass.min.js
  4. +6
    -1
      index.html
  5. +9
    -5
      package.json
  6. +52
    -0
      src/LessPass.scss
  7. +1
    -3
      src/main.js
  8. +11
    -14
      webpack.config.js

+ 0
- 25692
dist/lesspass.js
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


+ 5
- 8
dist/lesspass.min.css
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


+ 10
- 10
dist/lesspass.min.js
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


+ 6
- 1
index.html Ver ficheiro

@@ -14,11 +14,16 @@
margin-left: auto;
margin-right: auto;
}

@media (min-width: 544px) {
#lesspass {
margin-top: 1em;
}
}
</style>
</head>
<body>
<div class="center">
<div class="py-1 hidden-sm-down"></div>
<div id="lesspass" class="m-x-auto"></div>
</div>
<script src="dist/lesspass.min.js"></script>


+ 9
- 5
package.json Ver ficheiro

@@ -26,6 +26,7 @@
"babel-loader": "^6.2.7",
"bootstrap": "4.0.0-alpha.5",
"clipboard": "^1.5.15",
"css-loader": "^0.26.1",
"font-awesome": "^4.7.0",
"hint.css": "^2.4.1",
"jwt-decode": "^2.1.0",
@@ -33,9 +34,10 @@
"lodash.debounce": "^4.0.8",
"nock": "^9.0.2",
"primer-css": "^4.3.0",
"vue": "^2.0.7",
"vue": "^2.1.4",
"vue-loader": "^10.0.1",
"vue-router": "^2.0.2",
"vue-router": "^2.1.1",
"vue-template-compiler": "^2.1.4",
"vuex": "^2.0.0"
},
"devDependencies": {
@@ -53,14 +55,16 @@
"file-loader": "^0.9.0",
"json-loader": "^0.5.4",
"nock": "^9.0.0",
"node-sass": "^3.13.0",
"optimize-css-assets-webpack-plugin": "^1.3.0",
"purifycss-webpack-plugin": "^2.0.3",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.1",
"unminified-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.7",
"vue-loader": "^10.0.1",
"vue-template-compiler": "^2.1.3",
"webpack": "2.1.0-beta.25",
"webpack-dev-server": "2.1.0-beta.9"
"webpack": "^2.1.0-beta.27",
"webpack-dev-server": "^2.1.0-beta.12"
},
"ava": {
"require": [


+ 52
- 0
src/LessPass.scss Ver ficheiro

@@ -0,0 +1,52 @@
//$enable-flex: true;

// Core variables and mixins
@import "~bootstrap/scss/custom";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/mixins";

// Reset and dependencies
@import "~bootstrap/scss/normalize";
//@import "~bootstrap/scss/print";

// Core CSS
@import "~bootstrap/scss/reboot";
@import "~bootstrap/scss/type";
//@import "~bootstrap/scss/images";
//@import "~bootstrap/scss/code";
@import "~bootstrap/scss/grid";
//@import "~bootstrap/scss/tables";
@import "~bootstrap/scss/forms";
@import "~bootstrap/scss/buttons";

// Components
//@import "~bootstrap/scss/animation";
//@import "~bootstrap/scss/dropdown";
@import "~bootstrap/scss/button-group";
@import "~bootstrap/scss/input-group";
@import "~bootstrap/scss/custom-forms";
//@import "~bootstrap/scss/nav";
//@import "~bootstrap/scss/navbar";
@import "~bootstrap/scss/card";
//@import "~bootstrap/scss/breadcrumb";
//@import "~bootstrap/scss/pagination";
//@import "~bootstrap/scss/tags";
//@import "~bootstrap/scss/jumbotron";
@import "~bootstrap/scss/alert";
//@import "~bootstrap/scss/progress";
//@import "~bootstrap/scss/media";
@import "~bootstrap/scss/list-group";
//@import "~bootstrap/scss/responsive-embed";
//@import "~bootstrap/scss/close";

// Components w/ JavaScript
//@import "~bootstrap/scss/modal";
//@import "~bootstrap/scss/tooltip";
//@import "~bootstrap/scss/popover";
//@import "~bootstrap/scss/carousel";

// Utility classes
@import "~bootstrap/scss/utilities";

@import '~font-awesome/css/font-awesome.css';
@import '~hint.css/hint.css';

+ 1
- 3
src/main.js Ver ficheiro

@@ -1,7 +1,5 @@
import Vue from 'vue';
import 'bootstrap/dist/css/bootstrap.css';
import 'font-awesome/css/font-awesome.css';
import 'hint.css/hint.css';
import './LessPass.scss';
import LessPass from './LessPass.vue';
import store from './store';
import router from './router';


+ 11
- 14
webpack.config.js Ver ficheiro

@@ -1,7 +1,7 @@
var webpack = require('webpack');
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var UnminifiedWebpackPlugin = require('unminified-webpack-plugin');
var purify = require("purifycss-webpack-plugin");
var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');

module.exports = {
@@ -22,14 +22,7 @@ module.exports = {
{test: /\.js$/, include: [path.resolve(__dirname, './src')], loader: 'babel-loader'},
{test: /\.json/, loader: 'json-loader'},
{test: /\.(png|jpg|jpeg|gif)$/, loader: 'file-loader?name=[name].[ext]'},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loader: 'css-loader',
publicPath: ''
})
},
{test: /\.scss$/, loader: ExtractTextPlugin.extract({fallbackLoader: 'style-loader', loader: 'css-loader!sass-loader', publicPath: ''})},
{test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff'},
{test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/font-woff'},
{test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=8192&mimetype=application/octet-stream'},
@@ -38,7 +31,14 @@ module.exports = {
]
},
plugins: [
new ExtractTextPlugin('lesspass.min.css')
new ExtractTextPlugin('lesspass.min.css'),
new purify({
basePath: __dirname,
paths: [
"src/**/*.html",
"src/**/*.vue"
]
})
],
devtool: '#eval-source-map'
};
@@ -47,14 +47,11 @@ if (process.env.NODE_ENV === 'production') {
module.exports.devtool = false;
module.exports.plugins = (module.exports.plugins || []).concat([
new OptimizeCssAssetsPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new UnminifiedWebpackPlugin()
})
]);
}


Carregando…
Cancelar
Guardar