Giter Club home page Giter Club logo

webpack's Introduction

webpack

4.x + 5

webpack 4.x

npm init … 可以一直点 / npm init-y
name:项目名字
version:项目版本号
description:对这个项目的描述,或者描述使用 webpack 的那些功能
entry point:入口文件名
test command:测试时候的命令
git repository:git 上面的仓库名
keywords:关键词
author:作者名字
license:许可证
全局安装: npm i webpack webpack-cli -g
本地安装: npm i webpack webpack-cli -s

-S就是--save的简写 测试阶段 -D就是--save-dev的简写 开发阶段

全局安装: https://www.webpackjs.com/guides/getting-started/
本地安装+卸载: https://segmentfault.com/q/1010000015200625;


webpack 5


TypeScript

  1. 安装编译 TS 的工具包 npm i -g typescript

  2. 验证 TS 是否安装成功 tsc -v

简化运行 TS 的步骤 每次修改代码后,都要重复执行两个命令,才能运行 TS 代码,我们可以直接使用 ts-node 工具包,直接在 node.js 中执行 TS 代码。

安装命令:npm i -g ts-node

使用方式:ts-node hello.ts

webpack's People

Contributors

tjt740 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.