• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

    Rexjs: Rexjs - 是一款又快、又小、性价比极高的 JavaScript(ES6+) 语法的编译器! ...

    原作者: [db:作者] 来自: 网络 收藏 邀请

    开源软件名称:

    Rexjs

    开源软件地址:

    https://gitee.com/mic-pages/Rexjs

    开源软件介绍:

    Rexjs is a faster and smaller JavaScript(ES6+) compiler!


    中文

    Link

    Install

    • NPM
    npm install rexjs-api
    • Git
    git clone https://github.com/china-liji/Rexjs.git
    • Download

    Zip

    rex.min.js - 250KB

    rex-api.min.js - 247KB

    rex-browser-helper.min.js - 18KB


    Faster and Smaller

    ./dist/rex.min.js[1.7.1] only 250KB, smaller than others.


    Usage

    Web

    <script src="./dist/rex.min.js"></script><!-- set the "type" attribute to define a module --><script type="text/rexjs">	import "./module.js";	export default class {};</script><!--	also, set the "src" attribute to reference a module,	and add the "data-sourcemaps" attribute to enable sourcemaps.--><script src="./module.js" type="text/rexjs" data-sourcemaps></script>

    cross browser: ChromeFirefoxSafariIE9+.

    Nodejs

    • ./ext.js
    import path from "path";export default function(filename){	return path.parse(filename).ext;};
    • ./index.js
    import ext from "./ext.js";// output ".js"ext(__filename);
    • Command Line
    rexjs ./index.js

    Rexjs API

    • JavaScript
    // import "rexjs-api" module// Nodejslet Rexjs = require("rexjs-api");// Web WorkerimportScripts("./dist/rex-api.min.js");let Rexjs = self.Rexjs;// Web: <script src="./dist/rex.min.js"></script>let Rexjs = window.Rexjs;// initialize parserlet es5Code = "", parser = new Rexjs.ECMAScriptParser();// parse module from a fileparser.parse(	// init file	new Rexjs.File(		// filename		"./filename.js",		// source		"class Car {}"	));// returning the generated codees5Code = parser.build();
    • HTML

    This file provides generated code API, so reference it before run generated code in your browser.

    <script src="./dist/rex-browser-helper.min.js"></script>

    Other Packages


    Thanks!


    鲜花

    握手

    雷人

    路过

    鸡蛋
    该文章已有0人参与评论

    请发表评论

    全部评论

    专题导读
    热门推荐
    阅读排行榜

    扫描微信二维码

    查看手机版网站

    随时了解更新最新资讯

    139-2527-9053

    在线客服(服务时间 9:00~18:00)

    在线QQ客服
    地址:深圳市南山区西丽大学城创智工业园
    电邮:jeky_zhao#qq.com
    移动电话:139-2527-9053

    Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap