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

mkpack

v1.2.0

Published

make package

Downloads

32

Readme

安装好之后:

mkpack init [路径、文件名] 会创建一个配置文件模板

mkpack build [路径、文件名] 会执行这个配置文件

目前只会分析cmd amd 格式的js 文件加载依赖,已经尽可能的实现了依赖细节。例如:

- 1,当打包某一个文件的时候,如果当前文件是第一个文件,则分析其所有依赖。如果属于被依赖文件,则只加载被依赖的模块(一个文件可以定义多个define,因此会有覆盖问题)
- 2,打包的时候,排除某一项依赖关系,会排除当前文件所包含的所有依赖(当且仅当这些依赖 只被当前排除的文件依赖)
- 3,打包文件只默认只根据后缀判断当前文件类型(类似seajs-text.js解析方式),tpl html htm会打包成模板 css会压缩(暂不会打包在文件内) js 会默认去除后缀后打包在文件内
- 4,整个打包文件 默认为(compress:true(压缩模式),combine:false(合并模式,这个模式下 会给匿名的define增加默认的define定义))

主要性能瓶颈,在 uglifyjs 上的消耗

[注意修改]

- ~~node_moudules/uglify-js2/tools/node.js-->line 85 add {except:options.except}] 已在1.1.8修复~~

[UPDATE]

- 2016-02-28 感觉 webpack 还是比较好的,所以对配置项中的 pkg loaders 优先读取 loaders ,except exclude 优先读取 exclude
- 2016-02-28 修复依赖关系的排除项,保持依赖关系的 深度先序加载方式
- 2016-02-28 解决模板在不同层次脚本加载中 出现模板字符无法被替换的BUG

[Q]

- FOR [email protected]

[log]

- 根据源文件来生成md5 来判断结果是否发生变化(通过最终结果生成的值可能因为压缩工具混淆的缘故,其结果不一致)