【安装】前端主流框架安装

本文介绍了前端开发中如何安装Node.js、npm以及TypeScript。首先,从官方渠道下载并安装集成npm的Node.js,通过cmd验证安装成功。接着,详细讲解了如何使用npm来安装TypeScript,并指导如何通过ng命令检查Angular的安装及版本信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.安装node.js 和npm

  目前新版的node.js 集成了npm。到node.js官网 下载安装即可

  安装完成后,使用cmd(win+r然后输入cmd进入)测试下是否安装成功

 node -v
  npm -v

2. 安装TypeScript

npm install -g typescript

3. 安装Angular 

npm install -g @angular/cli

npm i -g @angular/cli

安装完成后,使用 ng 来查看 angular的命令

Available Commands:
  add Adds support for an external library to your project.
  build (b) Compiles an Angular app into an output directory named dist/ at the given output path. Must be executed from within a workspace directory.
  config Retrieves or sets Angular configuration values in the angular.json file for the workspace.
  doc (d) Opens the official Angular documentation (angular.io) in a browser, and searches for a given keyword.
  e2e (e) Builds and serves an Angular app, then runs end-to-end tests using Protractor.
  generate (g) Generates and/or modifies files based on a schematic.
  help Lists available commands and their short descriptions.
  lint (l) Runs linting tools on Angular app code in a given project folder.
  new (n) Creates a new workspace and an initial Angular app.
  run Runs an Architect target with an optional custom builder configuration defined in your project.
  serve (s) Builds and serves your app, rebuilding on file changes.
  test (t) Runs unit tests in a project.
  update Updates your application and its dependencies. See https://update.angular.io/
  version (v) Outputs Angular CLI version.
  xi18n Extracts i18n messages from source code.

     查看当前angular版本

ng version

 

 

命令行 :

cd foldername   //进入到当前目录下的某个子目录中

cd ..  // 返回到当前目录的上一级目录, 中间有空格

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值