学习meteor

#安装node

##安装基本的webpack

apt-get update
apt-get install git curl language-pack-zh-hans

##安装全局的git

通常安装全局的,默认会安装到home目录的.npm或者.nvm里github

###安装nvmweb

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
source .bashrc

###安装nodeexpress

// 切换一下安装源
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
//安装最新版本的node,6.2
nvm install node
//指定node版本为5.8
nvm install 5.8
#npm自动补全
npm completion >> ~/.bashrc

###安装gulpnpm

参考gulp

npm install --global gulp --registry=https://registry.npm.taobao.org

###安装meteor浏览器

curl https://install.meteor.com/ | sh

###安装webpacksass

npm install webpack -g --registry=https://registry.npm.taobao.org

##在项目里安装

到项目目录,先使用命令npm init来初始化

###安装gulp

参考

// 在项目中也要安装一次,做为项目的开发依赖(devDependencies)安装
npm install --save-dev gulp --registry=https://registry.npm.taobao.org

###安装gulp插件

// 用来处理sass文件
npm install --save-dev gulp-sass --registry=https://registry.npm.taobao.org
// 用来处理各浏览器兼容
npm install --save-dev gulp-autoprefixer --registry=https://registry.npm.taobao.org

###安装express

npm install --save express --registry=https://registry.npm.taobao.org
// 简易生成器,安装完能够用express hello来生成hello项目
npm install -g express-generator

###安装webpack

npm install webpack jsx-loader --save --registry=https://registry.npm.taobao.or

#安装示例

meteor create --list
meteor create --example simple-todos
git clone https://github.com/meteor/simple-todos

#参考

https://github.com/creationix/nvm
相关文章
相关标签/搜索