npm

Bower和npm有什么区别?

拥有回忆 提交于 2020-08-13 04:12:31
问题: What is the fundamental difference between bower and npm ? bower 和 npm 之间的根本区别是什么? Just want something plain and simple. 只需要简单明了的东西。 I've seen some of my colleagues use bower and npm interchangeably in their projects. 我已经看到一些同事在他们的项目中交替使用 bower 和 npm 。 解决方案: 参考一: https://stackoom.com/question/1GDbn/Bower和npm有什么区别 参考二: https://oldbug.net/q/1GDbn/What-is-the-difference-between-Bower-and-npm 来源: oschina 链接: https://my.oschina.net/stackoom/blog/4300654

vue实现打印功能的两种方法

≡放荡痞女 提交于 2020-08-13 03:20:29
第一种方法:通过npm 安装插件 1,安装 npm install vue-print-nb --save 2,引入 安装好以后在main.js文件中引入 import Print from 'vue-print-nb'   Vue.use(Print); //注册 3,现在就可以使用了 < div id ="printTest" >        < p > 明月照于山间 </ p >        < p > 清风来于江上 </ p >      </ div >      < button v-print ="'#printTest'" > 打印 </ button > 4.如需通过链接地址打印:window.location.href = airway_bill; airway_bill为链接地址。 5.如果内容打印不全,在打印操作时点击更多设置,然后设置缩放。 第二种方法:手动下载插件到本地 插件地址:https://github.com/xyl66/vuePlugs_printjs 1.在src下新建文件夹plugs,将下载好的print.js放入plugs文件夹下,然后操作如下 import Print from '@/plugs/print' Vue.use(Print) // 注册 < template >    < section ref ="print" >

[javascript] elementui下login登录页界面和js验证逻辑

人走茶凉 提交于 2020-08-13 02:08:46
主要是使用了form组件 <html lang= " cn " > <head> <meta charset= " utf-8 " > <meta name= " viewport " content= " width=device-width, initial-scale=1, shrink-to-fit=no " > <meta name= " description " content= "" > <meta name= " author " content= " 陶士涵 " > <title>GO-IMAP网页版邮箱imap工具登录页</title> <link rel= " stylesheet " href= " https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/theme-chalk/index.css " > <script src= " https://cdn.jsdelivr.net/npm/vue/dist/vue.js " ></script> <script src= " https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/index.js " ></script> <script src= " https://cdn.jsdelivr.net/npm

运行报错:‘webpack-dev-server‘ 不是内部或外部命令也不是可运行的程序

一笑奈何 提交于 2020-08-13 01:52:59
‘webpack-dev-server’ 不是内部或外部命令 也不是可运行的程序 或批处理文件 如何解决处理 就有的时候在我们启动项目npm run dev 报错如下: 首先遇到这个情况不要慌不要删文件乱改文件觉得自己写错什么才这样 解决方法: 把项目中的根目录删除node_modules文件夹,然后在项目根目录路径下的终端运行打入"npm install" 在这里说一下npm install 项目文件中并没有 node_modules文件夹,项目的依赖文件,npm会根据package.json配置文件中的依赖配置下载安装 。等待安装完成后,再次运行“npm run dev”,在这样有的人就可以了,也有的人还会继续报错仍然报类似的错误,这个时候你只需要再次重复相同的操作即可,尝试几次哈哈哈哈哈哈哈!!!! 好了就这样!!!!goodbay!!! 来源: oschina 链接: https://my.oschina.net/u/4403178/blog/4475888

React项目从零开始开发

萝らか妹 提交于 2020-08-12 17:48:26
一、安装nodejs和npm, cnpm等 (一)安装nodejs 配置好路径和环境变量。 (二)确认安装npm和cnpm安装 运行nodejs -v, npm-v, npm install nodejs -v npm -v npm install -g cnpm --registry=https://registry.npm.taobao.org cnpm install -g vue-cli cnpm install -g create-react-app cnpm install -g serve cnpm install -g create-react-app create-react-app reactdemo cd reactdemo npm start Nodejs工作路径为:D:\nodejswork , Vuejs工作路径为:D:\nodejswork\vuework , Reactjs工作路径为:D:\nodejswork\react , vuedemo工作路径为:D:\nodejswork\vuework\vuedemo , reactdemo工作路径为:D:\nodejswork\react\reactdemo , 在D:\nodejswork\react\运行create-react-app reactdemo, cd reactdemo, npm

webpack.03-打包js同时生成html页面

∥☆過路亽.° 提交于 2020-08-12 17:12:55
在空文件夹初始化:CMD npm init -y cnpm install -D webpack webpack-cli 文件结构 src(文件夹)--->test.js console.log('hello webpack') src(文件夹)--->index.html <html> <body> <script script="test.js"></script> </body> </html> src(文件夹)--->package.json { "name": "03", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "build": "webpack src/test.js" }, "keywords": [], "author": "", "license": "ISC" } 安装插件CMD: HtmlWebpackPlugin------> https://webpack.js.org/plugins/html-webpack-plugin/ cnpm install --save-dev html-webpack-plugin src(文件夹)--->webpack.config.js var HtmlWebpackPlugin = require('html

What is the difference between npm install and npm run build?

耗尽温柔 提交于 2020-08-12 17:05:49
What is the difference between npm install and npm run build? 回答1 npm install installs dependencies into the node_modules/ directory, for the node project you're working on. You can call install on another node.js project (module), to install it as a dependency for your project. npm run build is an alias for npm build , and it does nothing unless you specify what "build" does in your package.json file. It lets you perform any necessary building/prep tasks for your project, prior to it being used in another project. build is called by link and install commands, according to the documentation

npm 和 cnpm 的区别

强颜欢笑 提交于 2020-08-12 15:47:08
1、 npm 和 cnpm 的区别 相信很多人都不太明白 npm 和 cnpm 到底是什么东东, 为啥在国内要用 淘宝镜像使用 cnpm, (1) 两者之间只是 node 中包管理器的不同哟, (2) npm是node官方的包管理器。cnpm是个中国版的npm,是淘宝定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm : (3)如果因为网络原因无法使用npm下载,那cnpm这个就派上用场了。   一定切记切记,npm和cnpm只是下载器的不同,好像npm用人力板车去拉包,而cnpm却使用货车去运包。 而存包的地址则在下文nrm的查看, 2、 nrm的使用 很多人都说如果 npm 速度不够快。 继而使用 npm install -g cnpm --registry=https://registry.npm.taobao.org 这个命令行 就可以使用 cnpm 了。 但是它的实质是   (1)全局安装 cnpm   (2)并且将安装 ' 包 '(各种包) 的地址切换到 国内的淘宝镜像 这里面省略了一个很重要的东西,就是 nrm 的使用,这个包的功能可以让我们随意的切换我们下载包的地址。   (1)如果装好了 cnpm 可以, cnpm i nrm -g   (2)nrm ls 查看所有 包下载路径, 也就是存放包的不同位置,自然就有取包的速度区分      (3

webpack.02-如何打包

穿精又带淫゛_ 提交于 2020-08-12 14:59:19
在空文件夹初始化:CMD npm init -y -y意思是全部yes cnpm install -D webpack webpack-cli 文件结构 src(文件夹)--->index.js console.log('hello webpack') test(文件夹)--->main.js console.log('hello webpack2') package.json scripts里面加上build:webpack webpack默认是打包src下面的index.js 可以自定义,如:build:webpack server/index.js { "name": "02", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "build": "webpack", "build2": "webpack test/main.js" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } } 打包:CMD npm run build npm run build2 来源: oschina 链接:

跟我学Springboot开发后端管理系统1:概述

老子叫甜甜 提交于 2020-08-12 14:06:50
前言 Matrxi-Web是一个前后端分离的管理系统,前端采用vue开发框架,后端使用springboot开发框架,具体快速开发、简单可复用的特点。只要把整体框架搭建起来了,后面就只用写CRUD了。 Matrxi-Web具备基本的管理系统的基本功能,后端CRUD代码只需要配置好数据库,便可一键生成。 使用教程 跟我学Spring Boot开发管理系统1:后端整体技术架构 目录 本项目一共有三个模块: matrix-web-backend 后端代码模块 matrix-web-admin 前端代码模块 matrix-gen-code 后端代码生成模块 使用的技术栈 后端模块 Web框架:Spring Boot 2.0.3 数据库ORM:Mybatis-Plus 数据库读写分离:Sharding-JDBC 数据库连接池:支持Druid、也支持Hikari 缓存:Caffeine 权限控制:AOP+注解 日志输出:AOP+logback+MDC 任务调度:Quartz 工作流:activiti5.22.0,设计页面放在前端模块。、 API管理:Swagger 前端模块 前端框架:Vue 网络框架:axios 组件:element-ui 路由:vue-router cookie技术:js-cookie 代码生产模块 生产代码:Mybatis-Plus自带的代码生成 包含的功能 Matrix