04 2021 档案
摘要:先托管到GitHub echo node_modules > .gitnore //忽略 node_modules git init //初始化空仓库 git status //查看git状态 git add . //添加当前目录下的文件 git commit -m "feat: initial c
阅读全文
摘要://创建一个生成器 创建文件 mkdir generator-sample cd ./generator-sample yarn init --初始化package.json文件 yarn add yeoman-generator --添加一个yeoman-generator生成器的基类, 提供了一
阅读全文
摘要:yarn global add yo 安装yeoman yarn global add generator-node --安装名为node的生成器 yo node -- 安装运行生成器 yo node:cli --生成脚手架 yarn link -- 生成全局命令行模块 yarn --安装JS依赖
阅读全文
摘要:通常说:如果在对象上没找到对应的属性或方法,引擎就会继续在[[Prototype]]关联的对象是上去进行查找,同理,如果后者的也没有找到需要的属性就会继续查找他的[[Prototype]],以此类推,这一系列对象的链被称为“原型链” 《你不知道的JS》-- 上
阅读全文
摘要:var obj = { id: "awesome", cool: function coolFn() { console.log(this.id); } }; var id = "not awesome" obj.cool(); // 酷 this指向obj setTimeout(obj.cool,
阅读全文

浙公网安备 33010602011771号