Added progress bar on building dev

Added default text if no synopsis on release
This commit is contained in:
Kylart 2017-08-27 00:01:49 +02:00
parent d41f14d8d3
commit 6771bc4716
5 changed files with 21 additions and 19 deletions

View File

@ -1,7 +1,7 @@
{
"name": "KawAnime",
"description": "Desktop app for anime fans",
"version": "1.0.0",
"version": "0.1.0",
"main": "main.js",
"repository": "https://github.com/Kylart/KawAnime.git",
"author": {

View File

@ -54,8 +54,8 @@
v-radio.radio.primary--text(label='720p', v-model='quality', value='720p', dark)
v-flex(xs12, sm6, md4)
v-radio.radio.primary--text(label='1080p', v-model='quality', value='1080p', dark)
.download-button-container
.download-button
v-layout.pt-4(justify-center, align-center)
v-flex(xs3)
v-btn#download-btn(
dark, block, secondary,
@click='isDownloadable()',
@ -260,18 +260,6 @@
margin-left: 35%;
}
.download-button-container
{
align-content: center;
}
.download-button
{
margin-top: 45px;
display: inline-block;
width: 20%;
}
.modal-text
{
white-space: pre-wrap;

View File

@ -45,7 +45,7 @@
)
v-flex(xl6, lg8, md7, xs8)
.elem-text-links
.synopsis {{ item.synopsis }}
.synopsis {{ item.synopsis || 'No synopsis yet.' }}
.links
a.download-button(:href='item.magnetLink')
v-btn.btn--light-flat-pressed(dark, flat, @click='print(item)') Download

View File

@ -3,6 +3,8 @@ const webpack = require('webpack')
const MFS = require('memory-fs')
const clientConfig = require(path.join(__dirname, 'webpack.client.config'))
const serverConfig = require(path.join(__dirname, 'webpack.server.config'))
const ProgressBarPlugin = require('progress-bar-webpack-plugin')
const chalk = require('chalk')
module.exports = function setupDevServer (app, cb) {
let bundle, clientManifest
@ -11,7 +13,7 @@ module.exports = function setupDevServer (app, cb) {
const readyPromise = new Promise(r => { resolve = r }) // eslint-disable-line promise/param-names
const ready = (...args) => {
if (!resolved) resolve()
cb(...args) // eslint-disable-line
cb(...args) // eslint-disable-line standard/no-callback-literal
}
// modify client config to work with hot middleware
@ -19,7 +21,11 @@ module.exports = function setupDevServer (app, cb) {
clientConfig.output.filename = '[name].js'
clientConfig.plugins.push(
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
new webpack.NoEmitOnErrorsPlugin(),
new ProgressBarPlugin({
format: chalk.cyan('> build') + ' [:bar] ' + chalk.green.bold(':percent') + ' (:elapsed seconds)',
clear: true
})
)
// dev middleware

View File

@ -52,12 +52,20 @@ module.exports = {
loader: ['style-loader', 'css-loader', 'stylus-loader']
},
{
test: /\.(woff|woff2|eot|ttf|png|jpe?g|gif|svg)(\?.*)?$/,
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: 'img/[name].[hash:7].[ext]'
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 1000,
name: 'fonts/[name].[hash:7].[ext]'
}
}
]
},