Skip to content

Commit bd9475b

Browse files
committed
Setup for loading markdown files
1 parent 61f6e64 commit bd9475b

File tree

5 files changed

+165
-32
lines changed

5 files changed

+165
-32
lines changed

package-lock.json

+141-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
"dependencies": {
1212
"vue": "^2.6.11",
1313
"vue-class-component": "^7.2.3",
14-
"vue-property-decorator": "^8.4.1"
14+
"vue-property-decorator": "^8.4.1",
15+
"vue-showdown": "^2.4.1"
1516
},
1617
"devDependencies": {
18+
"@types/showdown": "^1.9.3",
1719
"@typescript-eslint/eslint-plugin": "^2.26.0",
1820
"@typescript-eslint/parser": "^2.26.0",
1921
"@vue/cli-plugin-eslint": "~4.3.0",
@@ -22,6 +24,7 @@
2224
"@vue/eslint-config-typescript": "^5.0.2",
2325
"eslint": "^6.7.2",
2426
"eslint-plugin-vue": "^6.2.2",
27+
"raw-loader": "^4.0.0",
2528
"sass": "^1.26.3",
2629
"sass-loader": "^8.0.2",
2730
"typescript": "~3.8.3",

src/main.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@ import '@/components/globals';
22
import '@/filters/globals';
33

44
import Vue from 'vue';
5+
import VueShowdown from 'vue-showdown';
56

67
import App from './App.vue';
78

8-
Vue.config.productionTip = false
9+
Vue.config.productionTip = false;
10+
11+
Vue.use(VueShowdown, {
12+
options: {
13+
emoji: true,
14+
},
15+
});
916

1017
new Vue({
1118
render: h => h(App),
12-
}).$mount('#app')
19+
}).$mount('#app');

src/typings/global.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module '*.md';

vue.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
configureWebpack: {
3+
module: {
4+
rules: [{
5+
test: /\.md$/i,
6+
use: 'raw-loader',
7+
}],
8+
},
9+
},
10+
};

0 commit comments

Comments
 (0)