You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ An example of this would be the following Vue component:
53
53
```
54
54
55
55
### Optional Separation of concerns for Web and Native SFC's
56
-
If you want complete seperation of concerns between Web and Native for components, core logic and styling, you can also provide an alternate file naming scheme in your project. The name will dictate which mode (Web or Native) and platform (Android or IOS) the file will be used with. The same overall schema will work for `.vue`, `.js`, `.ts`, `.scss`and `.css` files.
56
+
If you want complete seperation of concerns between Web and Native for components, core logic and styling, you can also provide an alternate file naming scheme in your project. The name will dictate which mode (Web or Native) and platform (Android or IOS) the file will be used with. The same overall schema will work for `.vue`, `.js`, `.ts`, `.scss`, `.css`, `.styl`, and `.less` files.
57
57
58
58
| File Type | Android __and__ IOS | Android only | IOS only | Web only |
| less |*.native.less |*.android.less |*.ios.less |*.less |
65
67
66
68
Webpack will handle figuring out which files to include based on the `npm run` command syntax you pass in. You can also mix and match this file naming schema with the `web` or `native` tag options mentioned above.
67
69
@@ -204,10 +206,12 @@ You should be able to use the NativeScript Playground and Preview Apps via the f
204
206
1.`npm run preview:android`
205
207
2.`npm run preview:ios`
206
208
207
-
#### --env command line recognition
209
+
#### --env & --hmr command line recognition
208
210
Basic support for passing the `env` command line option is in place, but has a slightly different syntax since we're working with the CLI 3 webpack infrastructure. To inject items into `env` at run-time, you will need to add `-- --env.option` Where option is one of the recognized options that Nativescript-Vue and this project supports.
209
211
An example of this would be something like this: `npm run serve:android -- --env.production`. This would allow you to serve up a Production build of your Android app versus just running `npm run serve:android` which would serve a Development version of the same.
210
212
213
+
HMR will also work by passing in `-- --hmr`. An example of this would be `npm run serve:android -- --hmr`
214
+
211
215
#### Webpack related information
212
216
The options passed in at `npm run` will dictate what webpack config is provided. The first choice webpack will make is if this is a `web` or `native` environment. Then, if it's a `native` environment, it will determine choices to be made between `ios` and `android`.
0 commit comments