Sublime相关
通过添加 Build System 的方式来使 Sublime Text 3 运行 JS、ES6:
参考文章:如何优雅地使用Sublime Text3
参考书目:《ES6标准入门》阮一峰
摘抄:
- 下载安装配置 NodeJS
- 在 Sublime 选择 Tools->Build System->New Build System...
- 编辑,命名(如 Node.sublime-build)并保存,位置默认
{
"cmd": [
"node",
"--use-strict",
"--harmony",
"$file"
],
"selector": "source.js"
} - 在 Sublime 中选择 Tools->Build System->Node,编写完JS文件后保存 Ctrl + B 即可。
- 遇到类似于 SyntaxError: Unexpected token import 的错误,可以使用阮一峰老师写的 ES-Checker 模块检查运行环境对ES6的支持情况,如:
C:\Users\Username>es-checker ECMAScript Feature Detection (v1.3.0) Variables
√ let and const
√ TDZ error for too-early access of let or const declarations
√ Redefinition of const declarations not allowed
× destructuring assignments/declarations for arrays and objects
× ... operator Data Types
√ For...0f loop
√ Map, Set, WeakMap, WeakSet
√ Symbol
√ Symbols cannot be implicitly coerced Number
√ Octal (e.g. 0o1 ) and binary (e.g. 0b10 ) literal forms
√ Old octal literal invalid now (e.g. )
√ Static functions added to Math (e.g. Math.hypot(), Math.acosh(), Math.imul() )
√ Static functions added to Number (Number.isNaN(), Number.isInteger() ) String
√ Methods added to String.prototype (String.prototype.includes(), String.prototype.repeat() )
√ Unicode code-point escape form in string literals (e.g. \u{20BB7} )
√ Unicode code-point escape form in identifier names (e.g. var \u{20BB7} = ; )
× Unicode code-point escape form in regular expressions (e.g. var regexp = /\u{20BB7}/u; )
× y flag for sticky regular expressions (e.g. /b/y )
√ Template String Literals Function
√ arrow function
× default function parameter values
× destructuring for function parameters
× Inferences for function name property for anonymous functions
× Tail-call optimization for function calls and recursion Array
× Methods added to Array.prototype ([].fill(), [].find(), [].findIndex(), [].entries(), [].keys(), [].values() )
√ Static functions added to Array (Array.from(), Array.of() )
√ TypedArrays like Uint8Array, ArrayBuffer, Int8Array(), Int32Array(), Float64Array()
√ Some Array methods (e.g. Int8Array.prototype.slice(), Int8Array.prototype.join(), Int8Array.prototype.forEach() ) added to the TypedArray prototypes
× Some Array statics (e.g. Uint32Array.from(), Uint32Array.of() ) added to the TypedArray constructors Object
√ __proto__ in object literal definition sets [[Prototype]] link
× Static functions added to Object (Object.getOwnSymbolNames(), Object.assign() )
√ Object Literal Computed Property
√ Object Literal Property Shorthands
× Proxies
× Reflect Generator and Promise
√ Generator function
√ Promises Class
√ Class
√ super allowed in object methods
√ class ABC extends Array { .. } Module
× Module export command
× Module import command =========================================
Passes feature Dectations
Your runtime supports % of ECMAScript
=========================================
Sublime相关的更多相关文章
- sublime 相关配置
安转插件:案例格式化HTML代码,需要安装插件,具体安装步骤如下: 1.打开菜单->首选项->插件控制,输入 install package 2.等待程序进入插件管理功能,再输入插件名称: ...
- sublime相关设置
1.设置Sublime Text新标签页打开文件 "open_files_in_new_window": false,
- sublime相关资源
Sublime Text 全程指南 http://zh.lucida.me/blog/sublime-text-complete-guide/ Sublime官网Package安装 https://p ...
- Mac Sublime 相关资源
MAC上安装并破解最新SublimeText3103版本 http://blog.csdn.net/yanzi1225627/article/details/50703942 Mac版的Sublime ...
- ubuntu中下载sublime相关问题
1.SublimeText3的安装 在网上搜索了一些ubuntu下关于sublime-text-3安装的方法,在这里针对自己尝试的情况进行反馈: 方法一(未成功): 在终端输入以下代码: sudo a ...
- sublime相关小技巧
1.快速建立一个新文件:Ctrl+n 2.修改多个相同符号:Ctrl+D 3.建立语言后缀的文件保存,例如我想创建PHP的语言脚本,先按Ctrl+Shift+p,打开Command Palette,输 ...
- sublime 相关配置和快捷键
1.安装package control 点击sublime的菜单栏 view->show console :现在打开了控制台, 这个控制台有上下两栏, 上面一栏会实时显示sublime执行了什 ...
- sublime相关操作
装插件 1,安装过Package Control ctrl + shift + p 输入install package 选择 Package Control: Install Package 搜索自己 ...
- Sublime中开发Ruby
Ruby:Sublime中开发Ruby需要注意的Encoding事项 目录 背景Sublime相关默认的文件存储编码:UTF8默认的输出控制台编码:UTF8修改默认的输出控制台编码Ruby相关默认的代 ...
随机推荐
- C# 利用SQLite对.DB和.logdb加密和解密和SQLite创建数据库
1.最近研究了下利用SQLite为db文件简单的加密和解密 private static SQLiteConnection GetConnection() { SQLiteConnection con ...
- Spring的Ioc和AOP扩展
多种方式实现依赖注入: 这里唯一需要说明的是如果要使用P命名空间实现属性注入,需要添加命名空间的声明: 如我的xml里红色字体: <?xml version="1.0" en ...
- 基于ssh框架的在线考试系统开发的质量属性
我做的系统是基于ssh框架的在线考试系统.在线考试系统有以下几点特性:(1)系统响应时间需要非常快,可以迅速的出题,答题.(2)系统的负载量也需要非常大,可以支持多人在线考试(3)还有系统的安全性也需 ...
- 目标检测方法总结(R-CNN系列)
目标检测方法系列--R-CNN, SPP, Fast R-CNN, Faster R-CNN, YOLO, SSD 目录 相关背景 从传统方法到R-CNN 从R-CNN到SPP Fast R-CNN ...
- centos安装mono
1.查看mono最新版本 http://download.mono-project.com/sources/mono 2.安装依赖环境 sudo yum install cmake automake ...
- Extjs 一些配置以及方法
1.例如想要实现以下功能,本来model中只有用户的firstname和lastname,但是在grid中展示还需要展示用户姓名,或者只展示用户姓名
- java中使用jxl导出Excel表格详细通用步骤
该方法一般接收两个参数,response和要导出的表格内容的list. 一般我们将数据库的数据查询出来在页面进行展示,根据用户需求,可能需要对页面数据进行导出. 此时只要将展示之前查询所得的数据放入s ...
- Oracle 12c In Memory Option初探
前情提要: Oracle OpenWorld 2013中Larry Ellison爆料的Oracle新特性:Oracle In Memory Database Option 1. 这个新特性将随着12 ...
- Android动画之淡入淡出
为了更好的说明Android动画的淡入淡出效果,这里以一个场景为例: 界面上有两个View 控件,两个View交替显示,当一个View淡入显示,另一个View淡出不可见. 我们把当前要显示的View叫 ...
- arm 2440 linux 应用程序 nes 红白机模拟器 第2篇 InfoNES
InfoNES 支持 map ,声音,代码比较少,方便 移值. 在上个 LiteNES 的基础上,其实不到半小时就移值好了这个,但问题是,一直是黑屏.InfoNES_LoadFrame () Wo ...