Skip to content

Commit a7411ff

Browse files
committed
πŸ—‘ - Remove stylus
1 parent 95795c0 commit a7411ff

File tree

11 files changed

+41
-242
lines changed

11 files changed

+41
-242
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ See deployed app of this template [here](https://nuxt-typescript-starter.netlify
2727
- πŸ“¦ **Vuex** store management with intense typing usage example
2828
- 🌐 **Axios** ready (With a sample to NewsAPI request)
2929
- βš™ **DotEnv** ready ofcourse!
30-
- 🎨 Expressive, Dynamic, Robust CSS with **Stylus** support
3130
- 🎭 **Jest** integration ready Unit Test with 100% coverage as starting point (Vuetify and Vuex Integration included!)
3231
- ✨ **Progressive Web App** by default (Installable / Add to homescreen)
3332

β€Žcomponents/Logo.vueβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</div>
88
</template>
99

10-
<style lang="stylus" scoped>
10+
<style scoped>
1111
.VueToNuxtLogo {
1212
display: inline-block;
1313
animation: turn 2s linear forwards 1s;

β€Žcomponents/VuetifyLogo.vueβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img class="VuetifyLogo" alt="Vuetify Logo" src="/vuetify-logo.svg" />
33
</template>
44

5-
<style lang="stylus" scoped>
5+
<style scoped>
66
.VuetifyLogo {
77
height: 180px;
88
width: 180px;

β€Žlayouts/error.vueβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default class ErrorLayout extends Vue {
3535
}
3636
</script>
3737

38-
<style lang="stylus" scoped>
38+
<style scoped>
3939
h1 {
4040
font-size: 20px;
4141
}

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build": "nuxt build",
1010
"generate": "nuxt generate",
1111
"start": "nuxt start",
12-
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
12+
"lint": "eslint --ext .ts,.vue --ignore-path .gitignore .",
1313
"test": "jest"
1414
},
1515
"dependencies": {
@@ -18,12 +18,9 @@
1818
"@nuxtjs/pwa": "^3.0.0-0",
1919
"nuxt": "2.15.8",
2020
"nuxt-property-decorator": "^2.7.2",
21-
"stylus": "^0.54.8",
22-
"stylus-loader": "^3.0.2",
2321
"vuex": "^3.5.1"
2422
},
2523
"devDependencies": {
26-
"@fullhuman/postcss-purgecss": "^4.0.3",
2724
"@nuxt/typescript-build": "^2.1.0",
2825
"@nuxtjs/eslint-config-typescript": "^1.0.0",
2926
"@nuxtjs/eslint-module": "^1.0.0",

β€Žpages/inspire.vueβ€Ž

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<template>
22
<v-layout>
33
<v-flex class="text-center">
4-
<img src="/v.png" alt="Vuetify.js" class="mb-5" />
54
<blockquote class="blockquote">
65
&#8220;First, solve the problem. Then, write the code.&#8221;
76
<footer>
@@ -15,9 +14,13 @@
1514
</template>
1615

1716
<script lang="ts">
18-
import { Vue } from 'nuxt-property-decorator';
17+
import { Vue, Component } from 'nuxt-property-decorator';
1918
19+
@Component
2020
export default class Inspire extends Vue {
2121
readonly name: string = 'inspire';
22+
layout() {
23+
return 'default';
24+
}
2225
}
2326
</script>

β€Žpages/news.vueβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default class News extends Vue {
5656
}
5757
</script>
5858

59-
<style lang="stylus" scoped>
59+
<style scoped>
6060
.image-preview {
6161
width: 100%;
6262
}

β€Žstore/index.tsβ€Ž

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
// state defined as function
1212
export const state = () => ({
1313
pageTitle: ''
14-
})
14+
});
1515

1616
// mutations defined as object
1717
export const mutations = {
1818
setPageTitle(state: any, param: string) {
19-
state.pageTitle = param
19+
state.pageTitle = param;
2020
}
21-
}
21+
};
2222

2323
// this is root of store, mutations defined must unique
2424
export const actions = {
2525
setPageTitle(store: any, param: string) {
26-
store.commit('setPageTitle', param)
26+
store.commit('setPageTitle', param);
2727
}
28-
}
28+
};

β€Žstore/news.tsβ€Ž

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// β€œThe first step is to establish that something is possible; then probability will occur”
22
// - Elon Musk
33

4-
import axios from 'axios'
5-
import { Article, NewsapiResponse, NewsState } from '~/@types'
4+
import axios from 'axios';
5+
import { Article, NewsapiResponse, NewsState } from '~/@types';
66

77
// =================================================
88
// State
@@ -25,16 +25,16 @@ export const state = (): NewsState => ({
2525
'https://www.teslarati.com/wp-content/uploads/2020/07/ANASIS-II-Falcon-9-B1058-LC-40-072020-SpaceX-JRTI-landing-2-c-1024x465.jpg'
2626
}
2727
]
28-
})
28+
});
2929

3030
// =================================================
3131
// Mutations
3232
// =================================================
3333
export const mutations = {
3434
setArticles(state: NewsState, param: Article[]): void {
35-
state.articles = param
35+
state.articles = param;
3636
}
37-
}
37+
};
3838

3939
// =================================================
4040
// Actions
@@ -46,11 +46,11 @@ export const actions = {
4646
url: `https://newsapi.org/v2/top-headlines?country=us&category=technology&apiKey=${process.env.NEWS_API_KEY}`
4747
})
4848
.then(async (response: NewsapiResponse) => {
49-
await store.commit('setArticles', response.data.articles)
50-
return true
49+
await store.commit('setArticles', response.data.articles);
50+
return true;
5151
})
5252
.catch((error) => {
53-
return error.response
54-
})
53+
return error.response;
54+
});
5555
}
56-
}
56+
};

β€Žtsconfig.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"~/*": ["./*"],
2222
"@/*": ["./*"]
2323
},
24-
"types": ["@types/node", "@types/jest"]
24+
"types": ["@types/node", "@types/jest", "@nuxtjs/vuetify"]
2525
},
2626
"exclude": ["node_modules", ".nuxt", "dist"]
2727
}

0 commit comments

Comments
Β (0)