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

efit

v0.7.2

Published

易上手的前端构建工具,基于 fis3,面向业务项目和业务组件,支持simple、webpage、webapp、component四种模式。

Downloads

2

Readme

efit (内测版)

易上手的前端构建工具,基于 fis3,面向业务项目和业务组件,支持simple、webpage、webapp、component四种模式。

安装方法

npm install -g efit
efit -v

使用方法

使用方法和fis3一致,此外提供四种模式整套配置。

脚手架使用

使用规则:

efit init <github username>/<github project>@<version>

简写:

efit init component 等价于 efit install efitjs/component@latest
efit init react 等价于 efit install efitjs/react@latest
efit init vue 等价于 efit install efitjs/vue@latest

默认配置选项

var config = {
  project: {
    // 项目名称
    name: '',

    // 项目版本号,填了后自动替换源码中@VERSION@标识,不填则由ci-shell来替换,没有CI环境时必须设置
    version: '',

    // 静态资源部署目录
    statics: '/asset',

    // 业务入口, 入口的设置方式决定了打包的方式
    // entry(直接设置文件入口路径): '/app/m/index.js' => /asset/pkg/app.js /asset/pkg/app.css
    // entry(设置app/单业务入口标识)-推荐: ['m'] =>  /asset/pkg/lib.js /asset/pkg/lib.css /asset/pkg/app.js /asset/pkg/app.css
    // entry(设置app/多业务入口标识)-推荐: ['marketing', 'platform'] /asset/pkg/lib.js /asset/pkg/lib.css /asset/pkg/common.js /asset/pkg/common.css /asset/pkg/{entry}.js /asset/pkg/{entry}.css
    entry: [],

    // 项目调试的服务环境:(local|dev|sit|uat|prd),填了后自动替换源码中@ENV@标识,不填则不替换
    debugENV: '',

    // 是否在调试模式下(非media)合并后开启 SourceMap 功能,启用后watch状态要3s+生效,相对比较慢,但方便调试
    useSourceMap: false,

    // eslint配置文件 http://eslint.org/
    eslintrc: {},

    // stylelint配置文件 https://stylelint.io/
    stylelintrc: {}
  },
  environment: {
    // 开发环境
    development: {
      // 静态资源的域名
      domain: '',

      // 是否优化
      optimizer: true,

      // 是否打包
      packager: true
    },
    // 测试环境
    testing: {
      // 静态资源的域名
      domain: '',

      // 是否优化
      optimizer: true,

      // 是否打包
      packager: true
    },
    // 生产环境
    production: {
      // 静态资源的域名
      domain: '',

      // 是否优化
      optimizer: true,

      // 是否打包
      packager: true
    }
  }
};

simple 配置模式

fis.simple(config);

webpage 配置模式

fis.webpage(config);

webapp 配置模式

fis.webapp(config);

component 配置模式

var pkg = require('./package');
var eslintrc = require('./.eslintrc');
var stylelintrc = fis.util.readJSON('./.stylelintrc');

// 项目基础配置
fis.component({
    project: {
        // 项目名称
        name: pkg.name,
        // 项目版本号,填了后自动替换源码中@VERSION@标识,不填则由ci-shell来替换,没有CI环境时必须设置
        version: pkg.version,
        // eslint配置文件 http://eslint.org/
        eslintrc: eslintrc,
        // stylelint配置文件 https://stylelint.io/
        stylelintrc: stylelintrc
    }
});

配置示例

fis-conf.js

var pkg = require('./package');

// 项目基础配置
fis.webapp({
    project: {
        // 项目名称
        name: pkg.name,
        // 业务入口
        entry: ['m'],
        // eslint配置文件
        eslintrc: fis.util.readJSON('./.eslintrc'),
        // stylelint配置文件
        stylelintrc: fis.util.readJSON('./.stylelintrc')
    },
    environment: {
        // 开发环境
        development: {
            domain: ''
        },
        // 测试环境
        testing: {
            domain: ''
        },
        // 生产环境
        production: {
            domain: 'http://cdn.xxx.com/${project.name}'
        }
    }
});

// 项目拓展配置

TODO

  • [ ] 说明文档
  • [ ] 配置示例
  • [ ] 项目示例
  • [ ] 使用教程
  • [ ] 测试用例