Skip to content

Commit af2036c

Browse files
ikoevskarigor789
authored andcommitted
Reworked Quick Start (#54)
* Reworked Quick Start * Added screenshots * Added more information about the Playround (layout, basic concepts, etc.) * Fixed image paths to work on Netlify * Change image paths
1 parent 2273152 commit af2036c

File tree

6 files changed

+67
-9
lines changed

6 files changed

+67
-9
lines changed
Lines changed: 67 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,71 @@
11
---
22
title: Quick Start
3-
contributors: [rigor789, eddyverbruggen, damain]
3+
contributors: [rigor789, eddyverbruggen, damain, ikoevska]
44
---
55

6-
If you want to easily try NativeScript-Vue, we strongly recommend trying
7-
it in the [NativeScript Playground](https://play.nativescript.org?template=play-vue). It is the easiest introduction you can get into NativeScript-Vue.
6+
If you don't want the hassle of installing and configuring your system before you can have a taste of NativeScript + Vue.js development, the [NativeScript Playground](https://play.nativescript.org?template=play-vue) has you covered.
87

9-
If you are ready to move on and work locally on your machine, and [you
10-
have your system ready for native development](/en/docs/getting-started/installation), you can start by using a template:
8+
It's a place in the cloud where you can just play around with NativeScript and Vue.js from your browser until you figure out the basics. Fire the link and start dragging and dropping component code around the place.
9+
10+
## Getting around the Playground
11+
12+
Firing [this link](https://play.nativescript.org/?template=play-vue) gets you to a simple code editor in the cloud where a very basic NativeScript + Vue.js template is pre-loaded for you.
13+
14+
### Before you start
15+
16+
![](/screenshots/ns-playground/playground-home.png)
17+
18+
If this is your first time here, the Playground prompts you to install a couple of mobile apps—the NativeScript Playground and the NativeScript Preview. Together they let you see your code changes applied in real time on device. No code building and bundling required.
19+
20+
You can ignore this step but without it, you'll miss most of the fun and excitement of playing around with Vue.js and NativeScript.
21+
22+
Keep the apps running while you're experimenting with the code.
23+
24+
### The lay of the land
25+
26+
![](/screenshots/ns-playground/playground-layout.png)
27+
28+
The left sidebar offers a file explorer and a **Components** panel. Most of your effort on your app will happen in `app.js` and `app.css`, containing the app functionality and taking care of the app styles, respectively. No need to deep dive in any other files for now.
29+
30+
The **Components** panel provides quick access to already pre-configured code for all available NativeScript UI components.
31+
32+
From the top of the page, you can push changes to the preview apps on your device, save, and download your code.
33+
34+
The bottom of the page is your best friend providing real-time error reports and device logs.
35+
36+
### Drag and drop to code
37+
38+
![](/screenshots/ns-playground/playground-drag-and-drop.gif)
39+
40+
Just click a component from the **Components** panel and drag it to the code editor, somewhere inside the `template` block. Releasing the mouse button inserts some pre-written sample code for the respective component. Any methods that go with it (such as what happens on button or item tap) are automatically added at the top of the page before the `template` block.
41+
42+
> **TIP:** Use the search of the **Components** panel to quickly find the element that you want to use. The search works only with the title of the component and not the actual name used in the code. For example: the search finds *text field* but does not find *textfield*.
43+
>
44+
> ![](/screenshots/ns-playground/playground-component-search.gif)
45+
46+
For most UI components to work, you need to drop them inside the `<Page>` block, preferably inside a layout component. Layouts tell your app how to position the UI components on the screen.
47+
48+
> **NOTE:** Right now, there's nothing stopping you from dropping the code at a place that will cause your app to crash or simply not load. In those cases, check the **Errors** and **Device Logs** tabs for more information.
49+
50+
### Check it out real-time
51+
52+
![](/screenshots/ns-playground/playground-preview.gif)
53+
54+
After you place the code in a valid spot, hit **Preview** (or `Ctrl+S` or `Cmd+S`) and see your app refresh on your device screen in an instant.
55+
56+
In some cases, when you interact with the app, it will close unexpectedly. Just fire it up again and inspect the crash report.
57+
58+
### Configure your code
59+
60+
So, the component runs and shows on your screen. You're excited but you want to make it your own. Hack away at the default code suggested by the Playground. Fix sizes and labels, remove or add elements.
61+
62+
Go to `app.css` and switch up the styling a bit. Experiment with colors and font sizes.
63+
64+
## Next steps
65+
66+
You can work in the Playground for as long as you like. You can use it to just get a taste of NativeScript development or to develop your entire project inside. However, when you get to the point where you are ready to put your app out there, you need to jump on the more advanced wagon and [install some NativeScript tools locally](/en/docs/getting-started/installation).
67+
68+
If [you already have your system ready for native development](/en/docs/getting-started/installation), you can start by using a template:
1169

1270
```shell
1371
$ $ npm install -g @vue/cli @vue/cli-init
@@ -16,12 +74,12 @@ $ cd <project-name>
1674
$ npm install
1775
```
1876

19-
and then run your app using
77+
and then run your app using:
78+
2079
```shell
2180
$ npm run watch:<platform>
2281
```
23-
> where platform is `ios` or `android`.
2482

25-
For more details check out [nativescript-vue/vue-cli-template on GitHub](https://github.com/nativescript-vue/vue-cli-template).
83+
where platform is `ios` or `android`.
2684

27-
To learn more about the available templates head over to the [templates documentation](/en/docs/getting-started/templates).
85+
For more information about the available templates head over to the [templates documentation](/en/docs/getting-started/templates).
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)