Procházet zdrojové kódy

reduce bundle size

pull/342/head
Guillaume Vincent před 8 roky
rodič
revize
5635b36ac8
8 změnil soubory, kde provedl 94 přidání a 25733 odebrání
  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
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 5
- 8
dist/lesspass.min.css
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 10
- 10
dist/lesspass.min.js
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 6
- 1
index.html Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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()
})
]);
}


Načítá se…
Zrušit
Uložit