Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

NativeScript/docs-v7

NativeScript Documentation (v7 and below)

Home of the NativeScript documentation content that lives at http://docs.nativescript.org. Start contributing today!

What’s In This Document

Contributing

The NativeScript documentation is completely open-source and we love contributions. Whether you want to fix a typo or write an entire article, the NativeScript documentation is a great way to get started contributing to an open-source project.

Don’t know where to start? Check out the list of issues with the "help wanted" label. New to git or GitHub? Join our community Slack chat and we’ll be happy to help get you up and running.

The master branch contains the most up-to-date version of the NativeScript documentation and its contents are uploaded to docs.nativescript.org. When contributing to the documentation, always create a branch for your work from master as this will facilitate easier pull request management.

Are my contributions limited to this repo only?

No, my friend. There are many other code repositories in the NativeScript world you might also be interested in contributing to:

  • nativescript-cli - This repo contains the NativeScript command-line interface, which lets you create, build, and run apps using the NativeScript framework. The CLI is written in TypeScript.

  • nativescript-angular - This repository contains the TypeScript code that integrates Angular with NativeScript.

  • nativescript-vue - This community-run project allows NativeScript to integrate with Vue.js.

  • ios-runtime - This repo contains the NativeScript iOS runtime — the code that hosts NativeScript iOS apps, and allows JavaScript code to be executed on iOS devices. The iOS runtime is written in a fun mix of C++, Objective-C, and more.

  • android-runtime - This repo contains the NativeScript Android — the code that hosts NativeScript Android apps, and allows JavaScript code to be executed on Android devices. The Android runtime is written in a fun mix of C++ and Java.

You can go check them out and help to expand their docs, add plugins to it and even fix bugs.

About Jekyll

This documentation is built using Jekyll. More info on how to control the template, table of content and the project structure, in general, can be found in the Build README

Configuration

There are two versions of the NativeScript documentation that generate similar output: nativescript and angular. The former builds the vanilla NativeScript docs at docs.nativescript.org/start/introduction, while the latter discusses Angular-specific topics at docs.nativescript.org/angular/start/introduction.

Most of the content in this repository is shared between the two environments, but occasionally you may need to add environment-specific content. When you have this need you have a few options.

  1. If you would like a page to appear in a single environment, add an environment: angular or environment: nativescript property to that page's front matter. Pages marked with an environment property will appear in a single environment, and pages not marked with an environment property will be shared across all environments.

  2. If you have a page that should appear in both environments but has different content for certain sections, you can use our built-in environment block tags. The blocks are named angular and nativescript, respectively, and can be used like this:

{% nativescript %}This paragraph appears only in the vanilla NativeScript documentation{% endnativescript %}
This paragraph appears in both environments.
{% angular %}This appears only in the Angular NativeScript documentation{% endangular %}

Local Setup

If you plan to work on a non-trivial change, you will most probably want to run the documentation locally in order to give your change a try before submitting a pull request. To provide you with this opportunity without installing a ton of libraries and loose time in configuration, we have prepared a virtual environment based on a docker image, where everything is prepared for you in advance.

Prerequisites

Docker should be installed on your machine:

The NativeScript documentation is composed from multiple repositories:

Building the docker image

Start by cloning all required git repositories in some local folder (ns-docs in the following examples):

Open a console box (Windows users should run a Git bash session!) and clone the required git repositories:

mkdir ns-docs
cd ns-docs
git clone https://github.com/NativeScript/docs.git
git clone https://github.com/NativeScript/nativescript-angular.git

Optional:

git clone https://github.com/NativeScript/NativeScript.git
git clone https://github.com/NativeScript/nativescript-sdk-examples-js.git
git clone https://github.com/NativeScript/nativescript-sdk-examples-ng.git
git clone https://github.com/NativeScript/nativescript-cli.git
git clone https://github.com/NativeScript/nativescript-ui-samples.git
git clone https://github.com/NativeScript/nativescript-ui-samples-angular.git
git clone https://github.com/NativeScript/nativescript-ui-samples-vue.git

NOTE: nativescript-ui-... are private repositories used for building the API Reference for the NativeScript UI components.
NOTE: If you have these repositories locally from previous work with the documentation, be sure to delete them and start from scratch as some old files can cause problems with the current setup.

Then, build the docker image by using the following command from the ns-docs folder:

sudo docker build -t ns-docs:1.0 docs/build

NOTE: If you received some unauthorized error, make sure you are logged into docker from the CLI. Just execute docker login and follow the instruction. One thing to have in mind is that docker username is your email, but docker ID is what you see on the top right when you log in to https://hub.docker.com. When executing docker login you need to enter your Docker ID.

Building the documentation

Start the docker image created in the previous step from the ns-docs folder:

sudo docker run --rm -t -i -v $(pwd):/root -p 9192:9192 -t ns-docs:1.0

Due to the poor performance of mounted volumes on Mac OS you may use the delegated mount strategy:

sudo docker run --rm -t -i -v $(pwd):/root:delegated -p 9192:9192 -t ns-docs:1.0

Adding content

Edit an article in some of the repositories and navigate to http://localhost:9192 on the host machine. Notice that it might take some time for the changes to be reflected in the browser.

Making changes

  • Edit some files.
  • Refresh your browser (depending on which files have been modified, it might take more or less time for the changes to take effect).

Contributors

The following is a list of all the people that have contributed to the NativeScript documentation. Thanks for your contributions!

tsonevn NickIliev tjvantoll etabakov ErjanGavalji ns-bot

radeva vakrilov rdlauer N3ll hdeshev tbozhikov

mbektchiev ikoevska erikruth nsndeck sis0k0 petekanev

hamorphis vtrifonov Plamen5kov PetyaSotirova bundyo alexziskind1

atanasovg sipacate MartoYankov sebawita angeltsvetkov teobugslayer

ggarabedian ivanbuhov lini dtopuzov tdermendjiev zbranzov

EmilStoychev jasssonpet KristianDD darind vchimev enchev

pkoleva Mitko-Kerezov rosen-vladimirov jlooper boevski tgpetrov

vmutafov manoldonev bdlb77 paulpv surdu roblav96

rynop tzraikov PanayotCankov bradmartin jpenna getsetbro

tailsu sitefinitysteve dmccuskey elena-p yyosifov parloti

burkeholland pelegri felipebueno jbristowe Lampei zh-m

000panther mudlabs ShawnPavel tushutripathi shiv19 adrian-niculescu

alejonext AmitGurbani AntonDobrev baskarmib djenitoo fdnhkj

gbhojraj Hakier shirohana blackpanther99 imcgonigle ignaciolarranaga

lonerzzz Bjorn576 jayvolr jonnysamps digitaldrummerj LokeCarlsson

msaelices milejko map7 m-abs Nikhil22 noumaans

pedromorgan Razzeee renestalder rodrigopires TedHopp WilcoBreedt

devoto13 eyal7773 miroslavaivanova mtekp TsvetanMilanov ajoslin103

ADmad airandfingers adamunion AjaiDubey Fusty ADjenkov

Alexander-Bliznyuk kondasoft amjd the-AoG-guy devdRew MonsieurMan

gupta-ankit ABoschman Burgov bensooraj bsyk benjlin

brandonpearson23 clounie tonjohn CMRHDL cameronnorman celso-wo

chuckmitchell crixx chrants yapcwed ctp-placebo chrismullins

ClaudioMeinberg dotlens derskeal Darkle CoreyCole ejsuncy

DTV96Calibre DannyFeliz dennistang DimitarTachev diogocapela donangel

dogabudak DrQwertySilence dyldawg ezesundayeze felipebernardes FrancoisCamus

codepotato sundayglee grgur harikrishnana2021 hristoborisov hugocarreiracosta

jagadish-kb jkulubya jayoma n3wc JmOkay jofftiquez

jrpool jrz joshgking TheOriginalJosh jpierront jurgentreep

Ksantacr kharysharpe LeandroDG lukesammy macknelson mshanak

marablayev mrcaste marklanhamhc hettiger nemephx DanekDanek

realtebo MitzaCoder mhrabiee mrmowji LiteCatDev Natalia-Hristova

nicoeg nike47 oluwaseye oimyounis Omnicouleur developer82

pzanitti pdvorchik pascualstromsnes dodongphure morph3o qkdreyer

rajatraj733 rakeshgirase ReshmaPD RohanTalip ffxsam SamVerschueren

mastix sean-perkins sebastianovide jalkoby shauntif simmstein

SirMaxxx DasAllFolks tadeucariolano Taremeh TechnicalSoup Tetrygon

tralves fartek tdous e2l3n tonymporter trentvb

viragumathe5 VladimirAmiorkov weech3r williamho Xorbert ycherniavskyi

csj diyews doorb02 Ayushraj1 ishandutta2007 jacostaperu

jamessouth johannbraun jyotendra narayananl23 pavanser peterennis

quintonn saiberz saknarak seros00 shendrekbharath stevo-knievo

svalchinov tdsmithATabc trevordowdle tsira yavulan yjaaidi

bangseongbeom

About

Documentation, API reference, and code snippets for NativeScript

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 305

AltStyle によって変換されたページ (->オリジナル) /