HTML/CSS/JS 格式化插件:HTML/CSS/JS Prettify 安装过程: 在Sublime Text中,按下Ctrl+Shift+P调出命令面板; 首先你的sumblime text3得安装包管理器,如何安装请参考官网: https://packagecontrol.io/installation 输入install 调出 Install Package 选项并回车; 输入pretty,并在列表中选择HTML-CSS-JS Prettify后回车即
举例: 打开一个压缩的jQuery.min.js文件,按下Ctrl+Shift+H
js我用的是UglifyJS github地址:https://github.com/mishoo/UglifyJS
作者:汪娇娇 时间:2018年1月15日 下一篇:自己写代码对比工具 时间过得好快,一下子就2018年了,想起好久没写博客,不觉有些浪费了时光,今天便来补一篇。 JSON是个伟大的东西,各处都用得到,既方便也纠结。用的溜的人那就没啥说的了,但也有用的不溜的或者想偷懒的人,那JSON也算是一个小小的槛吧。怎么说呢,就比如说有的人到现在连JSON的正确格式都写不对,也有人写对了但并没有自信自己是否写对,那这时候就需要一个校验工具来检验JSON格式的正确性。既然有了校验,那格式化工具怎么能少,再随着需求的增加,我
时间过得好快,一下子就2018年了,想起好久没写博客,不觉有些浪费了时光,今天便来补一篇。
开发环境:开发环境是程序猿们专门用于开发的服务器,配置可以比较随意, 为了开发调试方便,一般打开全部错误报告。简单讲就是项目尚且处于编码阶段,一般这时候会把代码放在开发环境中,不会放在生产环境中。
本文介绍了Day.js的使用方法,Day.js 是一个轻量级的JavaScript库,用于解析、验证、操作和格式化日期和时间。Day.js 的使用方法类似于Moment.js,但 Day.js 的大小只有 2KB,比 Moment.js 更小。
这个插件提供html的编写提示,包括到属性的格式监测,语法细致监测纠正,非常好的。插件地址
随着发展的逐步发展,作为工程师除了需要关注需要写的⻚面,样式和逻辑之外,还需要面对日益复杂 的系统性问题,比如模块化文件的组织、ES6 JS 文件的编译、打包压缩所有的 JS 代码、优化和合并图片静态资源等等事情。
接下来,介绍他的使用方式,前提条件,下载clipboard.min.js插件,下载地址:在这里
C:\Users\你的用户名\AppData\Local\youdao\ynote\
我们日常开发中,时常会碰到数值格式化操作的场景,今天就为大家分享一款相对比较全面的数值格式化的JS库:Numeral.js
猫哥是一个常年混迹在 GitHub 上的猫星人,所以发现了不少好的前端开源项目,在此分享给大家。
Visual Studio Code 是由微软开发的一款免费、跨平台的文本编辑器。由于其卓越的性能和丰富的功能,它很快就受到了大家的喜爱。
在安装了Vue Devtools之后,在chrome浏览器开发模式下,打开vue面板,选择组件,然后就可以直接查看和修改data数据:
问题:得到一个随机数组成的数组,数组长度为10 结果类似于:[0.243, 0.162, 0.701, 0.501…]
写到最后总结得差不多了,后续如果我想起还有哪些构建依赖遗漏的,会继续在这篇文章上补全,同时也希望各位倔友对文章里的要点进行补充或者提出自己的见解。欢迎在下方进行评论或补充喔,喜欢的点个赞或收个藏,保证你在开发时用得上。# 前端汇总系列:npm依赖(构建编译)
在混淆加密JS代码时,要将代码转化成AST(抽象语法树),再对AST进行处理,混淆加密完成后,再重建为JS代码。而像3.4MB大小的文件,代码量可能达到几万行,甚至几十万行,可以想像:进行各种转码、逐行处理,是种什么样的工作量,即使是程序自动处理,也会非常耗时。因此,对这样量极的JS代码进行混淆加密,在线的JS加密工具,是不允许的,不接受这样大的文件,或需要高权限。
在我们介绍了Husky、Commitlint之后,来看一个前端文件过滤的工具Lint-staged,代码的格式化肯定会涉及到文件系统,一般工具会首先读取文件,格式化操作之后,重新写入。对于较大型的项目,文件众多,首先遇到的就是性能问题,虽然如Eslint之类的也有文件过滤配置,但毕竟还是对于匹配文件的全量遍历,如全量的.js文件,基本达不到性能要求,有时还会误格式化其他同学的代码,因此我们引入Lint-staged,一个仅仅过滤出Git代码暂存区文件(被committed的文件)的工具。
VS Code推荐插件 Beautify 语法高亮,代码格式化 ctrl+shift+p输入beautify就有提示 Language pack extension for Chinese (Simplified) 中文汉化 Code Spell Checker 代码拼写检查 vscode-icons 各种漂亮图标 One Dark Pro 暗色主题 Codelf 变量命名神器 compareit 文件对比 Document This 快速注释 ESLint 代码检查工具 GitLens 能显示每一行代
在日常开发中,特别是中后台管理页面,会经常使用到一些常用的函数比如:防抖节流、本地存储相关、时间格式化等,但是随着项目不断增加,复用性和通用性就成为一个很至关重要的问题,如何减少复制张贴的操作,那就是封装成为,适用与多项目统一的工具包,并用npm进行管理,“U盘式安装”的方式可以提高团队的效率,那今天就讲讲开发一个简易的工具库需要涉及哪些环节,看下图
1.语言设置 Windows、Linux 快捷键是:ctrl+shift+p macOS 快捷键是:command + shift + p 搜索:Configore Display Language 修改"locale":"en"为"locale":"zh-CN" 然后安装中文插件,重启vscode 即可
installcnpm install postcss-px2rem px2rem-loader --save
今天,了不起发现了一个非常有用的宝藏插件:Cleave.js。提供一个简单的方法来格式化您的输入数据,以此增加输入字段的可读性。让你的页面表单使用体验感爆棚~
在前端开发中,有一个非常好用的工具,Visual Studio Code,简称VS code。
前面两种对象是JS基础内存,属于ECMAScript,第三种浏览器对象属于我们JS独有的。
Firebug2.0新功能还蛮多的,这里我只介绍吸引我的新功能。所有的新功能见 Firebug博客。
之前处理跨域问题是通过jsonp,但是只有开发环境是跨域的,代码打包后上传到服务器便不再跨域,所以ajax在本地做了判断,判断是否是跨域,跨域则走jsonp否则其他正常调用
写在前面:开发过程中,会遇到很多繁杂精细的麻烦问题,虽然知道要去按照步骤解决,但总归耗费大量的时间,那为什么不去寻求一个捷径,本文总结了一些在线工具,遇到问题,打开网页,想要的东西,分分钟就能解决,让开发变得高效,快速,有了这些工具在手,就可以从繁重的工作任务中解脱出来,有大把的时间去王者峡谷散步打野浪一圈了。 一:Atool在线工具: http://www.atool.org/ aTool,工具在线工具,由华中科技大学一位在校女研究生开发的在线工具集合网站,旨在做出最简单方便、最完整干净、最全面完整的工具
在开发者的弹药箱里,命令行是最具生产力的工具之一。掌握它们可以给你的工作流程带来非常积极的影响。因为,许多日常任务都可以用一条命令然后按回车来解决。
我前面介绍了轻量级的 JavaScript 日期选择器 Pikaday 和其简单的用法,但是在使用当中发现有几个限制:
json是前后端交互的一种非常常见的格式,本文分享一个小工具实现json的格式化与压缩,并通过ace.js优化交互与展示。
前言:首先对于web端js代码要做到纯粹的加密处理是不存在的,只能说是混淆 使得代码根本无法阅读,进而达到“加密”的效果,没有最强的盾 只有不容易破的盾 众所周知,JavaScript大都是运行在浏览器端,这就导致任何人都可以直接对网站的代码进行查看,如果代码没有进行任何处理就会导致直接暴露源码,他人便可轻而易举的复制你的劳动成果,所以给大家介绍一下新出的代码混淆加密工具 safekodo。 网址为www.safekodo.com
在很多时候,我们可能需要调试前端的js,但是如果非本地项目,根本没法直接修改js进行调试,但是我们可以利用浏览器的开发者工具,进行修改js并调试
1、 如何全局安装一个 node 应用? npm install -g <package_name> 上述命令执行之后将会在当前的目录下创建一个 node_modules 的目录(如果不存在的话),然
可以查看某个关键词的搜索量排名方式; 1.百度指数; 2.Google Trends ; React下载文件说明 ---- React核心文件,JSX编译文件,React插件文件; ---- 编辑器: CodeKit,sublime text2/3(推荐使用) ,Emacs,vim sublime text 3 插件优化: 编辑器插件:Emmet,Html-css-js Prettify, Spacegray模板 百度搜索: Package Control ,复制代码,安装这个包管理器; 安装后,重新启动
本文讲述如何通过多种方案定位脚本错误,总结了解决方案包括:1. 使用 sourcemap;2. 保留空格和换行;3. SourceMap 快速定位;4. 开源方案 sentry。这些方案可以解决报错行列数定位问题,提高开发效率。
对应的Themes就是可更换的主题。在这一共分为两块,UI Theme和Syntax Theme,一个是UI的,一个是文件语法的,这里可以选择相应的主题。
开发基于 typescript ES6 语法, 使用jest eslint 为校验或测试的npm包。 因为需要使用到 ts, 模块化,所以就存在模块编译打包的问题, 现有的打包工具中,webpack , Parcel 更偏向多类型资源 的web应用打包, 对于纯粹的npm工具包来说 rollup 更简单实用, 这里记录rollup的基础使用流程。
在常规流中的框(boxes,元素形成的矩形区域),都属于一个格式化的上下文中,可能是块的,也可能是行内的,但不可能同时是行内的又是块的。块框参与块格式化上下文。行内框参与行内格式化上下文。 块格式化上
目录 js库网站 格式化的多个方法 通过计算属性实现 过滤器实现(局部过滤器) 多个过滤器的使用 全局过滤器 js库网站 这个网站里面有很多的第三方的插件, 📷 其中对于时间操作的插件是 📷 📷 以上的两个插件都可以对时间进行操作 📷 这个插件咋用, 📷 格式化的多个方法 通过计算属性实现 📷 📷 📷 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Co
vue-cli3也可以采用UI面板进行配置,相对比较方便,目前先写命令行创建,后续再加上面板创建。
客户端验证在任何项目都是不可缺少的,很多时候我们需要在用户提交到服务器之前给予提示。表单验证库允许开发人员自定义样式、错误消息和样式以及简化验证规则的创建。
按照ES模块机制组织源码,辅以类型检查和Lint/格式化工具,借助Yarn处理模块依赖,HUBOT检查PR;Rollup + Closure Compiler构建,利用Error Code机制实现生产环境错误追踪,DevTools侧面辅助bundle检查;Jest驱动单测,还通过格式化bundle来确认构建结果足够干净;最后通过npm发布新package
bootstrap风格的时间组件非常多,你可以在github上面随便搜索“datepicker”关键字,可以找到很多的时间组件。博主原来也用过其中的两个,发现都会有一些大大小小的问题。经过一番筛选,找到一个效果不错、能适用各种场景的时间组件,下面就来一睹它的风采吧。
今天来写一个关于Bootstrap Table使用教程(请求json数据渲染表格) json数据来源于后端小伙伴的接口,我放在本地进行模拟了
1、uppercase,lowercase 大小写转换 {{ "lower cap string" | uppercase }} // 结果:LOWER CAP STRING {{ "TANK is GOOD" | lowercase }} // 结果:tank is good 2、date 格式化 {{1490161945000 | date:"yyyy-MM-dd HH:mm:ss"}} // 2017-03-22 13:52:25 3、number 格式化(保留小数) {{149016.1945000 | number:2}}//保留两位 {{149016.1945000 | number}}//默认为保留3位 4、currency货币格式化 {{ 250 | currency }} // 结果:$250.00 {{ 250 | currency:"RMB ¥ " }} // 结果:RMB ¥ 250.00 5、filter查找 输入过滤器可以通过一个管道字符(|)和一个过滤器添加到指令中,该过滤器后跟一个冒号和一个模型名称。 filter 过滤器从数组中选择一个子集 // 查找name为iphone的行 {{ [{"age": 20,"id": 10,"name": "iphone"}, {"age": 12,"id": 11,"name": "sunm xing"}, {"age": 44,"id": 12,"name": "test abc"} ] | filter:{'name':'iphone'} }} 同时filter可以自定义比较函数。 6、limitTo 截取 {{"1234567890" | limitTo :6}} // 从前面开始截取6位 {{"1234567890" | limitTo :6,6}} // 从第6位开始截取6位 {{"1234567890" | limitTo:-4}} // 从后面开始截取4位 7、orderBy 排序 // 根据id降序排 {{ [{"age": 20,"id": 10,"name": "iphone"}, {"age": 12,"id": 11,"name": "sunm xing"}, {"age": 44,"id": 12,"name": "test abc"} ] | orderBy:'id':true }}
很久都没有更新文章了,离日更的梦想越来越远,一来是工作比较忙,二来是近期身体素质较差,没有太多的精力放在钻研技术上,三来是公众号的建立和运营以及进入正式阶段,本着对技术的痴迷和不离不弃的初心,挤出来的时间,还是会总结近期自己所学的知识点,巩固落实才不至于很快的忘记。 今天发现了一个比较厉害的在线网站,简直可以称为程序员的工具箱。工具在手,事半功倍,工作无忧。 tool在线工具,开发人员工具,代码格式化、压缩、加密、解密,下载链接转换,sql工具,正则测试工具,favicon在线制作,ruby工具,中文简繁体
领取专属 10元无门槛券
手把手带您无忧上云