首页 > 编程知识 正文

萧初学入门教程,ps入门教程零基础视频

时间:2023-05-03 18:36:47 阅读:128672 作者:702

npm入门教程:1.初始化项目npm init -y/npm init -force

2 .软件包安装生产阶段软件包: npm install jquery --save安装开发阶段软件包: npm install jquery --save-dev只安装生产环境软件包,软件包在此处,只导入保持-save环境的软件包。 3 .卸载软件包删除生产环境中的软件包。 NPM uninstall jquery--删除save开发环境中的软件包。 npm uninstall jquery -dev删除所有jquery所有软件包。 删除所有npm uninstall jquery软件包。 install删除多个软件包可以连续写入。 要从npmuninstalljquerybootstrapbabel4. package.JSON文件导入软件包,只需要package.JSON文件,并且可以使用npm install命令

5 .全球化安装尽量不要使用全球化安装。 如果出现问题,可以使用yard解决这个问题。 这个问题在windows7上基本上是

出现在上面

命令: npminstallwebpack-g/npminstallwebpack-global

6 .查看已安装列表的命令: npm list

D:神奇宝贝工作室前端 NPM-testnpmlistnpm-test @1.0.0d : 神奇宝贝工作室前端 NPM-test---babebe

7 .版本控制' dev dependencies ' : { ' jquery ' : ' ^3.3.1' } ^3.3. 1显示版本良好的主版本号。 此版本号.修改

包的管理-aplha版本的基础结构尚未确定,将更改较大版本- beta基础结构已经确定,并且会有一些交互式更改。 此版本可用于内部测量,公开测量-rc成熟版本-realse稳定版本最终版本http://www.Sina.com/用于查看jquery版本的命令: npm info jquery用于查看可更新版本的命令l: npm outdated jquery,例如,无消息(如果已经是最新版本) 3.3.1'/允许更新主版本' jquery': '^3.3.1' //允许更新次版本' jquery '指定模块版本更新命令: npm update jquery 更新所有版本的npm update以升级npm自身版本命令: npm install -g npm 8.源代码管理要求首先安装nrm以管理源: NPMinstaaaate

查看可用来源: nrm ls

d :codesystem-learningfont _ page NPM _ demonrmlsnpm---https://registry.NPM js.org/cnpm---- http://r.CNP mjs.org/* Taobao-https://registry.NPM red NPM---- http://registry.mirror.cqupt.edu.cn/NPM mirror 3359 skimdb.NPM

PSD :codesystem-learningfont _ pageNPM _ demonrmusetaobaoregistryhasbeensetto 3603359 registry.NPM.NPM

PSD :codesystem-learningfont _ pageNPM _ demonrmtestnpm---- 826 mscn pm---- 204 ms * Taobao----

PSD :codesystem-learningfont _ pageNPM _ demonrmaddzz 3358127.0.0.13:8080/addregistryzzsucccecece

npmjs.org/ cnpm --- http://r.cnpmjs.org/* taobao - https://registry.npm.taobao.org/ nj ----- https://registry.nodejitsu.com/ rednpm - http://registry.mirror.cqupt.edu.cn/ npmMirror https://skimdb.npmjs.com/registry/ edunpm - http://registry.enpmjs.org/ zz ----- http://127.0.0.1:8080/ 9.发布自己的包到npm

步骤:

需要切换源为官方的地址:nrm use npm

需要开朗的冬瓜注册账号,注意126等邮箱无法收到验证的邮箱,推荐使用gmail

登录:npm login

发布包:npm publish

必须设置package.json的name为注册的名称,否则没有上传的权限

PS D:codesystem-learningfont_pagenpm_demo> npm publish npm ERR! publish Failed PUT 403 npm ERR! Windows_NT 10.0.15063 npm ERR! argv "D:\install\nodejs\node.exe" "D:\install\nodejs\node_modules\npm\bin\npm-cli.js" "publish" npm ERR! node v6.15.1 npm ERR! npm v3.10.10 npm ERR! code E403 npm ERR! You do not have permission to publish "npm-demo". Are you logged in as the correct user? : npm-demo npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! D:codesystem-learningfont_pagenpm_demonpm-debug.log { "name": "npm-demo", //需改改成注册的账户名称 "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": {} }

需要验证带你的邮箱,否则无法发布

PS D:codesystem-learningfont_pagenpm_demo> npm publish npm ERR! publish Failed PUT 403 npm ERR! Windows_NT 10.0.15063 npm ERR! argv "D:\install\nodejs\node.exe" "D:\install\nodejs\node_modules\npm\bin\npm-cli.js" "publish" npm ERR! node v6.15.1 npm ERR! npm v3.10.10 npm ERR! code E403 npm ERR! you must verify your email before publishing a new package: https://www.npmjs.com/email-edit : kriszhang npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! D:codesystem-learningfont_pagenpm_demonpm-debug.log 开朗的冬瓜查看自己发布的包新建一个工程下载已发布的包 10.使用sinopia搭建私有npm仓库

步骤

cmd:npm install -g sinopia,貌似需要python的环境

启动sinopia,会打印启动信息,默认的访问地址是:http://localhost:4873/

C:UsersKris>sinopia warn --- config file - C:UsersKrisAppDataRoamingsinopiaconfig.yaml //配置地址 warn --- http address - http://localhost:4873/ //默认访问地址

添加用户:npm add userm,sinopia作为服务端,需要新开一个cmd做为客户端,需要添加一个sinopia服务端地址,把把源切换过去

PS D:codesystem-learningfont_pagenpm_test> nrm add sinopia http://localhost:4873/ add registry sinopia successPS D:codesystem-learningfont_pagenpm_test> nrm ls* npm ---- https://registry.npmjs.org/ cnpm --- http://r.cnpmjs.org/ taobao - https://registry.npm.taobao.org/ nj ----- https://registry.nodejitsu.com/ rednpm - http://registry.mirror.cqupt.edu.cn/ npmMirror https://skimdb.npmjs.com/registry/ edunpm - http://registry.enpmjs.org/ zz ----- http://127.0.0.1:8080/ sinopia http://localhost:4873/PS D:codesystem-learningfont_pagenpm_test> nrm use sinopia

添加用户

npm@3.10.10 D:installnodejsnode_modulesnpmPS D:codesystem-learningfont_pagenpm_test> npm adduserUsername: zhangzhenPassword:Email: (this IS public) 287021229@qq.comLogged in as zhangzhen on http://localhost:4873/.PS D:codesystem-learningfont_pagenpm_test>

成功添加用户之后,会在sinopia服务端目录下新增一个文件htpasswd,迁移的时候需要拷贝该用户配置

修改源和默认访问地址

如果配置的listen无法访问的话,sinpia会无法打开,会报错

C:UsersKris>sinopia fatal --- cannot open config file C:UsersKrisAppDataRoamingsinopiaconfig.yaml: JS-YAML: can not read a block mapping entry; a multiline key may not be an implicit key at line 50, column 1: ^

重启sinopia既可以生效,需要需改客户端源的地址,并重新成功登录才能发布包;

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。