Skip to content

Commit

Permalink
Add Vuetify prototype scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
dhl committed Feb 13, 2020
0 parents commit 86c6942
Show file tree
Hide file tree
Showing 21 changed files with 208 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Enuma Project Scaffoldings

This repo contains various scaffoldings for starting different kinds of
project.

The command to download a template has the following syntax:

npx degit enumatech/scaffolding/<project> <destination>

For example, to download the Vuetify prototyping template:

npx degit enumatech/scaffolding/vuetify-prototype new-project
27 changes: 27 additions & 0 deletions vuetify-prototype/bin/copy-assets
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

echo 'Copying assets to static folder...'

mkdir static/js
echo 'Created static/js folder'

cp node_modules/vue/dist/vue.{js,min.js} static/js/
echo 'Copied Vue'

cp node_modules/vue-router/dist/vue-router.{js,min.js} static/js/
echo 'Copied Vue Router'

cp node_modules/http-vue-loader/src/httpVueLoader.js static/js/
echo 'Copied Http Vue Loader'

cp node_modules/vuetify/dist/vuetify.{js,js.map,min.js} static/js/
cp node_modules/vuetify/dist/vuetify.{css,css.map,min.css} static/css/
echo 'Copied Vuetify'

cp node_modules/@mdi/font/css/* static/css/
cp node_modules/@mdi/font/fonts/* static/fonts/
echo 'Copied material design fonts'
3 changes: 3 additions & 0 deletions vuetify-prototype/components/Home.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<h1>Hello, world</h1>
</template>
37 changes: 37 additions & 0 deletions vuetify-prototype/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, minimal-ui" />

<title>Vue Prototype</title>

<link href="static/css/fonts.css" rel="stylesheet">
<link href="static/css/materialdesignicons.min.css" rel="stylesheet">
<link href="static/css/vuetify.min.css" rel="stylesheet">

<script src="static/js/vue.min.js"></script>
<script src="static/js/vue-router.min.js"></script>
<script src="static/js/httpVueLoader.js"></script>
<script src="static/js/vuetify.min.js"></script>
</head>

<body>
<div id="app">
<router-view></router-view>
</div>

<script type="module">
import router from './router/index.js'

new Vue({
el: '#app',
vuetify: new Vuetify(),
router
})
</script>

</body>

</html>
38 changes: 38 additions & 0 deletions vuetify-prototype/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vuetify-prototype/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "vue-prototype",
"version": "0.1.0",
"private": true,
"scripts": {
"postinstall": "bin/copy-assets"
},
"devDependencies": {
"@mdi/font": "4.9.95",
"http-vue-loader": "1.4.1",
"vue": "2.6.11",
"vue-router": "3.1.5",
"vuetify": "2.2.12"
}
}
16 changes: 16 additions & 0 deletions vuetify-prototype/router/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Vue.use(VueRouter)

const routes = [
{
path: '/',
name: 'home',
component: httpVueLoader('components/Home.vue')
},
]

const router = new VueRouter({
mode: 'history',
routes
})

export default router
59 changes: 59 additions & 0 deletions vuetify-prototype/static/css/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* roboto-100 - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 100;
src: local('Roboto Thin'), local('Roboto-Thin'),
url('../fonts/roboto-v20-latin-100.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/roboto-v20-latin-100.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* roboto-300 - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'),
url('../fonts/roboto-v20-latin-300.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/roboto-v20-latin-300.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* roboto-regular - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'),
url('../fonts/roboto-v20-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/roboto-v20-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* roboto-500 - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'),
url('../fonts/roboto-v20-latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/roboto-v20-latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* roboto-700 - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'),
url('../fonts/roboto-v20-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/roboto-v20-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* roboto-900 - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 900;
src: local('Roboto Black'), local('Roboto-Black'),
url('../fonts/roboto-v20-latin-900.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/roboto-v20-latin-900.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 86c6942

Please sign in to comment.