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

stc

v2.0.14

Published

The fastest workflow

Downloads

50

Readme

stc

高性能前端工作流系统

改进编译性能的几种方式

  • 充分利用多核 CPU
  • 基于 AST/Token
  • 分析依赖树
  • 无感知的缓存策略

工作流处理步骤

处理流程分为下面 4 个步骤,其中 lint,transpile 和 dependence 里的插件是并行处理,workflow 里的插件是串行处理。

  • lint - 代码规范检查,如:用 eslint 检查 JS 代码
  • transpile - 转译,将非标准的 HTML/JS/CSS 转换为标准的文件,如: TypeScript,Less,Sass
  • dependence - 依赖分析,workflow 里只处理被依赖的文件,提高编译性能
  • workflow - 内容替换等处理,如:压缩,上 CDN

配置文件示例

// stc.config.js

var stc = require('stc');
var uglify = require('stc-uglify');
var eslint = require('stc-eslint');

stc.config({
  include: ['template/', 'static/']
})

stc.lint({
    eslint: {plugin: eslint, include: /\.js$/, options: {}}
});

stc.workflow({
    uglify: {plugin: uglify, include: /\.js$/, options: {}}
});

stc.start(); // 启动工作流程

已经开发完成的插件

lint

transpile

dependence

workflow

需要开发的插件

  • 国际化
  • CSS Sprite
  • seajs 代码合并
  • 模板 XSS 自动修复功能
  • CDN 功能上传到阿里云、七牛、又拍云的适配器
  • Vue.js 代码转译
  • Weex 代码转译
  • 类似 webpack 将项目打包在一起的插件
  • fontello
  • jade 预编译
  • nunjucks 预编译

如何开发

如何开发?