2016年1月14日 | Leave a comment 问题: 解决: 参考angular2 nodejs npm typescript less grunt 下载安装 nodejs : https://nodejs.org/ 安装 typescript & less & grunt : npm install -g typescript less grunt-cli 1 npm install -g typescript less grunt-cli 创建项目目录 mkdir project; cd project 1 mkdir project; cd project edit package.json { "name":"project", "version":"1.0.0", "scripts":{ "tsc":"tsc", "tsc:w":"tsc -w", "lite":"lite-server", "start":"concurrent \"npm run tsc:w\" \"npm run lite\" " }, "license":"ISC", "dependencies":{ "angular2":"2.0.0-beta.0", "systemjs":"0.19.6", "es6-promise":"^3.0.2", "es6-shim":"^0.33.3", "reflect-metadata":"0.1.2", "rxjs":"5.0.0-beta.0", "zone.js":"0.5.10" }, "devDependencies":{ "concurrently":"^1.0.0", "lite-server":"^1.3.1", "typescript":"^1.7.3" } } 12345678910111213141516171819202122232425 { "name":"project", "version":"1.0.0", "scripts":{ "tsc":"tsc", "tsc:w":"tsc -w", "lite":"lite-server", "start":"concurrent \"npm run tsc:w\" \"npm run lite\" " }, "license":"ISC", "dependencies":{ "angular2":"2.0.0-beta.0", "systemjs":"0.19.6", "es6-promise":"^3.0.2", "es6-shim":"^0.33.3", "reflect-metadata":"0.1.2", "rxjs":"5.0.0-beta.0", "zone.js":"0.5.10" }, "devDependencies":{ "concurrently":"^1.0.0", "lite-server":"^1.3.1", "typescript":"^1.7.3" }} 安装模块启动 npm install && npm start 1 npm install && npm start