Learning JavaScript - JavaScript Essentials for Modern Application Development by Ethan Brown

IT 技术书籍 IT Technical Books 阅读详情

Learning JavaScript JAVASCRIPT ESSENTIALS FOR MODERN APPLICATION DEVELOPMENT by Ethan Brown


我的GitHub 文件: https://github.com/Li-YangZhong/learning_javascript_by_ethan_brown

I certainly hold no animosity toward amateurs: everyone has to start somewhere, programming is a profitable skill, and a career in programming has many advantages.
To the new programmer, the amateur, I say this: there is no shame in being an amateur. There is some shame in staying an amateur (if you make programming your profession, certainly). If you want to practice programming, practice it. Learn everything you can, from every source you can. Keep an open mind and—perhaps most importantly—question everything. Question every expert. Question every experienced programmer. Constantly ask “Why?”
You are learning JavaScript at a very exciting time. The Web is leaving its infancy (technically speaking), and web development isn’t the confusing, complicated Wild West that it was 5 and 10 years ago. Standards like HTML5 and ES6 are making it easier to learn web development, and easier to develop high-quality applications.
Node.js is extending the reach of JavaScript beyond the browser, and now it is a viable choice for system scripting, desktop application development, backend web development, and even embedded applications.


Cascading Style Sheets (CSS) also use JavaScript syntax for block comments (inline comments are not supported in CSS).
HTML (like CSS) doesn’t have inline comments, and its block comments are different than JavaScript. They are surrounded by the unwieldy <!-- and -->


Ctrl+Shift+J /*open and close Console in the Chrome browser*/


https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js

From https://www.bootcdn.cn/jquery/


To create a subdirectory called test, type:

$ mkdir test

Two periods .. are a shortcut for “parent directory.” So to go “up” a directory, type:

$ cd .. 

Beginners are often confused by git add; the name makes it seem like you’re adding files to the repository. Those changes can be new files, but just as likely they’re changes to files already in the repository. In other words, you’re adding changes, not files (and a new file is just a special type of change).


verify that npm and Node are functioning on your system using the following commands:

node -v
npm -v

Install the popular Underscore package to see how it works by running the following:

$ npm install underscore 

If we wanted to install a specific version of Underscore, we can specify the version number explicitly:

$ npm install underscore@1.8.0 

When you install local packages, you should add either the--saveor--saveDevflag; if you don’t, the package will be installed, but not listed in the package.json file.


Eric@Lenovo MINGW64 /d/sync_with_github/learning_javascript_by_ethan_brown (master)

$ npm init

This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See npm help json for definitive documentation on these fields
and exactly what they do.

Use npm install <pkg> afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (learning_javascript_by_ethan_brown)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository: (https://github.com/Li-YangZhong/learning_javascript_by_ethan_brown.git)
keywords:
author:
license: (ISC)
About to write to D:\sync_with_github\learning_javascript_by_ethan_brown\package.json:

{
  "name": "learning_javascript_by_ethan_brown",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Li-YangZhong/learning_javascript_by_ethan_brown.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/Li-YangZhong/learning_javascript_by_ethan_brown/issues"
  },
  "homepage": "https://github.com/Li-YangZhong/learning_javascript_by_ethan_brown#readme"
}

Is this OK? (yes)

The idea of dependency management is that the dependency versions referenced in package.json are all that’s necessary to re-create (download and install) the dependencies themselves.


使用npm init命令创建package.json


使用npm install --save underscore将安装的module的信息写入package.json文件


使用npm install命令重新下载安装所有package.json文件中包含的modules


First, you’ll install Gulp globally with:

$ npm install -g gulp 

You’ll only need to install Gulp globally once for each system you develop on. Then, for each project, you’ll need a local Gulp, so from your project root, run npm install --save-dev gulp (Gulp is an example of a dev dependency: your app won’t need it to run, but you’ll use it to help with your development process).


Eric@Lenovo MINGW64 /d/sync_with_github/learning_javascript_by_ethan_brown (master)


$ cnpm install -g gulp


Downloading gulp to C:\Users\Eric\AppData\Roaming\npm\node_modules\gulp_tmp
Copying C:\Users\Eric\AppData\Roaming\npm\node_modules\gulp_tmp\_gulp@4.0.2@gulp to C:\Users\Eric\AppData\Roaming\npm\node_modules\gulp
Installing gulp's dependencies to C:\Users\Eric\AppData\Roaming\npm\node_modules\gulp/node_modules
[1/4] vinyl-fs@^3.0.0 installed at node_modules\_vinyl-fs@3.0.3@vinyl-fs
[2/4] gulp-cli@^2.2.0 installed at node_modules\_gulp-cli@2.2.0@gulp-cli
platform unsupported glob-watcher@5.0.3 › chokidar@2.1.8 › fsevents@^1.2.7 Package require os(darwin) not compatible with your platform(win32)
[fsevents@^1.2.7] optional install error: Package require os(darwin) not compatible with your platform(win32)
[3/4] glob-watcher@^5.0.3 installed at node_modules\_glob-watcher@5.0.3@glob-watcher
[4/4] undertaker@^1.2.1 installed at node_modules\_undertaker@1.2.1@undertaker
All packages installed (287 packages installed from npm registry, used 7s(network 7s), speed 394.44kB/s, json 268(356.75kB), tarball 2.2MB)
[gulp@4.0.2] link C:\Users\Eric\AppData\Roaming\npm\gulp@ -> C:\Users\Eric\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js

https://docs.npmjs.com/uninstalling-packages-and-dependencies


https://babeljs.io/docs/en/usage


There are several JavaScript linters out there, but my preference is Nicholas Zakas’s ESLint. Install ESLint:

npm install -g eslint 

Before we start using ESLint, we need to create an .eslintrc configuration file for our project. Each project you work on may have different technologies or standards, and the .eslintrc allows ESLint to lint your code accordingly.
The easiest way to create an .eslintrc file is to run eslint --init, which will interactively ask you some questions and create a default file for you.


Variables, constants, and literals are the mechanisms available to us in JavaScript for holding data.


A variable is essentially a named value, and as the name implies, the value can change at any time.


let specifically declares a variable, and you can only do it once.


It is conventional (but not required) for constants that refer to a specific number or string to be named with all uppercase letters and underscores. This makes them easy to spot in your code, and is a visual cue that you shouldn’t try to change their value.


The advantage of using constants is that it makes it harder to accidentally change the value of something that shouldn’t be changed.


Identifiers’ naming rules:
• Identifiers must start with a letter, dollar sign ($), or underscore (_).

• Identifiers consist of letters, numbers, the dollar sign ($), and underscore (_).

• Unicode characters are allowed (for example, π or ö).

• Identifiers cannot be a reserved word.

Note that the dollar sign is not a special character the way it is in some other languages: it’s simply another character you can use in identifier names (many libraries, such as jQuery, have taken advantage of this, and used the dollar sign by itself as an identifier).


The word literal means that you’re providing the value directly in the program. Essentially, a literal is a way to create a value; JavaScript takes the literal value you provide and creates a data value from it.


JavaScript is able to distinguish the identifier from the literal by the use of quotation marks (numbers don’t need any sort of quotation because identifiers can’t start with a number).


You can use a literal anywhere you can use an identifier (where a value is expected).


In JavaScript, values are either primitives or objects. Primitive types (such as string and number) are immutable.

There are six primitive types:
• Number
• String
• Boolean
• Null
• Undefined
• Symbol


the primitive types number, string, and boolean have corresponding object types, Number, String, and Boolean. These corresponding objects don’t actually store a value (that’s what the primitive does), but rather provide functionality that’s related to the corresponding primitive.


No matter what literal format you use (decimal, hexadecimal, exponential, etc.), the number that gets created is stored in the same format: a double.


Strings in JavaScript represent Unicode text. Unicode is a computing industry standard for representing text data, and includes code points for every character or symbol in most known human languages (including “languages” that might surprise you, such as Emoji).


In JavaScript, string literals are represented with single quotes, double quotes, or backticks.2 The backtick was introduced in ES6 to enable template strings.


Quotation marks can be escaped with a backslash\


人生很短,千万别将就。


The contents of an object are called properties (or members), and properties consist of a name (or key) and value. Property names must be strings or symbols, and values can be any type (including other objects).


We mentioned earlier in this chapter that numbers, strings, and booleans have corresponding object types (Number, String, and Boolean). These objects serve two purposes: to store special values (such as Number.INFINITY), and to provide functionality in the form of function. Consider the following:

const s = "hello";
s.toUpperCase(); // "HELLO"

This example makes it look like s is an object (we accessed a function property as if it were). But we know better: s is a primitive string type. So how is this happening?
What JavaScript is doing is creating a temporary String object (which has a function toUpperCase, among others). As soon as the function has been called, JavaScript discards the object. To prove the point, let’s try to assign a property to a string:

const s = "hello";
s.rating = 3; 	// no error...success?
s.rating; 	// undefined

JavaScript allows us to do this, making it seem like we’re assigning a property to the string s. What’s really happening, though, is that we’re assigning a property to the temporary String object that’s created. That temporary object is immediately discarded, which is why s.rating is undefined.


In JavaScript, arrays are a special type of object. Unlike regular objects, array contents have a natural order (element 0 will always come before element 1), and keys are numeric and sequential.


JavaScript Object Notation (JSON), a JavaScript-like data syntax used quite frequently, does not allow trailing commas.


A block statement is just a series of statements enclosed in curly braces that is treated by JavaScript as a single unit.


Broadly speaking, control flow can be broken into two subcategories: conditional (or branching) control flow and loop control flow. Conditional control flow (if and
if…else, and switch) represent a fork in the road: there are two or more paths to take, and we take one, but we don’t double back. Loop control flow (while, do…while, and for loops) repeat their bodies until a condition is met.


A block statement is a statement…so wherever you can use a statement, you can use a block statement.


A for loop can always be written as a while loop. In other words:

for([initialization]; [condition]; [final-expression])
statement

is equivalent to:

[initialization]
while([condition]) {
	statement
	[final-expression]
} 

The advantage of the for loop is that all of the loop control information is right there on the first line, making it very clear what’s happening. Also, with a for loop, initializing variables with let confines them to the body of the for loop ; if you convert such a for statement to a while statement, the control variable(s) will, by necessity, be available outside of the loop body.


An expression is a special kind of statement that evaluates to a value.


I was quite surprised to encounter the following passage in Code Complete:

Pat yourself on the back for reading this book. You’re already learning more than most people in the software industry because one book is more than most programmers read each year (DeMarco and Lister 1999). A little reading goes a long way toward professional advancement. If you read even one good programming book every two months, roughly 35 pages a week, you’ll soon have a firm grasp on the industry and distinguish yourself from nearly everyone around you.

From https://blog.codinghorror.com/programmers-dont-read-books-but-you-should/


JavaScript considers the following values to be falsy:
• undefined
• null
• false
• 0
• NaN
• ‘’ (an empty string)


If you need the exclusive OR (XOR) of two variables x and y, you can use the equivalent expression(x || y) && x !== y.


JavaScript is often described as a prototype-based language — to provide inheritance, objects can have a prototype object, which acts as a template object that it inherits methods and properties from.
An object’s prototype object may also have a prototype object, which it inherits methods and properties from, and so on. This is often referred to as a prototype chain, and explains why different objects have properties and methods defined on other objects available to them.
From https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes


The first step to writing robust, high-quality software is acknowledging that it will have errors. The second step is anticipating those errors and handling them in a reasonable fashion.


It’s very common to name functions that return a boolean (or are designed to be used in a boolean context) with an initial is.


A common way to achieve asynchronous execution is to pass a function (usually called a callback, and often abbreviated cb) into another function. This function is invoked (called) when the enclosing function is done with whatever it’s doing.


https://momentjs.com/
https://momentjs.com/timezone/docs/


Numeral.js
A javascript library for formatting and manipulating numbers.

From http://numeraljs.com/


SleepPhones is a headband that goes over your eyes and ears and that has inside two ultraflat earphones so you can listen to books as you fall asleep.


一份用代码写出来的简历
http://gloony.me/


All jQuery methods return a jQuery object, which allows you to chain calls. Chaining allows for very powerful and compact manipulation of multiple elements.


The official documentation is comprehensive, but can be daunting for the beginner. Shelley Powers’ Learning Node is a good place to start if you’re interested in Node development.


Two ways of accessing object properties (member access with dot notation, and computed member access with square brackets)


Other learning resources:

Where MDN is a great HTML reference, if you’re new to HTML5 (or even if you’re not), you should read Mark Pilgrim’s Dive Into HTML5. WHATWG maintains an excellent “living standard” HTML5 specification; it is usually where I turn first for really hard-to-answer HTML questions. Finally, the official specifications for HTML and CSS are located on the W3C website; they are dry, difficult-to-read documents, but sometimes it’s your only recourse for the very hardest problems.


To track the availability of ES6 features in Node (and various browsers), see the excellent guide maintained by @kangax.
http://kangax.github.io/compat-table/es6/


The Node documentation is very high-quality and comprehensive, and it should be your first choice for authoritative documentation about Node modules (such as http, https, and fs). The npm documentation is comprehensive and useful, particularly the page on the package.json file.


The Mozilla Developer Network (MDN) maintains an excellent, thorough, up-to-date, and free online JavaScript reference, which will be referenced liberally throughout this book.
https://developer.mozilla.org/en-US/docs/Web/JavaScript


ECMAScript® 2015 Language Specification

From http://www.ecma-international.org/ecma-262/6.0/


https://2ality.com/p/about.html

https://nolanlawson.com/

https://davidwalsh.name/

http://perfectionkills.com/


https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet


重难点
mixin
prototype
__proto__
Symbol
closure
Scope
.then and .catch handler of Promise
event propagation
Object.keys

deprecate node-sass@4.9.0 › request@~2.79.0 request has been deprecated, see https://github.com peerDependencies WARNING sass-loader@6.0.6 requires a peer of node-sass@^4.0.0 but none was installed peerDependencies WARNING svg-sprite-loader@3.7.3 › svg-baker@1.7.0 › postcss-prefix-selector@^1.6.0 requires a peer of postcss@7.x || 8.x but postcss@5.2. 阅读详情

相关推荐

Learning JavaScript(O'Reilly,3ed,2016)

This is an exciting time to learn JavaScript. Now that the latest JavaScript specification—ECMAScript 6.0 (ES6)—has been finalized, learning how to develop high-quality applications with this language is easier and more satisfying than ever. This practical book takes programmers (amateurs and pros alike) on a no-nonsense tour of ES6, along with some related tools and techniques. Author Ethan Brown (Web Development with Node and Express) not only guides you through simple and straightforward topics (variables, control flow, arrays), but also covers complex concepts such as functional and asynchronous programming. You’ll learn how to create powerful and responsive web applications on the client, or with Node.js on the server. Use ES6 today and transcompile code to portable ES5 Translate data into a format that JavaScript can use Understand the basic usage and mechanics of JavaScript functions Explore objects and object-oriented programming Tackle new concepts such as iterators, generators, and proxies Grasp the complexities of asynchronous programming Work with the Document Object Model for browser-based apps Learn Node.js fundamentals for developing server-side applications

23 个学习 JavaScript 的地方

来源 | https://javascript.plainenglish.io/23-place-to-learn-javascript-2022-7c6b854928c2写在前面一直以来...

web前端开发 1434

Modern JavaScript Applications

The book begins by covering an enterprise-level application with the microservices architecture, using Node.js to build web services. As we move forward, the book shows you how to build a browser-browser application using WebRTC. We then focus on building a real-time web application with WebSockets. When you've gained a solid grip on the different architectures, you'll see how to write better reactive code using functional reactive programming (FRP). Then, we'll move onto what's new in Bootstrap 4 and how it makes it easier then ever to build responsive sites. As we near the end of this book, you'll see how to build a modern single-page application that builds on the innovative component-based architecture using React and Angular 2. After reading this book, you will have a solid knowledge of the latest JavaScript techniques, tools, and architecture required to build modern web apps.

Learning Javascript

JavaScript is all about creating behaviours and data interactions by accessing the DOM. When using it? You want to make sure that he behavior you're trying to accomplish cannot be done better eith ...

weixin_30909575的博客 208

SCHUNK SVH五指灵巧手 | 熵洛智能

雄克仿真五指机械手产品系列可以如人手操作那般完美地完成抓取操作。电子装置完全集成于腕关节中,使五指机械手几乎可以完成所有的人体手部动作。凭借带有9个驱动器的运动指骨,机械手可高精度地 执行多种抓取操作。富有弹性的抓取表面确保了对物体的可靠抓取。除了开启抓取和操作任务的全新领域之外,雄克还为在五指机械手的手势基础上进行人与机器人的交流开创了无限可能。编辑切换为居中添加图片注释,不超过 140 字(可选)产品特点:机械手有左手或右手两种版本适合移动应用耗能低,使用 24 V DC 在腕关节处完整集成了控制、调节

ShannonTech的博客 1335

贝叶斯神经网络(Bayesian Neural Network)

最近在研究贝叶斯神经网络,一些概念一直搞不清楚,这里整理一下相关内容,方便以后查阅。

梁小憨憨的博客 3657

【前端开发】在windows 10上安装gulp(详细讲解)

文章目录一、Node.js1.安装node.js(1)下载nodejs(官方免费)Ⅰ.说明Ⅱ.详细安装步骤(2)将node.js添加到环境变量(安装nodejs时已添加,只为后文添加环境变量使用)Ⅰ.环境变量路径Ⅱ.添加环境变量(3)运行DOS窗口Ⅰ.概念Ⅱ.打开命令行Ⅲ.常用dos命令(cmd和powershell通用)Ⅳ.输入命令2.新建文件夹3.使用npm(仅为介绍cnpm的使用做铺垫)4.安装cnpm(代替npm,因npm在国内使用不稳定)(1)说明(2)安装cnpmⅠ.说明Ⅱ.以管理员身份运行DO

qq_46523052的博客 2192

MagicDraw小白必看:BDD图中模块的5种属性详解(含SysML v1.6最新端口配置指南)

本文面向MagicDraw初学者,详细解析SysML BDD图中模块的五种核心结构属性,包括组成部分、引用、值、约束属性及端口。重点阐述了SysML v1.6中端口设计的范式转移,对比了完整端口与代理端口的区别与应用场景,并通过实战案例指导如何利用代理端口进行清晰的接口定义与系统架构设计。

rum55的博客 374

JavaScript-Learning(中英文)

JavaScript Leaning Notes This note is what I learned from “The Complete JavaScript Course 2018: Build Real Projects”. What you’ll learn: Go from a total beginner to an advanced JavaScript developer C...

weixin_36291531的博客 392

利用WI生成无线信道数据

选取DeepMIMO的一个射线追踪场景O1(Outdoor 1)Scenario,工作频率为3.5GHz。有两条街和一个十字路口的户外场景18个基站和超过一百万个用户18个基站(BSs):BS1-BS18.每个基站的高度是8米每个基站的天线阵列是isotropic天线三个统一的x-y用户网格用户的总计数量为:1184923每个用户网格中的第一个用户总是(x,y)坐标最低的用户 所有用户的高度是2m每个用户的每个天线阵列是isotropic天线定义射频追踪场景。

bingbingaidaima的博客 5610

Linux Wireless之80211(nl80211, cfg80211, mac80211)

Linux Wireless之80211(nl80211, cfg80211, mac80211)前言在Linux无线子系统中,cfg80211、mac80211和nl80211是三个关键的组件,它们共同工作以实现对802.11设备的配置和管理。cfg80211负责内核空间的通用API,mac80211负责具体的MAC层实现,而nl80211则作为用户空间与内核空间之间的桥梁,用于配置管理和通信。Netlink 是一个 Linux 中的 socket 类型,用于在内核与用户空间之间传递事件。

DD'Notes 1484

npm/cnpm install 报错 platform unsupported

问题描述 : platform unsupported babel-loader@7.1.4 › webpack@3.12.0 › watchpack@1.6.0 › cho kidar@2.0.3 › fsevents@^1.1.2 Package require os(darwin) not compatible with you r platform(win32)[fsevent...

aopiwu0435的博客 2702

【N32L40X】学习笔记12-规则组+注入组+外部触发启动

使用定时器触发规则通道开始采集数据,采集完成后使用dma传输数据,并启动注入通道转换数据,注入通道转换完成后产生中断,中断中读物注入通道数据。

Car12 424

npm install gulp安装报错问题

npm install gulp --save安装报错问题 npm ERR! code ENOENT npm ERR! syscall stat npm ERR! path C:\Users\ASUS\.WebStorm2019.1\system\projectGenerators\vue\https:\registry.npm.taobao.org\vue\download\vue-2.6.11.tgz?cache=0&sync_timestamp=1594227470527&other_

小青柑的博客 3214

史上最牛逼的导航网站(很全很详细)

今天,给大家推荐47个聚合型的导航网站 每一个都收录上百个网站,1个能顶100个,丝毫没有夸张的成分。 (推荐收藏) 设计师导航网站 01 优设导航 https://hao.uisdc.com/ 设计师必备的导航网站,包含设计工具、素材资源、字体设计、配色方案、酷站模板等。 界面清晰无广告,收录网站超过520个。 02 设计导航 http://h...

孙叫兽的博客 7万+

Python爬虫深度对抗:拼多多与得物价格监控系统中的设备指纹模拟与SkyWalking风控绕过实战

在电商数据采集领域,拼多多和得物(毒)APP堪称国产风控系统的“双子星”。前者依托于拼多多集团强大的安全团队,后者则以其独特的“潮流单品”数据价值和高昂的爬取成本闻名。对于任何一名爬虫工程师而言,能够稳定、高效地获取这两大平台的价格、库存、销量等动态信息,都是一项极具挑战性的技术试金石。传统的基于requests库的简单HTTP请求,在面对这两款应用时几乎寸步难行。你会发现,无论怎样伪造User-Agent、怎样轮换代理IP,返回的永远是状态码412403,或者是一个包含验证滑块设备异常的JSON错误。

2201_76125261的博客 866

npm install 遇到watchpack版本问题

optional install error: Package require os(darwin) not compatible with your platform(win32) 问题描述: cnpm install 报错: / [20/51] Installing safe-buffer@^5.0.1[fsevents@~2.1.2] optional install error: Package require os(darwin) not compatible with your platform

weixin_40769123的博客 2282

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

js中函数声明与函数表达式的区别以及立即执行函数

最近在写代码时遇到了闭包,其中闭包又和立即执行函数(immediately invoked function expression, aka IIFE)有点关系,于是牵扯除了函数声明以及函数表达式,我感觉中文的很多文章写的不太好,查阅了mdn的function指南和这篇关于IIFE的文章,觉得写的很好,整合一下。 Firstly, in ...

weixin_33755554的博客 157

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

收集并验证传输

培训班是不教传输的,因为他们开发机和生产机是一体的。但传输很能判断一个BW的功底。 Some Additional Tips for Collecting & Validating Transports 发贴人 Arun Purohit 在 SAP Business Warehouse 打开 2015-3-14 9:28:02 inShare10

Bruce_yin的专栏 458

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

如何安装gulp

1、安装gulpC:\Users\Administrator.USER-0GUONPPBHK&gt;cnpm install --global gulp Downloading gulp to D:\nodejs\node_modules\gulp_tmp Copying D:\nodejs\node_modules\gulp_tmp\_gulp@3.9.1@gulp to D:\nodejs\n...

游海东的技术专栏 1559

gulp 4.0版本踩坑1

gulp 4.0以上用wach 的时候 1, 需要引入gulp-wtach 文件 var watch = require('gulp-watch') 2, 引入文件之后,在使用watch的时候,不需要用gulp.watch() 而是直接使用watch()函数就可以了,要不然会出现只能监听一次,后面你再怎么改,也不会变。 gulp.task('watch',function () { ...

480

gulp运行时由于express版本导致的问题

es6pro\server\node_modules\express\lib\express.js:99 throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please see https://...

qq_34258593的博客 959

windows10搭建gulp环境

1. glup简介 2. NodeJS简介与安装 Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境。 官网:https://nodejs.org/en/,中文参考文档链接:http://nodejs.cn/api/ 从官网下载,我这边下载12.18.2 LTS的zip,直接解压缩。 1)解压后如下图: 2)新建两个目录 node-global :npm全局安装位置 node-cache:npm 缓存路径 如下图: 3)执行命令 np

Fan0920的专栏 853

node升级为v12.x 和 Gulp升级为v4.x后,遇到的问题集合

最近升级了node版本到14,重新运行gulp的时候,遇到问题: X:\Users\xiong\git\my-app>gulp default [16:24:14] Working directory changed to ~\git\my-app fs.js:45 } = primordials; ^ ReferenceError: primordials is not defined at fs.js:45:5 at req_ (X:\Users\xiong\gi.

smart_dream 2925

Vue环境搭建

1)需要安装node.js,这里我们就不具体说了,下载后,一直下一步就可以了。 【附node.js安装:】 http://www.runoob.com/nodejs/nodejs-install-setup.html$ node -v v7.6.01)安装淘宝cnpm npm install -g cnpm –registry=http://registry.npm.taobao.org2)

一掬净土 6430
上一篇: 将Firefox浏览器的界面语言设置为英文
下一篇: 深入理解JavaScript中的对象和原型(Objects and Prototypes In-depth)
CodingIsFun
博客等级 码龄8年 37粉丝 240原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值