Clean things up before things get serious
This commit is contained in:
parent
db6d722baf
commit
3508d3d8e8
24
.eslintrc.js
24
.eslintrc.js
|
@ -1,14 +1,14 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
env: {
|
env: {
|
||||||
node: true
|
node: true
|
||||||
},
|
},
|
||||||
extends: ["plugin:vue/essential", "@vue/prettier", "@vue/typescript"],
|
extends: ["plugin:vue/essential", "@vue/prettier", "@vue/typescript"],
|
||||||
rules: {
|
rules: {
|
||||||
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
|
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
|
||||||
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
|
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
|
||||||
},
|
},
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
parser: "@typescript-eslint/parser"
|
parser: "@typescript-eslint/parser"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
34
README.md
34
README.md
|
@ -1,29 +1,21 @@
|
||||||
# diretto
|
# diretto
|
||||||
|
|
||||||
## Project setup
|
## Getting started
|
||||||
```
|
|
||||||
yarn install
|
### Get dependencies
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
### Compile and run dev server
|
||||||
```
|
|
||||||
yarn run serve
|
```sh
|
||||||
|
yarn serve
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and minifies for production
|
### Compile and build for production
|
||||||
```
|
|
||||||
yarn run build
|
|
||||||
```
|
|
||||||
|
|
||||||
### Run your tests
|
```sh
|
||||||
|
yarn build
|
||||||
```
|
```
|
||||||
yarn run test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Lints and fixes files
|
|
||||||
```
|
|
||||||
yarn run lint
|
|
||||||
```
|
|
||||||
|
|
||||||
### Customize configuration
|
|
||||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
presets: ["@vue/app"]
|
presets: ["@vue/app"]
|
||||||
};
|
};
|
||||||
|
|
71
package.json
71
package.json
|
@ -1,37 +1,38 @@
|
||||||
{
|
{
|
||||||
"name": "diretto",
|
"name": "diretto",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^2.6.5",
|
"core-js": "^2.6.5",
|
||||||
"register-service-worker": "^1.6.2",
|
"postcss-custom-properties": "^9.0.2",
|
||||||
"tailwindcss": "^1.0.4",
|
"postcss-nested": "^4.1.2",
|
||||||
"vue": "^2.6.10",
|
"postcss-smart-import": "^0.7.6",
|
||||||
"vue-class-component": "^7.0.2",
|
"register-service-worker": "^1.6.2",
|
||||||
"vue-property-decorator": "^8.1.0",
|
"tailwindcss": "^1.0.4",
|
||||||
"vue-router": "^3.0.3",
|
"vue": "^2.6.10",
|
||||||
"vuex": "^3.0.1"
|
"vue-class-component": "^7.0.2",
|
||||||
},
|
"vue-property-decorator": "^8.1.0",
|
||||||
"devDependencies": {
|
"vue-router": "^3.0.3",
|
||||||
"@vue/cli-plugin-babel": "^3.8.0",
|
"vuex": "^3.0.1"
|
||||||
"@vue/cli-plugin-eslint": "^3.8.0",
|
},
|
||||||
"@vue/cli-plugin-pwa": "^3.8.0",
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-typescript": "^3.8.0",
|
"@vue/cli-plugin-babel": "^3.8.0",
|
||||||
"@vue/cli-service": "^3.8.0",
|
"@vue/cli-plugin-eslint": "^3.8.0",
|
||||||
"@vue/eslint-config-prettier": "^4.0.1",
|
"@vue/cli-plugin-pwa": "^3.8.0",
|
||||||
"@vue/eslint-config-typescript": "^4.0.0",
|
"@vue/cli-plugin-typescript": "^3.8.0",
|
||||||
"babel-eslint": "^10.0.1",
|
"@vue/cli-service": "^3.8.0",
|
||||||
"eslint": "^5.16.0",
|
"@vue/eslint-config-prettier": "^4.0.1",
|
||||||
"eslint-plugin-vue": "^5.0.0",
|
"@vue/eslint-config-typescript": "^4.0.0",
|
||||||
"node-sass": "^4.9.0",
|
"babel-eslint": "^10.0.1",
|
||||||
"sass-loader": "^7.1.0",
|
"eslint": "^5.16.0",
|
||||||
"typescript": "^3.4.3",
|
"eslint-plugin-vue": "^5.0.0",
|
||||||
"vue-cli-plugin-tailwindcss": "^0.1.1",
|
"typescript": "^3.4.3",
|
||||||
"vue-template-compiler": "^2.6.10"
|
"vue-cli-plugin-tailwindcss": "^0.1.1",
|
||||||
}
|
"vue-template-compiler": "^2.6.10"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
tailwindcss: "./tailwind.config.js"
|
tailwindcss: "./tailwind.config.js",
|
||||||
}
|
"postcss-smart-import": {},
|
||||||
|
"postcss-custom-properties": {},
|
||||||
|
"postcss-nested": {}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
// prettier.config.js or .prettierrc.js
|
|
||||||
module.exports = {
|
|
||||||
tabWidth: 4,
|
|
||||||
useTabs: true
|
|
||||||
};
|
|
|
@ -1,17 +1,21 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en" class="antialiased">
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
<head>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
<title>diretto</title>
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
</head>
|
<title>diretto</title>
|
||||||
<body>
|
</head>
|
||||||
<noscript>
|
|
||||||
<strong>We're sorry but diretto doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
<body>
|
||||||
</noscript>
|
<noscript>
|
||||||
<div id="app"></div>
|
<strong>We're sorry but diretto doesn't work properly without JavaScript enabled. Please enable it to
|
||||||
<!-- built files will be auto injected -->
|
continue.</strong>
|
||||||
</body>
|
</noscript>
|
||||||
</html>
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
33
src/App.vue
33
src/App.vue
|
@ -1,29 +1,30 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<nav id="topnav">
|
<nav id="topnav">
|
||||||
<h1>
|
<h1>
|
||||||
DIRETTO
|
DIRETTO
|
||||||
</h1>
|
</h1>
|
||||||
</nav>
|
</nav>
|
||||||
<router-view />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="postcss">
|
||||||
@import "assets/styles/theme";
|
@import "assets/styles/theme";
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topnav {
|
#topnav {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
background: $ink;
|
background: $ink;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 18pt;
|
font-size: 18pt;
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
|
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
11
src/assets/styles/theme.css
Normal file
11
src/assets/styles/theme.css
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
:root {
|
||||||
|
--black: #000;
|
||||||
|
--ink: #062f4f;
|
||||||
|
--posy: #813772;
|
||||||
|
--embers: #b82601;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--black);
|
||||||
|
color: white;
|
||||||
|
}
|
|
@ -1,9 +0,0 @@
|
||||||
$black: #000;
|
|
||||||
$ink: #062f4f;
|
|
||||||
$posy: #813772;
|
|
||||||
$embers: #b82601;
|
|
||||||
|
|
||||||
body {
|
|
||||||
background: $black;
|
|
||||||
color: white;
|
|
||||||
}
|
|
|
@ -4,12 +4,11 @@ import router from "./router";
|
||||||
import store from "./store";
|
import store from "./store";
|
||||||
import "./registerServiceWorker";
|
import "./registerServiceWorker";
|
||||||
import "@/assets/styles/main.css";
|
import "@/assets/styles/main.css";
|
||||||
import "@/assets/styles/theme.scss";
|
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
}).$mount("#app");
|
}).$mount("#app");
|
||||||
|
|
|
@ -3,32 +3,32 @@
|
||||||
import { register } from "register-service-worker";
|
import { register } from "register-service-worker";
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "production") {
|
if (process.env.NODE_ENV === "production") {
|
||||||
register(`${process.env.BASE_URL}service-worker.js`, {
|
register(`${process.env.BASE_URL}service-worker.js`, {
|
||||||
ready() {
|
ready() {
|
||||||
console.log(
|
console.log(
|
||||||
"App is being served from cache by a service worker.\n" +
|
"App is being served from cache by a service worker.\n" +
|
||||||
"For more details, visit https://goo.gl/AFskqB"
|
"For more details, visit https://goo.gl/AFskqB"
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
registered() {
|
registered() {
|
||||||
console.log("Service worker has been registered.");
|
console.log("Service worker has been registered.");
|
||||||
},
|
},
|
||||||
cached() {
|
cached() {
|
||||||
console.log("Content has been cached for offline use.");
|
console.log("Content has been cached for offline use.");
|
||||||
},
|
},
|
||||||
updatefound() {
|
updatefound() {
|
||||||
console.log("New content is downloading.");
|
console.log("New content is downloading.");
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {
|
||||||
console.log("New content is available; please refresh.");
|
console.log("New content is available; please refresh.");
|
||||||
},
|
},
|
||||||
offline() {
|
offline() {
|
||||||
console.log(
|
console.log(
|
||||||
"No internet connection found. App is running in offline mode."
|
"No internet connection found. App is running in offline mode."
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
error(error) {
|
error(error) {
|
||||||
console.error("Error during service worker registration:", error);
|
console.error("Error during service worker registration:", error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,13 @@ import Home from "./views/Home.vue";
|
||||||
Vue.use(Router);
|
Vue.use(Router);
|
||||||
|
|
||||||
export default new Router({
|
export default new Router({
|
||||||
mode: "history",
|
mode: "history",
|
||||||
base: process.env.BASE_URL,
|
base: process.env.BASE_URL,
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
name: "home",
|
name: "home",
|
||||||
component: Home
|
component: Home
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
18
src/shims-tsx.d.ts
vendored
18
src/shims-tsx.d.ts
vendored
|
@ -1,13 +1,13 @@
|
||||||
import Vue, { VNode } from "vue";
|
import Vue, { VNode } from "vue";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
namespace JSX {
|
namespace JSX {
|
||||||
// tslint:disable no-empty-interface
|
// tslint:disable no-empty-interface
|
||||||
interface Element extends VNode {}
|
interface Element extends VNode {}
|
||||||
// tslint:disable no-empty-interface
|
// tslint:disable no-empty-interface
|
||||||
interface ElementClass extends Vue {}
|
interface ElementClass extends Vue {}
|
||||||
interface IntrinsicElements {
|
interface IntrinsicElements {
|
||||||
[elem: string]: any;
|
[elem: string]: any;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
src/shims-vue.d.ts
vendored
4
src/shims-vue.d.ts
vendored
|
@ -1,4 +1,4 @@
|
||||||
declare module "*.vue" {
|
declare module "*.vue" {
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
export default Vue;
|
export default Vue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Vuex from "vuex";
|
||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
|
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: {},
|
state: {},
|
||||||
mutations: {},
|
mutations: {},
|
||||||
actions: {}
|
actions: {}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="home"></div>
|
<div class="home"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Vue } from "vue-property-decorator";
|
import { Component, Vue } from "vue-property-decorator";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: {}
|
components: {}
|
||||||
})
|
})
|
||||||
export default class Home extends Vue {}
|
export default class Home extends Vue {}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
theme: {
|
prefix: "",
|
||||||
extend: {}
|
important: false,
|
||||||
},
|
separator: ":",
|
||||||
|
theme: {},
|
||||||
variants: {},
|
variants: {},
|
||||||
plugins: []
|
plugins: []
|
||||||
}
|
};
|
||||||
|
|
|
@ -11,20 +11,11 @@
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"types": [
|
"types": ["webpack-env"],
|
||||||
"webpack-env"
|
|
||||||
],
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": [
|
"@/*": ["src/*"]
|
||||||
"src/*"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"lib": [
|
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
|
||||||
"esnext",
|
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"scripthost"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
|
@ -33,7 +24,5 @@
|
||||||
"tests/**/*.ts",
|
"tests/**/*.ts",
|
||||||
"tests/**/*.tsx"
|
"tests/**/*.tsx"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": ["node_modules"]
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user