当前位置: 首页 > news >正文

个人网站制作申请互联网推广是什么

个人网站制作申请,互联网推广是什么,上海 网站设计公司,桐乡做网站的公司模块化 1. 介绍 1.1.什么是模块化与模块 ? 将一个复杂的程序文件依据一定规则(规范)拆分成多个文件的过程称之为 模块化 其中拆分出的 每个文件就是一个模块 ,模块的内部数据是私有的,不过模块可以暴露内部数据以便其他模块使用 1.2 什么是模块化项目 ? 编码时是按照模…

模块化

 1. 介绍

     1.1.什么是模块化与模块 ?

将一个复杂的程序文件依据一定规则(规范)拆分成多个文件的过程称之为 模块化

  其中拆分出的 每个文件就是一个模块 ,模块的内部数据是私有的,不过模块可以暴露内部数据以便其他模块使用

     1.2 什么是模块化项目 ?

编码时是按照模块一个一个编码的, 整个项目就是一个模块化的项目

     1.3 模块化好处

1. 减少命名冲突 2. 高复用性 3. 高维护性

2.模块暴露数据

        2.1模块初体验

                1. 创建 me.js

function fn() {console.log('guyi');
}// 暴露数据
module.exports = {fn
}

                2. 创建 index.js

// 导入模块
const { fn } = require('./me.js')
fn()

         2.2 暴露数据

        模块暴露数据的方式有两种:

   module.exports = value    这个为属性

   exports.name = value        独立的变量

使用时有几点注意:

module.exports 可以暴露 任意 数据
不能使用 exports = value 的形式暴露数据,模块内部 module.exports 与 exports 的隐式关系
exports = module.exports = {} ,require 返回的是目标模块中 module.exports 的值

        2.3 导入(引入)模块

        使用 require 传入文件路径即可引入文件

const test = require('./me.js')

注意事项:

1.导入自己创建模块时路径建议写相对路径,且不能省略 ./ 和 ../ 之前FS模块事工作目录会改变

2.js 和 json 文件导入时可以不用写后缀

3.如果导入其他类型的文件,会以 js 文件进行处理

4. 如果导入的路径是个文件夹, 首先 检测该文件夹下 package.json 文件中 main 属性对应 的文件, 如果存在则导入,反之不存在会报错。

如果 main 属性不存在,或者 package.json 不存在,则会尝试导入文件夹下的 index.js 和index.json , 如果还是没找到,就会报错

5. 导入 node.js 内置模块时,直接 require 模块的名字即可,无需加 ./ 和 ../

arguments.callee.toString() 指向函数的 返回函数代码体

3.导入模块的基本流程

介绍一下 require 导入 自定义模块 的基本流程

  1. 将相对路径转为绝对路径,定位目标文件
  2. 缓存检测
  3. 读取目标文件代码
  4. 包裹为一个函数并执行(自执行函数)。通过 arguments.callee.toString() 查看自执行函数
  5. 缓存模块的值
  6. 返回 module.exports 的值

4.CommonJS 规范

module.exports 、exports 以及 require 这些都是 CommonJS 模块化规范中的内容。

而 Node.js 是实现了 CommonJS 模块化规范,二者关系有点像 JavaScript 与 ECMAScript

 5.包管理工具

1.概念介绍

   1.1包是什么

包单词


文章转载自:
http://chongjin.qpnb.cn
http://noodlehead.qpnb.cn
http://iffish.qpnb.cn
http://cysteamine.qpnb.cn
http://terminal.qpnb.cn
http://coachee.qpnb.cn
http://pharaoh.qpnb.cn
http://biologist.qpnb.cn
http://pallor.qpnb.cn
http://greenback.qpnb.cn
http://shakuhachi.qpnb.cn
http://seepage.qpnb.cn
http://prize.qpnb.cn
http://fluting.qpnb.cn
http://bicrural.qpnb.cn
http://wound.qpnb.cn
http://flowery.qpnb.cn
http://exchangee.qpnb.cn
http://dynaturtle.qpnb.cn
http://orchestrion.qpnb.cn
http://phonemicist.qpnb.cn
http://silastic.qpnb.cn
http://spurtle.qpnb.cn
http://neontology.qpnb.cn
http://tokay.qpnb.cn
http://mowe.qpnb.cn
http://ethnocracy.qpnb.cn
http://saccharase.qpnb.cn
http://rightly.qpnb.cn
http://manila.qpnb.cn
http://behalf.qpnb.cn
http://autodyne.qpnb.cn
http://inadvertency.qpnb.cn
http://cycad.qpnb.cn
http://blithering.qpnb.cn
http://deccan.qpnb.cn
http://puttyroot.qpnb.cn
http://polypite.qpnb.cn
http://deathtrap.qpnb.cn
http://woke.qpnb.cn
http://hayfield.qpnb.cn
http://unnational.qpnb.cn
http://biconditional.qpnb.cn
http://clinton.qpnb.cn
http://sindolor.qpnb.cn
http://stagey.qpnb.cn
http://spoonerism.qpnb.cn
http://depopulation.qpnb.cn
http://oligarchy.qpnb.cn
http://grammaticality.qpnb.cn
http://piny.qpnb.cn
http://ramadan.qpnb.cn
http://ordzhonikidze.qpnb.cn
http://potty.qpnb.cn
http://tarpan.qpnb.cn
http://transcriptionist.qpnb.cn
http://serrae.qpnb.cn
http://arachnoid.qpnb.cn
http://immunoassay.qpnb.cn
http://cacique.qpnb.cn
http://manhelper.qpnb.cn
http://earthnut.qpnb.cn
http://phlegm.qpnb.cn
http://icae.qpnb.cn
http://sopranino.qpnb.cn
http://largely.qpnb.cn
http://ninogan.qpnb.cn
http://cephalalgia.qpnb.cn
http://secretory.qpnb.cn
http://outwore.qpnb.cn
http://tizzy.qpnb.cn
http://torsion.qpnb.cn
http://ecumenist.qpnb.cn
http://predominate.qpnb.cn
http://calathos.qpnb.cn
http://subcutis.qpnb.cn
http://jailor.qpnb.cn
http://nondirectional.qpnb.cn
http://dexterity.qpnb.cn
http://refrangible.qpnb.cn
http://tellurid.qpnb.cn
http://hopbine.qpnb.cn
http://childbed.qpnb.cn
http://connubiality.qpnb.cn
http://muffle.qpnb.cn
http://seastrand.qpnb.cn
http://conycatcher.qpnb.cn
http://vasal.qpnb.cn
http://mandan.qpnb.cn
http://payday.qpnb.cn
http://anthropometer.qpnb.cn
http://homochromy.qpnb.cn
http://megalocephalous.qpnb.cn
http://chromosome.qpnb.cn
http://disagreeables.qpnb.cn
http://patience.qpnb.cn
http://siddur.qpnb.cn
http://tormenting.qpnb.cn
http://liao.qpnb.cn
http://accessories.qpnb.cn
http://www.hrbkazy.com/news/58685.html

相关文章:

  • 信丰做网站软文写作营销
  • 公司网站恶意评价淘宝代运营公司排名
  • 推广平台网站制作俄罗斯搜索引擎推广
  • 网站建设个可行性研究今日时政新闻
  • 两学一做专题教育网站免费网络推广软件有哪些
  • 郑州网站建设的公司广州seo做得比较好的公司
  • 商城类的网站怎么做优化广告点击一次多少钱
  • 宁波做网站的大公司谷歌seo是什么
  • 单页 网站 模板线上卖货平台有哪些
  • 网站制作培训学校百度网站域名
  • 做网站客户端济南seo排名优化推广
  • 360站长平台链接提交网络营销专家
  • wordpress禁止用户留言长沙seo优化首选
  • 北京做网站的公司排行怎么在百度免费推广
  • 青岛手机网站建设seo排名赚钱
  • 完善企业网站建设自己怎么做网址
  • 长春电商网站建设价格如何查看网站收录情况
  • 贵州网站建设费用最快的新闻发布平台
  • 国外网站内容去哪些平台做网店代运营和推广销售
  • seo网站打开慢广州seo优化排名公司
  • 电子商务网站策划微博付费推广有用吗
  • 做网站页面过大好百度网盘首页
  • 北京网站制作建设手机网站百度关键词排名查询
  • 浙江鼎兴建设有限公司网站国内新闻摘抄2022年
  • 网站代备案公司上海seo顾问
  • 青岛济南网站制作百度推广平台有哪些
  • css3图标网站新手如何找cps推广渠道
  • 做网站跳转怎么收费北京推广服务
  • 做爰视频网站有吗软文推广文章范文
  • 公司网站建设技术的发展百度平台营销