Node.js
https://nodejs.org
https://nodejs.org/en/download/ win: msi mac: pkg linux: tar.xz source code: tar.gz
Latest
https://nodejs.org/dist/v6.3.1/node-v6.3.1-x64.msi
https://nodejs.org/dist/v6.3.1/node-v6.3.1.pkg
https://nodejs.org/dist/v6.3.1/node-v6.3.1-linux-x64.tar.xz
https://nodejs.org/dist/v6.3.1/node-v6.3.1.tar.gz v4.4.7 LTS
https://nodejs.org/dist/v4.4.7/node-v4.4.7-x64.msi
https://nodejs.org/dist/v4.4.7/node-v4.4.7.pkg
https://nodejs.org/dist/v4.4.7/node-v4.4.7-linux-x64.tar.xz
https://nodejs.org/dist/v4.4.7/node-v4.4.7.tar.gz Homebrew: sudo brew install node
Apt-get: sudo apt-get install nodejs npm
---------------------
CNPM
在国内用来代替npm的工具
$ npm install -g cnpm --registry=https://registry.npm.taobao.org TypeScript
https://github.com/Microsoft/TypeScript
http://www.typescriptlang.org
$ npm install -g typescript
$ tsc -v
$ tsc -w helloworld.js (按Ctrl+C退出)
在目录中初始化
$ tsc -init
$ tsc -w --newLine LF typings(The TypeScript Definition Manager)
代替tsd的工具: https://github.com/typings/typings/blob/master/docs/tsd.md
1. tsd install react --save
You would now:
typings install dt~react --global --save
2. tsd query react
becomes:
typings search react
$ npm install typings --global
在当前目录(项目)中安装angular和jquery的dt文件
$ typings install dt~angular --global --save
$ typings search --name jquery
$ typings install dt~jquery --global --save TSLint
$ npm install -g tslint typescript
$ tslint --init ESLint
$ npm install -g eslint
配置
$ npm init
...
name: (workdir)
version: (1.0.0)
description:
entry point: (main.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to path/to/package.json:
...
$ eslint --init
? How would you like to configure ESLint? Answer questions about your style
? Are you using ECMAScript 6 features? Yes
? Are you using ES6 modules? Yes
? Where will your code run? Node
? Do you use JSX? Yes
? Do you use React Yes
? What style of indentation do you use? Spaces
? What quotes do you use for strings? Double
? What line endings do you use? Unix
? Do you require semicolons? Yes
? What format do you want your config file to be in? JSON
... 简述如下:
$ mkdir ProjectName # 创建项目目录,然后下面是初始化
$ npm init
$ eslint --init
$ tsc -init
$ tslint --init
$ code . # 用VSCode(建议安装ESLint、TSLint扩展)打开
# mac系统可以将code手动ln到/usr/local/bin下:
$ ln -s /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code /usr/local/bin/code ----------------
Bower
$ npm install -g bower 安装react
先进入工作目录,然后输入下面命令会下载react到bower_components目录
$ bower install react
$ touch index.html
$ code . VSCode 需要安装的扩展和组件
扩展:Reactjs snippets或者React Standard Style code snippets,代码片段
扩展:Path Intellisense,能方便在代码中提供路径智能提示
扩展:HTML Snippets,提供html支持
扩展:React Native Tools,调试Android/iOS的React原生项目,提供智能提示,需要安装react-native-cli
$ npm install -g react-native-cli BABEL
http://babeljs.io
https://github.com/babel/babel
CLi
http://babeljs.io/docs/setup/#installation
$ npm install --save-dev babel-cli
ES2015
$ npm install --save-dev babel-preset-es2015
Polyfill
$ npm install --save-dev babel-polyfill
JSX and Flow
$ npm install --save-dev babel-preset-react

Nodejs + TypeScript的更多相关文章

  1. nodejs typescript怎么发送get、post请求,如何获取网易云通信token

    nodejs typescript怎么发送get.post请求,如何获取网易云通信token yarn add jshashesyarn add superagent检查语法yarn lint==== ...

  2. nodejs + typescript + koa + eslint + typescript eslint + prettier + webstorm

    ESLint 安装 yarn add -D eslint 生成配置文件 yarn eslint --init cli 选项 How would you like to use ESLint? To c ...

  3. nodejs + typescirpt + vs code

    参考: 基于Nodejs生态圈的TypeScript+React开发入门教程 NPM install -save 和 -save-dev 傻傻分不清 使用typescript开发node js Typ ...

  4. Serverless 实战 —— 函数计算 + Typescript 实践

    前言 首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute):函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传.函数计算准 ...

  5. jira webhook 事件触发并程序代码调用jenkins接口触发构建操作

    要解决的问题 开发管理工具触发站点构建事件,事件处理中需要调用Jenkins接口开始构建动作. 我的应用场景: 使用jira作为管理工具,在jira中创建自定义的工作流来规定测试,上线,发布等流程,并 ...

  6. 专访阿里云 Serverless 负责人:无服务器不会让后端失业

    2012 年,云基础设施服务提供商 Iron.io 的副总裁 Ken 谈到软件开发行业的未来,首次提出了 Serverless 的概念,为云中运行的应用程序描述了一种全新的系统体系架构.此后,以 AW ...

  7. Nodejs生态圈的TypeScript+React

    基于Nodejs生态圈的TypeScript+React开发入门教程   基于Nodejs生态圈的TypeScript+React开发入门教程 概述 本教程旨在为基于Nodejs npm生态圈的前端程 ...

  8. 基于Nodejs生态圈的TypeScript+React开发入门教程

    基于Nodejs生态圈的TypeScript+React开发入门教程   概述 本教程旨在为基于Nodejs npm生态圈的前端程序开发提供入门讲解. Nodejs是什么 Nodejs是一个高性能Ja ...

  9. es6模块 nodejs模块和 typescript模块

    es6模块 import和export nodejs模块 require和module.exports typescript模块 module和export

随机推荐

  1. Testlink安装访问提示“应用程序DEFAULT WEB SITE”中的服务器错误

    错误摘要:HTTP错误403.14 - ForbiddenWeb服务器被配置为不列出此目录的内容.

  2. Linux三剑客之老二-------sed命令详解

    sed命令 文件 编辑 本文索引 [隐藏] sed的选项.命令.替换标记 选项 参数 sed命令 sed替换标记 sed元字符集 sed用法实例 替换操作:s命令 全面替换标记g 定界符 删除操作:d ...

  3. speech sdk 文字转语音

    1.下载SDK包 https://www.microsoft.com/en-us/download/details.aspx?id=10121 2.直接上代码 // SpeechRecognition ...

  4. Linux介绍和基本命令

    Linux是什么? 就是运行在硬件之上的一组软件,主要控制内核和系统调用这2个层面为上层应用软件提供各种接口,并高效的控制硬件资源,与window一样是一种操作系统 Linux的创始人是林纳斯-托瓦兹 ...

  5. HDU 3591 多重背包

    给出N种钱币和M 给出N种钱币的面值和个数 NPC拿着这N些钱币去买价值M的物品,能够多付.然后被找零,找零的钱也为这些面值.但没有数量限制 问最少经手的钱币数量 对于NPC做一个付款多重背包 然后对 ...

  6. MySQL安装后的设定及其变量(参数)的设置

    1.为所有root用户设定密码:mysql> SET PASSWORDmysql> update mysql.user SET password=PASSWORD("your_p ...

  7. rar 7z文件打包

    把D:\file目录下的所有东西打包为file.rar放到D:\目录下, Rar.exe是放在c盘根目录下 >>C:\Rar.exe a -k -r -s -m1 D:\file.rar ...

  8. 17南宁区域赛 I - Rake It In 【DFS】

    题目链接 https://nanti.jisuanke.com/t/19975 题意 Alice 和 Bob 玩游戏 在一个4x4 的方格上 每个人 每次选择2x2的区域 将里面的四个值求和加到最后的 ...

  9. 023_数量类型练习——Hadoop MapReduce手机流量统计

    1) 分析业务需求:用户使用手机上网,存在流量的消耗.流量包括两部分:其一是上行流量(发送消息流量),其二是下行流量(接收消息的流量).每种流量在网络传输过程中,有两种形式说明:包的大小,流量的大小. ...

  10. mybatis 一次执行多条SQL

    在默认情况下,一次性发过去的多条sql是不合法的. 想要让mysql一次执行多条sql语句,必须进行手动设置. 让mysql驱动开启批量执行sql的开关. 怎么开启呢?在拼装mysql链接的url时, ...