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

yyl-seed-gulp-requirejs

v5.0.11

Published

yyl 构建种子 - `gulp-requirejs`

Downloads

143

Readme

yyl-seed-gulp-requirejs

yyl 构建种子 - gulp-requirejs

SDK

seed.name

/**
 * @return {String} seed 包名称
 */
seed.name

seed.version

/**
 * @return {String} seed 包版本
 */
seed.version

seed.path

/**
 * @return {String} seed 所在目录
 */
seed.path

seed.example

/**
 * @return {Array} seed example list
 */
seed.path

seed.optimize()

/**
 * @param  {Object} config       配置文件
 * @param  {Object} config.alias                  作用域
 * @param  {String} config.alias.commons          公用组件地址
 * @param  {String} config.alias.globalcomponents 公用 components 目录
 * @param  {String} config.alias.globallib        公用 components 目录
 * @param  {String} config.alias.root             输出目录中 到 html, js, css, image 层 的路径
 * @param  {String} config.alias.revRoot          rev 输出内容的相对地址
 * @param  {String} config.alias.destRoot         dest 地址
 * @param  {String} config.alias.srcRoot          src 地址
 * @param  {String} config.alias.dirname          项目根目录
 * @param  {String} config.alias.jsDest           js 输出地址
 * @param  {String} config.alias.jslibDest        js lib 输出地址
 * @param  {String} config.alias.htmlDest         html 输出地址
 * @param  {String} config.alias.cssDest          css 输出地址
 * @param  {String} config.alias.imagesDest       images 输出地址
 * @param  {String} config.alias.revDest          assets 输出地址
 * @param  {String} config.alias.tplDest          tpl 输出地址
 * @param  {String} projectPath                   构建项目所在目录
 * @return Promise<opzer> opzer                         压缩实例
 */
seed.optimize({ config, root })

opzer

/**
 * @param  {Object}  op 参数
 * @param  {Boolean} op.isCommit 执行压缩
 * @param  {Boolean} op.remote   映射远程
 * @return {Object}  ctrler      操作句柄
 */
opzer.watch(op)
opzer.watchAll(op)
opzer.all(op)
opzer.js(op)
opzer.css(op)
opzer.html(op)
opzer.tpl(op)
opzer.images(op)

ctrler.on()

/**
 * @param {String} eventName 需要监听的事件,目前有
 *                           - onOptimize 对应 fn(file)
 *                           - finished   对应 fn(taskName)
 *                           - msg        对应 fn(type, argv)
 *                           - clear      对应 fn()
 *                           - start      对应 fn(taskName)
 */
opzer.on(eventName, fn)

ctrler.off()

/**
 * @param  {String} eventName 要解除绑定的 eventName, 
 *                            不填则全部都解绑
 * @return {Void}
 */
opzer.off(eventName)

ctrler.trigger()

/**
 * @param {String} eventName 需要触发的事件
 * @param {Array}  argv      参数
 */
opzer.trigger(eventName, argv)