Remove nuxt from project

This commit is contained in:
Ramon Wenger 2018-08-09 14:20:33 +02:00
parent eedb86c7fd
commit f2d9d18894
11 changed files with 113 additions and 45 deletions

18
client/index.html Normal file
View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>skillBox</title>
<link href='https://fonts.googleapis.com/css?family=Material+Icons' rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:500,800" rel="stylesheet">
</head>
<body>
<div id="app">
<div class="center">
</div>
</div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@ -1,43 +0,0 @@
const webpack = require('webpack')
module.exports = {
build: {
plugins: [
new webpack.ProvidePlugin({
'_': 'lodash'
})
]
},
css: [
'~/assets/main.scss'
],
router: {
base: process.env.NODE_ENV === 'production' ? '/static/' : '/'
},
env: {
baseUrl: process.env.BASE_URL || 'http://localhost:3000'
},
head: {
link: [
{rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Montserrat:400,800'}
]
},
mode: 'spa',
modules: ['@nuxtjs/apollo'],
apollo: {
clientConfigs: {
default: {
httpEndpoint: 'http://localhost:8000/api/graphql/',
httpLinkOptions: {
credentials: 'same-origin'
},
}
}
},
plugins: [
'~plugins/vue-axios',
'~plugins/vue-vimeo-player'
],
srcDir: 'src/'
}

View File

@ -5,7 +5,9 @@
"author": "maersu <me@maersu.ch>",
"private": true,
"scripts": {
"dev": "nuxt",
"serve": "vue serve",
"nux": "nuxt",
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"build": "nuxt build",
"start": "nuxt start",
"heroku-postbuild": "npm run build"

21
client/src/App.vue Normal file
View File

@ -0,0 +1,21 @@
<template>
<div>
<h1>Hello</h1>
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'App',
data() {
return {}
},
mounted() {
}
}
</script>
<style lang="scss">
@import "styles/main";
</style>

View File

@ -0,0 +1,2 @@
$red: blue;
$blue: orange;

View File

@ -4,9 +4,13 @@
- https://seesparkbox.com/foundry/bem_by_example
*/
@import 'variables';
@import 'typography';
.container {
color: $red;
margin: 0 auto;
width: 100%;
max-width: 1440px;

View File

@ -16,6 +16,7 @@
height: 330px;
width: 300px;
border-radius: 12px;
color: $blue;
&__image {
width: 100%;

29
client/src/main.js Normal file
View File

@ -0,0 +1,29 @@
import 'babel-polyfill'
import Vue from 'vue'
import axios from 'axios'
import VueAxios from 'vue-axios'
import VueVimeoPlayer from 'vue-vimeo-player'
import apolloClient from './graphql/client'
import VueApollo from 'vue-apollo'
import App from './App'
import router from './router'
import store from '@/store/index'
Vue.config.productionTip = false
Vue.use(VueApollo)
Vue.use(VueAxios, axios)
Vue.use(VueVimeoPlayer)
const apolloProvider = new VueApollo({
defaultClient: apolloClient
})
/* eslint-disable no-new */
new Vue({
el: '#app',
store,
router,
provide: apolloProvider.provide(),
render: h => h(App)
})

View File

@ -0,0 +1,22 @@
import Vue from 'vue'
import Router from 'vue-router'
import Dashboard from '@/pages/PageDashboard'
import NotFound from '@/pages/PageNotFound'
const routerOptions = [
{ path: '/', name: 'dashboard', component: Dashboard },
{ path: '/dashboard', name: 'dashboard', component: Dashboard },
{ path: '*', component: NotFound }
]
const routes = routerOptions.map(route => {
return {
...route
}
})
Vue.use(Router)
export default new Router({
routes,
mode: 'history'
})

12
client/vue.config.js Normal file
View File

@ -0,0 +1,12 @@
module.exports = {
css: {
loaderOptions: {
sass: {
data: `
@import "@/assets/_variables.scss";
@import "@/assets/main.scss";
`
}
}
}
};

View File

@ -201,7 +201,7 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, '..', 'client/dist'),
os.path.join(BASE_DIR, '..', 'client/dist/static'),
)
if not TEST: