Skip to content

Commit 8305be0

Browse files
committed
config tailwindcss and vue router
1 parent 248ad5c commit 8305be0

File tree

19 files changed

+1651
-1248
lines changed

19 files changed

+1651
-1248
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VUE_APP_GLOBAL_ENV=GOBAL ENV
2+
VUE_APP_ROOT_API=http://www.example.com/api

babel.config.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
module.exports = {
2-
presets: [
3-
'@vue/cli-plugin-babel/preset'
4-
]
5-
}

package-lock.json

Lines changed: 1539 additions & 1153 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
"@vue/cli-plugin-babel": "~5.0.0",
2020
"@vue/cli-plugin-eslint": "~5.0.0",
2121
"@vue/cli-service": "~5.0.0",
22+
"autoprefixer": "^10.4.12",
2223
"eslint": "^7.32.0",
23-
"eslint-plugin-vue": "^8.0.3"
24+
"eslint-plugin-vue": "^8.0.3",
25+
"postcss": "^8.4.17",
26+
"tailwindcss": "^3.1.8"
2427
},
2528
"eslintConfig": {
2629
"root": true,

postcss.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
plugins: [require('tailwindcss'), require('autoprefixer')],
3+
};

public/favicon.ico

-4.19 KB
Binary file not shown.

public/index.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<!DOCTYPE html>
22
<html lang="">
33
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8-
<title><%= htmlWebpackPlugin.options.title %></title>
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7+
<title>Example Project</title>
98
</head>
109
<body>
11-
<noscript>
12-
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13-
</noscript>
1410
<div id="app"></div>
15-
<!-- built files will be auto injected -->
1611
</body>
1712
</html>

src/App.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<template>
22
<div id="nav">
3+
<router-link to="/" class="text-3xl">Login</router-link> |
34
<router-link to="/">Home</router-link> |
4-
<router-link to="/about">About</router-link>
5+
<router-link to="/about">About</router-link> |
6+
<router-link to="/news">News (requires auth)</router-link>
57
</div>
6-
<router-view />
8+
<router-view></router-view>
79
</template>
810
<script>
911
export default {
10-
name: 'MyName',
11-
created() {
12-
console.log(process.env);
13-
},
12+
name: 'MyApp',
1413
};
1514
</script>

src/assets/logo.png

-6.69 KB
Binary file not shown.

src/components/HelloWorld.vue

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)