文档章节

react native创建项目

zcl111
 zcl111
发布于 2016/05/19 13:40
字数 1590
阅读 45
收藏 0

Last login: Thu May 19 11:36:03 on ttys004
zcldeMacBook-Air:~ zcl$ nvm

Node Version Manager

Note: <version> refers to any version-like string nvm understands. This includes:
  - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
  - default (built-in) aliases: node, stable, unstable, iojs, system
  - custom aliases you define with `nvm alias foo`

Usage:
  nvm --help                                Show this message
  nvm --version                             Print out the latest released version of nvm
  nvm install [-s] <version>                Download and install a <version>, [-s] from source. Uses .nvmrc if available
    --reinstall-packages-from=<version>     When installing, reinstall packages installed in <node|iojs|node version number>
  nvm uninstall <version>                   Uninstall a version
  nvm use [--silent] <version>              Modify PATH to use <version>. Uses .nvmrc if available
  nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available
  nvm run [--silent] <version> [<args>]     Run `node` on <version> with <args> as arguments. Uses .nvmrc if available
  nvm current                               Display currently activated version
  nvm ls                                    List installed versions
  nvm ls <version>                          List versions matching a given description
  nvm ls-remote                             List remote versions available for install
  nvm version <version>                     Resolve the given description to a single local version
  nvm version-remote <version>              Resolve the given description to a single remote version
  nvm deactivate                            Undo effects of `nvm` on current shell
  nvm alias [<pattern>]                     Show all aliases beginning with <pattern>
  nvm alias <name> <version>                Set an alias named <name> pointing to <version>
  nvm unalias <name>                        Deletes the alias named <name>
  nvm reinstall-packages <version>          Reinstall global `npm` packages contained in <version> to current version
  nvm unload                                Unload `nvm` from shell
  nvm which [<version>]                     Display path to installed node version. Uses .nvmrc if available

Example:
  nvm install v0.10.32                  Install a specific version number
  nvm use 0.10                          Use the latest available 0.10.x release
  nvm run 0.10.32 app.js                Run app.js using node v0.10.32
  nvm exec 0.10.32 node app.js          Run `node app.js` with the PATH pointing to node v0.10.32
  nvm alias default 0.10.32             Set default node version on a shell

Note:
  to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)

zcldeMacBook-Air:~ zcl$ nvm -v

Node Version Manager

Note: <version> refers to any version-like string nvm understands. This includes:
  - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
  - default (built-in) aliases: node, stable, unstable, iojs, system
  - custom aliases you define with `nvm alias foo`

Usage:
  nvm --help                                Show this message
  nvm --version                             Print out the latest released version of nvm
  nvm install [-s] <version>                Download and install a <version>, [-s] from source. Uses .nvmrc if available
    --reinstall-packages-from=<version>     When installing, reinstall packages installed in <node|iojs|node version number>
  nvm uninstall <version>                   Uninstall a version
  nvm use [--silent] <version>              Modify PATH to use <version>. Uses .nvmrc if available
  nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available
  nvm run [--silent] <version> [<args>]     Run `node` on <version> with <args> as arguments. Uses .nvmrc if available
  nvm current                               Display currently activated version
  nvm ls                                    List installed versions
  nvm ls <version>                          List versions matching a given description
  nvm ls-remote                             List remote versions available for install
  nvm version <version>                     Resolve the given description to a single local version
  nvm version-remote <version>              Resolve the given description to a single remote version
  nvm deactivate                            Undo effects of `nvm` on current shell
  nvm alias [<pattern>]                     Show all aliases beginning with <pattern>
  nvm alias <name> <version>                Set an alias named <name> pointing to <version>
  nvm unalias <name>                        Deletes the alias named <name>
  nvm reinstall-packages <version>          Reinstall global `npm` packages contained in <version> to current version
  nvm unload                                Unload `nvm` from shell
  nvm which [<version>]                     Display path to installed node version. Uses .nvmrc if available

Example:
  nvm install v0.10.32                  Install a specific version number
  nvm use 0.10                          Use the latest available 0.10.x release
  nvm run 0.10.32 app.js                Run app.js using node v0.10.32
  nvm exec 0.10.32 node app.js          Run `node app.js` with the PATH pointing to node v0.10.32
  nvm alias default 0.10.32             Set default node version on a shell

Note:
  to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)

zcldeMacBook-Air:~ zcl$ nvm-v
-bash: nvm-v: command not found
zcldeMacBook-Air:~ zcl$ nvm -v

Node Version Manager

Note: <version> refers to any version-like string nvm understands. This includes:
  - full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
  - default (built-in) aliases: node, stable, unstable, iojs, system
  - custom aliases you define with `nvm alias foo`

Usage:
  nvm --help                                Show this message
  nvm --version                             Print out the latest released version of nvm
  nvm install [-s] <version>                Download and install a <version>, [-s] from source. Uses .nvmrc if available
    --reinstall-packages-from=<version>     When installing, reinstall packages installed in <node|iojs|node version number>
  nvm uninstall <version>                   Uninstall a version
  nvm use [--silent] <version>              Modify PATH to use <version>. Uses .nvmrc if available
  nvm exec [--silent] <version> [<command>] Run <command> on <version>. Uses .nvmrc if available
  nvm run [--silent] <version> [<args>]     Run `node` on <version> with <args> as arguments. Uses .nvmrc if available
  nvm current                               Display currently activated version
  nvm ls                                    List installed versions
  nvm ls <version>                          List versions matching a given description
  nvm ls-remote                             List remote versions available for install
  nvm version <version>                     Resolve the given description to a single local version
  nvm version-remote <version>              Resolve the given description to a single remote version
  nvm deactivate                            Undo effects of `nvm` on current shell
  nvm alias [<pattern>]                     Show all aliases beginning with <pattern>
  nvm alias <name> <version>                Set an alias named <name> pointing to <version>
  nvm unalias <name>                        Deletes the alias named <name>
  nvm reinstall-packages <version>          Reinstall global `npm` packages contained in <version> to current version
  nvm unload                                Unload `nvm` from shell
  nvm which [<version>]                     Display path to installed node version. Uses .nvmrc if available

Example:
  nvm install v0.10.32                  Install a specific version number
  nvm use 0.10                          Use the latest available 0.10.x release
  nvm run 0.10.32 app.js                Run app.js using node v0.10.32
  nvm exec 0.10.32 node app.js          Run `node app.js` with the PATH pointing to node v0.10.32
  nvm alias default 0.10.32             Set default node version on a shell

Note:
  to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)

zcldeMacBook-Air:~ zcl$ nvm install node && nvm alias default node
Downloading https://nodejs.org/dist/v6.2.0/node-v6.2.0-darwin-x64.tar.gz...
######################################################################## 100.0%
Now using node v6.2.0 (npm v3.8.9)
Creating default alias: default -> node (-> v6.2.0)
default -> node (-> v6.2.0)
zcldeMacBook-Air:~ zcl$ node -v
v6.2.0
zcldeMacBook-Air:~ zcl$ npm -v
3.8.9
zcldeMacBook-Air:~ zcl$ brew install watchman
Warning: watchman-HEAD already installed
zcldeMacBook-Air:~ zcl$ watchman
{
    "error": "invalid command (expected an array with some elements!)",
    "cli_validated": true,
    "version": "4.5.0"
}
zcldeMacBook-Air:~ zcl$ watchman -v
4.5.0
zcldeMacBook-Air:~ zcl$ flow -v
flow: unknown option '-v'.
Usage: flow [COMMAND]

Valid values for COMMAND:
  ast             Print the AST
  autocomplete    Queries autocompletion information
  check           Does a full Flow check and prints the results
  check-contents  Run typechecker on contents from stdin
  coverage        Shows coverage information for a given file
  find-module     Resolves a module reference to a file
  force-recheck   Forces the server to recheck a given list of files
  get-def         Gets the definition location of a variable or property
  get-importers   Gets a list of all importers for one or more given modules
  get-imports     Get names of all modules imported by one or more given modules
  init            Initializes a directory to be used as a flow root directory
  port            Shows ported type annotations for given files
  search          Searches a pattern
  server          Runs a Flow server in the foreground
  start           Starts a Flow server
  status          (default) Shows current Flow errors by asking the Flow server
  stop            Stops a Flow server
  suggest         Shows type annotation suggestions for given files
  type-at-pos     Shows the type at a given file and position
  version         Print version information

Default values if unspecified:
  COMMAND    status

Status command options:
  --color              Display terminal output in color. never, always, auto (default: auto)
  --from               Specify client (for use by editor plugins)
  --help               This list of options
  --ignore-version     Ignore the version constraint in .flowconfig
  --json               Output results in JSON format
  --no-auto-start      If the server is not running, do not start it; just exit
  --old-output-format  Use old output format (absolute file names, line and column numbers)
  --one-line           Escapes newlines so that each error prints on one line
  --retries            Set the number of retries. (default: 3)
  --retry-if-init      retry if the server is initializing (default: true)
  --show-all-errors    Print all errors (the default is to truncate after 50 errors)
  --strip-root         Print paths without the root
  --temp-dir           Directory in which to store temp files (default: /tmp/flow/)
  --timeout            Maximum time to wait, in seconds
  --version            (Deprecated, use `flow version` instead) Print version number and exit
zcldeMacBook-Air:~ zcl$ npm install -g react-native-cli
/Users/zcl/.nvm/versions/node/v6.2.0/bin/react-native -> /Users/zcl/.nvm/versions/node/v6.2.0/lib/node_modules/react-native-cli/index.js
/Users/zcl/.nvm/versions/node/v6.2.0/lib
└─┬ react-native-cli@0.2.0
  ├─┬ chalk@1.1.3
  │ ├── ansi-styles@2.2.1
  │ ├── escape-string-regexp@1.0.5
  │ ├─┬ has-ansi@2.0.0
  │ │ └── ansi-regex@2.0.0
  │ ├── strip-ansi@3.0.1
  │ └── supports-color@2.0.0
  ├── minimist@1.2.0
  ├─┬ prompt@0.2.14
  │ ├── pkginfo@0.4.0
  │ ├─┬ read@1.0.7
  │ │ └── mute-stream@0.0.6
  │ ├── revalidator@0.1.8
  │ ├─┬ utile@0.2.1
  │ │ ├── async@0.2.10
  │ │ ├── deep-equal@1.0.1
  │ │ ├── i@0.3.5
│ ├─┬ mkdirp@0.5.1
  │ │ │ └── minimist@0.0.8
  │ │ ├── ncp@0.4.2
  │ │ └─┬ rimraf@2.5.2
  │ │   └─┬ glob@7.0.3
  │ │     ├─┬ inflight@1.0.5
  │ │     │ └── wrappy@1.0.2
  │ │     ├── inherits@2.0.1
  │ │     ├─┬ minimatch@3.0.0
  │ │     │ └─┬ brace-expansion@1.1.4
  │ │     │   ├── balanced-match@0.4.1
  │ │     │   └── concat-map@0.0.1
  │ │     ├── once@1.3.3
  │ │     └── path-is-absolute@1.0.0
  │ └─┬ winston@0.8.3
  │   ├── colors@0.6.2
  │   ├── cycle@1.0.3
  │   ├── eyes@0.1.8
  │   ├── isstream@0.1.2
  │   ├── pkginfo@0.3.1
  │   └── stack-trace@0.0.9
  └── semver@5.1.0

zcldeMacBook-Air:~ zcl$ LS
360云盘            Library            myapp
AndroidStudioProjects    Movies            webapp
Desktop            Music            百度云同步盘
Documents        Pictures
Downloads        Public
zcldeMacBook-Air:~ zcl$ cd Desktop/
zcldeMacBook-Air:Desktop zcl$ mkdir ReactNative
zcldeMacBook-Air:Desktop zcl$ cd ReactNative/
zcldeMacBook-Air:ReactNative zcl$ react-native init  HelloWorld --verbose
This will walk you through creating a new React Native project in /Users/zcl/Desktop/ReactNative/HelloWorld
Installing react-native package from npm...

© 著作权归作者所有

共有 人打赏支持
zcl111
粉丝 3
博文 92
码字总数 11552
作品 0
六安
程序员
【React Native开发】React Native库版本升级(Upgrading)与降级讲解(6)

转载请标明出处: http://blog.csdn.net/developerjiangqq/article/details/50533493 本文出自:【江清清的博客】 (一)前言 【好消息】个人网站已经上线运行,后面博客以及技术干货等精彩文章会...

jiangqq781931404
2016/01/17
0
0
【React Native开发】React Native库版本升级(Upgrading)与降级讲解

(一)前言 现在React Native For Android刚 刚开源才不久,现在整体功能还不健全完善以及开发中的坑(Bug)还是比较多的 ,以至于到现在还没有正式版本。项目人员正在加紧开发维护,修复Bug,...

freecsdn
2016/09/12
36
0
前端开发之react-native项目快速搭建

前端开发之react-native项目快速搭建 步骤: 1.命令行指令:npm i react-native-cli -g 2.react-native init aaa 3.Android Studio 导入创建的aaa项目下的Android文件夹,在安卓模拟机里运行...

hflxia的博客
2017/12/16
0
0
Android原生APP中添加ReactNative 进行混合开发教程

Android原生APP中添加ReactNative 进行混合开发教程 背景 React Native出来已经一段时间了,相对来说也算稳定了,在很多的企业中都实际使用他们,混合开发已经是未来的一种趋势,混合开发中使...

那不是尤迪安
2016/10/25
439
1
React Native入门:环境安装和在模拟机运行

备注:因为我都是在mac平台上进行开发,所以这里的环境安装是也是针对于mac平台的,下方命令的brew在linux平台上是apt,还需要找对应linux平台对应的命令,这点请注意。 学习rn的前提: 熟悉...

藤原佐为
2017/09/29
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

day60-20180818-流利阅读笔记-待学习

钉钉:工作的归工作,生活的…也归工作? 毛西 2018-08-18 1.今日导读 你用过“钉钉”么?被公司要求使用钉钉的感受是如何的呢?这款阿里巴巴旗下的移动办公社交平台在弯道超车微信、为许多企...

aibinxiao
40分钟前
6
0
Kubernetes的HTTPS和证书问题,汇总

通过Kubernetes建立服务网站,需要干的事情和HTTPS和证书问题,汇总如下: 建立Nginx服务器 搞服务器第一步,Ubuntu 18.04设置静态IP 安装Nginx服务。 Kubernetes的deployment使用 创建服务,...

openthings
56分钟前
2
0
php 使用redis锁限制并发访问类

1.并发访问限制问题 对于一些需要限制同一个用户并发访问的场景,如果用户并发请求多次,而服务器处理没有加锁限制,用户则可以多次请求成功。 例如换领优惠券,如果用户同一时间并发提交换领...

豆花饭烧土豆
今天
0
0
Linux环境搭建 | 手把手教你配置Linux虚拟机

在上一节 「手把你教你安装Linux虚拟机」 里,我们已经安装好了Linux虚拟机,在这一节里,我们将配置安装好的Linux虚拟机,使其达到可以开发的程度。 Ubuntu刚安装完毕之后,还无法进行开发,...

良许Linux
今天
0
0
(三)Nginx配置·续

概述 前文写了关于Nginx环境配置,但是还没有完,接下来将会继续讲三个相关的配置 主要是以下三个 1.Nginx访问日志 2.Nginx日志切割 3.静态文件不记录日志和过期时间 Nginx访问日志 1.先看看...

杉下
今天
1
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部