Skip to content

Commit cff84cd

Browse files
committed
clean up code blocks
1 parent 5032b59 commit cff84cd

26 files changed

+81
-402
lines changed

build/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Metalsmith(cwd)
3939
'en': 'English',
4040
'hu': 'Magyar',
4141
},
42+
home(current) {
43+
const locale = current.locale || this.defaultLocale;
44+
return `/${locale === this.defaultLocale ? '' : locale}`
45+
},
4246
lang(current, locale, slug) {
4347
locale = locale || current.locale || this.defaultLocale;
4448
slug = slug || current.slug;

content/docs/en/1-quick-start.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,34 @@ contributors: [naderio, galaxyblur]
77

88
1) Create a NativeScript app using `nativescript-vue-template`
99

10-
```sh
11-
tns create MyApp --template nativescript-vue-template
10+
```shell
11+
$ tns create MyApp --template nativescript-vue-template
1212
```
1313

1414
2) Run the app on Android or iOS:
1515

16-
```sh
17-
tns run android
16+
```shell
17+
$ tns run android
1818
```
1919

2020
or
2121

22-
```sh
23-
tns run ios
22+
```shell
23+
$ tns run ios
2424
```
2525

2626
## Using `tns` CLI
2727

2828
1) Create a NativeScript app
2929

30-
```sh
31-
tns create sample-app
30+
```shell
31+
$ tns create sample-app
3232
```
3333

3434
2) Install `nativescript-vue`
3535

36-
```sh
37-
npm install --save nativescript-vue
36+
```shell
37+
$ npm install --save nativescript-vue
3838
```
3939
3) Change `app.js` content to:
4040

@@ -62,12 +62,12 @@ new Vue({
6262

6363
4) Run the app on Android or iOS:
6464

65-
```sh
66-
tns run android
65+
```shell
66+
$ tns run android
6767
```
6868

6969
or
7070

71-
```sh
72-
tns run ios
71+
```shell
72+
$ tns run ios
7373
```

content/docs/en/4-installation-nativescript-vue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ contributors: [naderio, teobugslayer]
55

66
Install `nativescript-vue` using `npm` by running the following command:
77

8-
```sh
9-
npm install --save nativescript-vue
8+
```shell
9+
$ npm install --save nativescript-vue
1010
```

content/docs/en/6-templates.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ This one the most basic template. It contains a number of app samples that you c
1717

1818
#### Installation
1919

20-
```sh
21-
tns create sample-app --template nativescript-vue-template
20+
```shell
21+
$ tns create sample-app --template nativescript-vue-template
2222
```
2323
*Follow the [project link](https://github.com/tralves/nativescript-vue-template) for further instructions.*
2424

@@ -39,8 +39,8 @@ It supports:
3939
- babel with `es2015` and `stage-2` presets;
4040

4141
#### Installation
42-
```sh
43-
tns create sample-app --template nativescript-vue-rollup-template
42+
```shell
43+
$ tns create sample-app --template nativescript-vue-rollup-template
4444
```
4545
*Follow the [project link](https://github.com/tralves/nativescript-vue-rollup-template) for further instructions.*
4646

@@ -63,7 +63,7 @@ The webpack template leverages webpack to provide the same functionality as the
6363
- (soon) native/web code sharing;
6464

6565
#### Installation
66-
```sh
67-
tns create sample-app --template https://github.com/tralves/nativescript-vue-webpack-template
66+
```shell
67+
$ tns create sample-app --template https://github.com/tralves/nativescript-vue-webpack-template
6868
```
6969
*Follow the [project link](https://github.com/tralves/nativescript-vue-webpack-template) for further instructions.*

content/docs/en/7-using-nativescript-plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ UI plugins work almost identically to how you'd use a NativeScript UI plugin in
99

1010
Install the plugin by running this command in the samples folder:
1111

12-
```sh
13-
tns plugin add nativescript-gradient
12+
```shell
13+
$ tns plugin add nativescript-gradient
1414
```
1515

1616
Open your vue file and right after the imports at the top, add:

content/docs/en/8-using-vue-plugins.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@ Vuex is Vue.js's state management pattern and library. It serves as a store for
1515

1616
Install Vuex as you would normally in your Vue.js app. With npm, for example:
1717

18-
`npm install vuex --save`.
18+
```shell
19+
$ npm install vuex --save
20+
```
1921

2022
The most recent version of Vuex will be added to your package.json file.
2123

2224
### Import
2325

2426
In your app's `main.js` file, import Vuex at the top:
2527

26-
```sh
28+
```js
2729
import Vuex from 'vuex'
2830
Vue.use(Vuex)
2931
```
@@ -33,7 +35,7 @@ Now you can use Vuex in the app similar to how you would use it in a standard Vu
3335

3436
Above your creation of a new Vue instance, or in a separate folder (for example `/store` in your app folder), create a new constant to store your state. This is where you will invoke Vuex API calls. A simple store constant would include the state of a counter whose state you control throughout your app by means of tracking its mutations:
3537

36-
```sh
38+
```js
3739
const store = new Vuex.Store({
3840
state: {
3941
count: 0
@@ -49,7 +51,7 @@ const store = new Vuex.Store({
4951

5052
Now you can manage state by calling the store you just created. In the example below, the app tracks the count value as you press a '+' or '-' button. Note that you don't manipulate the state itself, but rather call mutations to increment and decrement its value.
5153

52-
```sh
54+
```js
5355
new Vue({
5456

5557
computed: {

content/docs/hu/1-quick-start.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
---
2-
title: Quick Start HU
2+
title: Quick Start
33
contributors: [naderio, galaxyblur]
44
---
55

66
## Using `nativescript-vue-template`
77

88
1) Create a NativeScript app using `nativescript-vue-template`
99

10-
```sh
11-
tns create MyApp --template nativescript-vue-template
10+
```shell
11+
$ tns create MyApp --template nativescript-vue-template
1212
```
1313

1414
2) Run the app on Android or iOS:
1515

16-
```sh
17-
tns run android
16+
```shell
17+
$ tns run android
1818
```
1919

2020
or
2121

22-
```sh
23-
tns run ios
22+
```shell
23+
$ tns run ios
2424
```
2525

2626
## Using `tns` CLI
2727

2828
1) Create a NativeScript app
2929

30-
```sh
31-
tns create sample-app
30+
```shell
31+
$ tns create sample-app
3232
```
3333

3434
2) Install `nativescript-vue`
3535

36-
```sh
37-
npm install --save nativescript-vue
36+
```shell
37+
$ npm install --save nativescript-vue
3838
```
3939
3) Change `app.js` content to:
4040

@@ -62,12 +62,12 @@ new Vue({
6262

6363
4) Run the app on Android or iOS:
6464

65-
```sh
66-
tns run android
65+
```shell
66+
$ tns run android
6767
```
6868

6969
or
7070

71-
```sh
72-
tns run ios
71+
```shell
72+
$ tns run ios
7373
```

content/docs/hu/4-installation-nativescript-vue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ contributors: [naderio, teobugslayer]
55

66
Install `nativescript-vue` using `npm` by running the following command:
77

8-
```sh
9-
npm install --save nativescript-vue
8+
```shell
9+
$ npm install --save nativescript-vue
1010
```

content/docs/hu/6-templates.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ This one the most basic template. It contains a number of app samples that you c
1717

1818
#### Installation
1919

20-
```sh
21-
tns create sample-app --template nativescript-vue-template
20+
```shell
21+
$ tns create sample-app --template nativescript-vue-template
2222
```
2323
*Follow the [project link](https://github.com/tralves/nativescript-vue-template) for further instructions.*
2424

@@ -39,8 +39,8 @@ It supports:
3939
- babel with `es2015` and `stage-2` presets;
4040

4141
#### Installation
42-
```sh
43-
tns create sample-app --template nativescript-vue-rollup-template
42+
```shell
43+
$ tns create sample-app --template nativescript-vue-rollup-template
4444
```
4545
*Follow the [project link](https://github.com/tralves/nativescript-vue-rollup-template) for further instructions.*
4646

@@ -63,7 +63,7 @@ The webpack template leverages webpack to provide the same functionality as the
6363
- (soon) native/web code sharing;
6464

6565
#### Installation
66-
```sh
67-
tns create sample-app --template https://github.com/tralves/nativescript-vue-webpack-template
66+
```shell
67+
$ tns create sample-app --template https://github.com/tralves/nativescript-vue-webpack-template
6868
```
6969
*Follow the [project link](https://github.com/tralves/nativescript-vue-webpack-template) for further instructions.*

content/docs/hu/7-using-nativescript-plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ UI plugins work almost identically to how you'd use a NativeScript UI plugin in
99

1010
Install the plugin by running this command in the samples folder:
1111

12-
```sh
13-
tns plugin add nativescript-gradient
12+
```shell
13+
$ tns plugin add nativescript-gradient
1414
```
1515

1616
Open your vue file and right after the imports at the top, add:

0 commit comments

Comments
 (0)