Not working atm

This commit is contained in:
Kylart 2017-08-30 11:04:04 +02:00
parent 169f8c1547
commit 0aec49de71
5 changed files with 92 additions and 21 deletions

View File

@ -3,7 +3,16 @@
["env", { "modules": false }],
"stage-2"
],
"plugins": ["transform-runtime"],
"plugins": [
"add-filehash",
["transform-imports", {
"vuetify": {
"transform": "vuetify/src/components/${member}",
"preventFullImport": true
}
}],
"transform-runtime"
],
"comments": false,
"env": {
"test": {
@ -11,4 +20,4 @@
"plugins": ["istanbul", "syntax-dynamic-import"]
}
}
}
}

View File

@ -1,6 +1,5 @@
import Vue from 'vue'
import App from './App.vue'
import Vuetify from 'vuetify'
import VueClipboards from 'vue-clipboards'
import VueLazyload from 'vue-lazyload'
@ -10,7 +9,44 @@ import { createStore } from 'store/index'
import { createRouter } from 'router/index'
import { sync } from 'vuex-router-sync'
Vue.use(Vuetify)
import {
Vuetify,
VApp,
VSelect,
VMenu,
VList,
VNavigationDrawer,
VToolbar,
VSystemBar,
VSubheader,
VFooter,
VBtn,
VIcon,
VSnackbar,
VCard,
VDialog,
VTextField
} from 'vuetify'
Vue.use(Vuetify, {
components: {
VApp,
VSelect,
VMenu,
VList,
VNavigationDrawer,
VToolbar,
VSystemBar,
VSubheader,
VFooter,
VBtn,
VIcon,
VSnackbar,
VCard,
VDialog,
VTextField
}
})
Vue.use(VueClipboards)
Vue.use(VueLazyload, {
preLoad: 1.3,

View File

@ -10,11 +10,11 @@ $theme := {
warning: #0D47A1
error: #B71C1C
success: #2E7D32
mablue: #0D47A1,
mablue: #0D47A1
dark: #424242
}
@import '../../node_modules/vuetify/src/stylus/main'
@import '../../node_modules/vuetify/src/stylus/app'
/**
Transitions

View File

@ -37,6 +37,7 @@
"animate.css": "^3.5.2",
"axios": "^0.16.2",
"babel-core": "^6.25.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-runtime": "^6.25.0",
"chalk": "^2.0.1",
"colors": "^1.1.2",
@ -57,7 +58,7 @@
"vue-loader": "^13.0.4",
"vue-router": "^2.7.0",
"vue-server-renderer": "^2.4.2",
"vuetify": "^0.15.0-beta.2",
"vuetify": "^0.15.0-beta.4",
"vuex": "^2.3.1",
"vuex-router-sync": "^4.1.2"
},
@ -66,8 +67,10 @@
"ava": "^0.19.1",
"babel-eslint": "^7.2.3",
"babel-loader": "^7.0.0",
"babel-plugin-add-filehash": "^6.9.4",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-imports": "^1.4.1",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.3.2",
@ -92,6 +95,7 @@
"html-webpack-plugin": "^2.29.0",
"nightwatch": "^0.9.15",
"nyc": "^10.3.2",
"optimize-css-assets-webpack-plugin": "^3.1.1",
"pre-commit": "^1.2.2",
"pug": "^2.0.0-rc.3",
"rimraf": "^2.6.1",

View File

@ -5,32 +5,33 @@ const vueConfig = require('./vue-loader.config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const ProgressBarPlugin = require('progress-bar-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const isDev = process.env.NODE_ENV === 'development'
const resolve = (file) => path.resolve(__dirname, file)
const resolve = (file) => path.resolve(__dirname, '..', file)
module.exports = {
devtool: !isDev
? false
: '#cheap-module-source-map',
output: {
path: resolve('../public'),
path: resolve('public'),
publicPath: '/public/',
filename: '[name].[chunkhash].js'
},
resolve: {
extensions: ['*', '.js', '.json', '.vue'],
alias: {
'assets': resolve('../assets'),
'components': resolve('../components'),
'examples': resolve('../pages/examples'),
'layouts': resolve('../layouts'),
'mixins': resolve('../mixins'),
'pages': resolve('../pages'),
'public': resolve('../public'),
'router': resolve('../router'),
'static': resolve('../static'),
'store': resolve('../store'),
'assets': resolve('assets'),
'components': resolve('components'),
'examples': resolve('pages/examples'),
'layouts': resolve('layouts'),
'mixins': resolve('mixins'),
'pages': resolve('pages'),
'public': resolve('public'),
'router': resolve('router'),
'static': resolve('static'),
'store': resolve('store'),
'vue$': 'vue/dist/vue.common.js'
}
},
@ -40,12 +41,27 @@ module.exports = {
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueConfig
options: vueConfig,
include: [
resolve('assets/App.vue'),
resolve('pages'),
resolve('components'),
resolve('node_modules/vuetify')
]
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
exclude: /node_modules/,
include: [
resolve('components/_index.js'),
resolve('mixins'),
resolve('store'),
resolve('router'),
resolve('server'),
resolve('assets'),
resolve('node_modules/vuetify')
]
},
{
test: /\.styl$/,
@ -81,6 +97,12 @@ module.exports = {
new ExtractTextPlugin({
filename: 'common.[chunkhash].css'
}),
new OptimizeCSSPlugin({
cssProcessorOptions: {
safe: true,
discardComments: { removeAll: true }
}
}),
new ProgressBarPlugin({
format: chalk.cyan('> build') + ' [:bar] ' + chalk.green.bold(':percent') + ' (:elapsed seconds)',
clear: true