npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

reasy

v1.5.1

Published

An automatical tool for Front-end constructed by fis3

Downloads

66

Readme

reasy

NPM version Build Status

NPM Download

基于fis3的纯前端工程自动化工具

安装

  1. Linux

    $npm install -g reasy
    $npm install -g web-debug
        
    ;or use git
    $git clone https://github.com/wEasyTeam/reasy
    $cd reasy
    $./reasy-install.sh
  2. Windows

    >npm install -g reasy
    >npm install -g web-debug
        
    ;or use git
    >git clone https://github.com/wEasyTeam/reasy
    >cd reasy
    >reasy-install.bat

npm方式安装失败,可以下载安装脚本进行安装:[Linux安装脚本] [Windows安装脚本] 将文件保存至本机后执行即可进行自动安装。

用法

详见: FIS3官网

注:建议将默认配置文件命名为reasy-conf.js,与fis3的配置文件fis-conf.js区分开来。

DEMO

https://github.com/wEasyTeam/reasy/tree/master/example

详细文档

Reasy纯前端工具使用教程(一)

Reasy纯前端工具使用教程(二)--Reasy内置插件用法

新增功能使用说明

新增API

为了确保一致性,reasy对FSI3的API进行了增量拓展。

  • reasy.extend(ruleName) 该方法可以实现对配置的继承,可继承的配置在reasy的rules目录下,你也可以在项目rules目录下添加自己的可复用规则,采用module.exports导出
  • ...

内置规则

现有的内置规则有:

  • relative 将绝对路径转化为相对路径
  • autoprefix 可以实现css自动添加私有前缀
  • compress 对css,js,png进行压缩
  • parse 对sass,less,art-template进行编译
  • sprite 对sass,less,css添加雪碧图
  • md5 将文件名修改为md5形式
  • sea 对sea.js模块进行封装
  • mod 对modj.s模块进行封装
  • require 对require.js模块进行封装
  • jshint 对js进行lint,进行lint时记得在命令行后加上-l--lint
  • qunit 自动进行单元测试,需要自行安装reasy-postpackager-qunit,即npm install -g reasy-postpackager-qunit
  • iconfont 根据svg图标自动打包生成iconfont字体及相关样式
  • ldeploy 本地发布
  • debug 去除压缩属性

你也可以自己编写规则放置在工程目录下的rules目录下,如:workdir/myrule.js,则调用方法为:reasy.extend('myrule', args1, args2)。 rule文件书写示例:

module.exports = function(args1, args2) {
    return this.match('**', {
        // ...  写法请参考FIS3配置文件写法
    });
};

新增命令

为了减少不必要的配置文件的书写,本工具在release命令上拓展了一个-R(或--rules)命令,使用方法示例: reasy release -R parse,compress,md5 -d ../output 。表示编译时会将parse, compress, 和 md5规则应用上去,而不需要编写reasy-conf.js

调试服务器

reasy没有使用FIS3内置的fis server做为web服务器,原因主要有:

  • fis3 release -L 命令会将liveload.js加入页面,开发阶段可能会打调试版的代码部署至服务器,导致liveload.js无法被用户加载而出错。web-debug是在做为本地服务器动态解析时自动加入liveload.js,并不修改本地代码。
  • web-debug集成了对移动端的调试功能,可以更方便地进行移动页面开发

使用时在工程目录执行web-debug 8080 ./dist即可。

关于reasy

reasy前端自动化工具基于FIS3构建,并在其基础上对纯前端开发模式进行了一定的优化,使用更为轻便。主要特点有:

  1. 对前端默认的编译插件集进行了打包,实现一键安装即可使用

  2. 实现配置继承,并对常用的功能(如压缩,md5,sass编译,模版编译等)进行了封装,可以在一定程度上减少配置文件的书写量

  3. 增加了-m配置实现无配置实现基础的压缩,md5等功能

  4. 更改FIS3内置Server为web-debug,增加了移动端调试功能

  5. 更多功能正在进一步添加...