npm

【Vue,自学第二天】

回眸只為那壹抹淺笑 提交于 2020-12-03 07:45:28
今天,我准备跟着官方文档在走一遍,巩固一下,加深记忆。 两种引入Vue的方式: 1 < script src ="https://cdn.jsdelivr.net/npm/vue/dist/vue.js" ></ script > 1 < script src ="https://cdn.jsdelivr.net/npm/vue" ></ script > 一、声明式渲染 Vue.js 的核心是一个允许采用简洁的模板语法来声明式地将数据渲染进 DOM 的系统: 1 < div id ="app" > 2 {{ message }} 3 </ div > 1 var app = new Vue({ 2 el: '#app' , 3 data: { 4 message: 'Hello Vue!' 5 } 6 }) 结果: 二、绑定元素特性: 1 < div id ="app-2" > 2 < span v-bind:title ="message" > 3 鼠标悬停几秒钟查看此处动态绑定的提示信息! 4 </ span > 5 </ div > 1 var app2 = new Vue({ 2 el: '#app-2' , 3 data: { 4 message: '页面加载于 ' + new Date().toLocaleString() 5 } 6 }) 结果: 三、条件与循环

Caching npm dependency with github action

随声附和 提交于 2020-12-02 20:47:41
问题 I want to cache npm dependencies so that I does not do npm install every time I push and instead just load it from cache. I think github action support this now?: How do I cache steps in GitHub actions? Here are few cases If package.json changes, which means yarn.lock or package-lock.json changed so do npm install and update cache Extending my above point, the contributor could be doing both yarn install and npm install From the same above question, I changed my github action to something

Caching npm dependency with github action

与世无争的帅哥 提交于 2020-12-02 20:47:30
问题 I want to cache npm dependencies so that I does not do npm install every time I push and instead just load it from cache. I think github action support this now?: How do I cache steps in GitHub actions? Here are few cases If package.json changes, which means yarn.lock or package-lock.json changed so do npm install and update cache Extending my above point, the contributor could be doing both yarn install and npm install From the same above question, I changed my github action to something

How do I reference Google Material-Design-Icons after npm install?

三世轮回 提交于 2020-12-02 05:58:05
问题 So after doing npm install material-design-icons , how do I use them in my React application? The methods included here doesn't include the npm method. 回答1: This is the way you can reference it (in your styles.css): @import '~material-design-icons/iconfont/material-icons.css'; To use it: <i class="material-icons">cloud_upload</i> 回答2: Open angular.json in your project, and add the following line node_modules/material-design-icons/iconfont/material-icons.css under projects => YOUR_APP =>

How to properly install Vuetify for Rails?

五迷三道 提交于 2020-12-01 10:59:38
问题 Javascript Error: [Vuetify] Multiple instances of Vue detected See https://github.com/vuetifyjs/vuetify/issues/4068 If you're seeing "$attrs is readonly", it's caused by this consoleError @ vuetify.js:22001 install @ vuetify.js:16239 Vue.use @ vue.esm.js:4751 install @ vuetify.js:17943 Vue.use @ vue.esm.js:4751 (anonymous) @ application.js:22 __webpack_require__ @ bootstrap 0e105d68ff80c96169ef:19 (anonymous) @ bootstrap 0e105d68ff80c96169ef:62 (anonymous) @ bootstrap 0e105d68ff80c96169ef:62

react native downloading javascript bundle 100% stuck

余生长醉 提交于 2020-12-01 08:20:30
问题 when I am trying to execute npm start it works fine, but when i try to run my application by expo the process goes till 100% and after that nothing happens. I am not getting what is exact issue over there. I am having following things in package.json.... please help me to resolve this issue. { "name": "ProMeeting", "version": "0.1.0", "private": true, "devDependencies": { "jest-expo": "~29.0.0", "react-native-scripts": "^1.14.0", "react-test-renderer": "16.3.1" }, "main": "./node_modules

Setting up docker nodejs application with local npm dependencies

爱⌒轻易说出口 提交于 2020-12-01 06:19:31
问题 We want to start containerizing our applications, but we have stumbled upon some issues with local dependencies. We have a single git repository, in which we have numerous node packages, under "shared" folder, and applications that require these packages. So let's say our folder structure is as follows: src/ ├── apps │ └── my_app └── shared └── shared_module in my_app package.json we have the following dependency: { "dependencies": { "shared-module": "file:../../shared/shared_module" } } The

Setting up docker nodejs application with local npm dependencies

一个人想着一个人 提交于 2020-12-01 06:17:12
问题 We want to start containerizing our applications, but we have stumbled upon some issues with local dependencies. We have a single git repository, in which we have numerous node packages, under "shared" folder, and applications that require these packages. So let's say our folder structure is as follows: src/ ├── apps │ └── my_app └── shared └── shared_module in my_app package.json we have the following dependency: { "dependencies": { "shared-module": "file:../../shared/shared_module" } } The

Vue.js+vue-element搭建属于自己的后台管理模板:创建一个项目(四)

删除回忆录丶 提交于 2020-12-01 04:27:28
Vue.js+vue-element搭建属于自己的后台管理模板:创建一个项目(四) 前言 本章主要讲解通过Vue CLI 脚手架构建工具创建一个项目,在学习Vue CLI之前我们需要先了解下webpack 代码编译工具,webpack 是一个现代 JavaScript 应用程序的静态模块打包器(module bundler)。 webpack 官方中文文档地址: https://www.webpackjs.com/concepts/ Vue CLI 脚手架构建工具 Vue CLI 是一个基于 Vue.js 进行快速开发的完整系统,搭建交互式的项目脚手架,Vue CLI版本3.x开始包名称由vue-cli 改成了 @vue/cli, 如果你已经全局安装了旧版本的 vue-cli (1.x 或 2.x),你需要先通过 npm uninstall vue-cli -g 卸载后再安装3.x版本,Vue CLI 需要 Node.js 8.9 或更高版本 (推荐 8.11.0+)。 安装Vue CLI 在命令行输入: cnpm install -g @vue/cli (安装新包) 我们这里推荐用vue-cli 3.x构建项目,新版优化了编译速度,不过你也可以通过老版本创建项目,老版本安装命令:cnpm install --global vue-cli 备注: 安装后,检查是否安装成功 。vue

微信小程序导入Vant-Weapp组件库及出错处理

我们两清 提交于 2020-12-01 02:04:12
微信小程序导入Vant-Weapp组件库及出错处理 一、下载Node.js* 链接:https://nodejs.org/en/ 推荐选择LST的8.0以上版本,下载安装即可,安装完成后可以进行验证 cmd打开终端,输入vant-v出现对应版本即为安装成功,也可输入npm -v查看对应的npm版本 二、在微信开发工具做对应操作 链接:https://youzan.github.io/vant-weapp/#/intro 后续可根据开发指南进行操作 三、安装Vant组件库 选中miniprogram文件,右键选择在终端打开,输入 npm i vant-weapp -S --production 进行安装 安装完成后,在微信开发者工具窗口,选择“工具”->“构建npm",构建成功后, 在miniprogram下会出现miniprogram_npm文件夹,对应的下面的就是vant组件库 选择微信开发工具的详情 勾选”使用npm模块“选项,才算完成 四、测试安装是否成功 比如要在pagës/indeks/indeks里添加一个组件库里的button 在index.json中加入代码 修改上述路径,最终代码为: “usingComponents”: { “van-button”: “vant-weapp//button” } 再在index.wxml中加入代码 如加入一个危险按钮 危险按钮