Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More content #5

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/components/modules/ROOT/pages/styling.adoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
== CSS

You change the looks and appearance of views (elements) in a NativeScript application similarly to how you do it in a web application using Cascading Style Sheets (CSS) or changing the style object of the elements in JavaScript.
Only a subset of the CSS language is supported.
By default, NativeScript provides you with a theme(@nativescript/theme) that allows to change the looks and appearance of views (elements) in a NativeScript application similarly to how you do it in a web application using Cascading Style Sheets (CSS). However, only a subset of the CSS language is supported. For a full CSS support, you can use [@nativescript/tailwind](/plugins/tailwindcss.md). In addition to CSS, you can also style the elements by changing their style object in JavaScript.

Similarly to the DOM Style Object, each View instance exposes a style property, which holds all the style properties for the view.
When the view is displayed, all its style properties are applied to the underlying native widget.
Similarly to the DOM Style Object, each View instance exposes a style property, which holds all its style properties. When the view is displayed, all its style properties are applied to the underlying native widget.

'''

Expand Down
8 changes: 7 additions & 1 deletion docs/components/modules/ROOT/pages/webview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@ To do that we could access the android property and with the help of setDisplayZ
| Name | Type | Description

| `src`
| `String`
| `string`
| Gets or sets the displayed web content.
+ Valid values: an absolute URL, the path to a local HTML file, or static HTML.

| `iosAllowInlineMediaPlayback`
| `boolean`
| `iOS only`: Enables inline media playback on iOS.
By default, webview forces iPhone into fullscreen media playback.


| `+...Inherited+`
| `Inherited`
| Additional inherited properties not shown.
Expand Down
46 changes: 26 additions & 20 deletions docs/guides/modules/ROOT/pages/basics/environment-setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ a popular package manager for Windows.

To install *Node* and *JDK* (using the prebuilt OpenJDK binaries from https://adoptium.net/[Adoptium]) open an Administrator Command Prompt (right click and select "Run as Administrator") and run the following command:

[source%linenums,cli]
[source,bash]
----
choco install -y nodejs.install temurin11
----
Expand Down Expand Up @@ -68,14 +68,14 @@ The default location is inside the Android SDK's `platform-tools` folder:

Install the NativeScript CLI globally:

[source%linenums,cli]
[source,bash]
----
npm install -g nativescript
----

To verify if the installation was successful, open a new Command Prompt window to ensure the new environment variables are loaded and run

[source%linenums,cli]
[source,bash]
----
ns doctor android
----
Expand Down Expand Up @@ -120,7 +120,7 @@ a popular package manager for macOS.

Once you have Homebrew installed, to install *Node* open a Terminal and run the following command:

[source%linenums,cli]
[source,bash]
----
brew install node
----
Expand All @@ -131,7 +131,7 @@ If you need to work with multiple versions of node, you may skip installing node

To install a *JDK* (using the prebuilt OpenJDK binaries from https://adoptium.net/[Adoptium]) run the following command:

[source%linenums,cli]
[source,bash]
----
brew tap homebrew/cask-versions
brew install --cask temurin11
Expand Down Expand Up @@ -167,14 +167,14 @@ export PATH=$PATH:$ANDROID_HOME/platform-tools

Install the *NativeScript CLI* globally:

[source%linenums,cli]
[source,bash]
----
npm install -g nativescript
----

To verify if the installation was successful, open a new Command Prompt window to ensure the new environment variables are loaded and run

[source%linenums,cli]
[source,bash]
----
ns doctor android
----
Expand Down Expand Up @@ -210,7 +210,7 @@ a popular package manager for macOS.

Once you have Homebrew installed, to install *Node* open a Terminal and run the following command:

[source%linenums,cli]
[source,bash]
----
brew install node
----
Expand All @@ -233,7 +233,7 @@ image::guides::environment-setup/xcode_command_line_tools.png[XCode Preferences,

Install *ruby 2.7* and link it so it's available in your shell environment:

[source%linenums,cli]
[source,bash]
----
brew install [email protected]
brew link [email protected]
Expand All @@ -260,7 +260,7 @@ In a new terminal window, install the *+++<abbr title="A package manager for man

// gem install ... # requires root privileges on macOS. sudo works.

[source%linenums,cli]
[source,bash]
----
sudo gem install cocoapods
sudo gem install xcodeproj
Expand All @@ -276,28 +276,34 @@ Starting with macOS 12.3, python 2.x is no longer shipped with the system and th

If you are on macOS 12.3 or newer, please follow these instructions.

[WARNING]
====
*Note*: Python 3 is fully supported by the NativeScript components that rely on it, however changing our scripts to use the `python3` executable name by default is a minor breaking change we're aiming to introduce in NativeScript 8.3.
Until then, this workaround is required to get running.
**Installing Python**

Starting with macOS 12.3, python 2.x is no longer shipped with the system and the python3 executable isn't aliased to `python`, you will need to do that manually.

[source%linenums,cli]
If you are on macOS 12.3 or newer, please follow these instructions.

[source,bash]
----
# link and alias the installed python3
# version to be available to XCode as python
sudo ln -s $(which python3) /usr/local/bin/python
# install python3 from Homebrew
brew install python
# create /usr/local/bin directory if it doesn’t exist
sudo mkdir -p /usr/local/bin
# link python -> /opt/homebrew/bin/python3
sudo ln -s -f /opt/homebrew/bin/python3 /usr/local/bin/python
# verify, should print 3.x
python --version
----

Next, update *+++<abbr title="Python package manager">+++pip+++</abbr>+++* and install *+++<abbr title="Python 2 & 3 compatibility package used by NativeScript">+++six+++</abbr>+++* by running the following:

[source%linenums,cli]
[source,bash]
----
python3 -m pip install --upgrade pip
python3 -m pip install six
----

Now continue to the "Install the *NativeScript CLI* globally" section below.
====


If you are not on macOS 12.3+, install *+++<abbr title="Python package manager">+++pip+++</abbr>+++* and *+++<abbr title="Python 2 & 3 compatibility package used by NativeScript">+++six+++</abbr>+++* by running the following:

Expand Down
15 changes: 13 additions & 2 deletions docs/guides/modules/ROOT/pages/nativescript-core/utils.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,19 @@ Examples: + `console.log(Utils.isObject(""))` logs `false` + `console.log(Utils.

| `verifyCallback(value: any)`
| `void`
| A function that checks if something is a valid function.
Throws exception if passed value is not a valid function.
| A function that checks if something is a valid function. Throws exception if passed value is not a valid function.

| `dataSerialize(data?: any, wrapPrimitives?: boolean)`
| `any`
| Data serialization from JS > Native.

`wrapPrimitives`: Optionally wrap primitive types (Some APIs may require this)

| `dataDeserialize(nativeData?: any)`
| `any`
| Data deserialization from Native > JS.

`nativeData`: Native platform data
|===

== Timer utilities
Expand Down