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

yazi

v1.0.1

Published

前端自动化工程

Downloads

48

Readme

前端自动化工程

1.0.0

yazi mb/pc init

yazi dev

yazi build -s 1/2

yazi build

Installation

sudo npm install -g yazi

Getting To Know yazi

初始化前端脚手架 init

  1. yazi mb init
  2. yazi pc init

生成前端项目脚手架,脚手架目录:

[test-613]
  | -- package.json
  | -- [src]
  |     | -- [images]
  |     |     | -- [slice]
  |     | -- index.html
  |     | -- [js]
  |     |     | -- index.js
  |     | -- [less]
  |     |     | -- style.less
  |     | -- [lib]

当前yazi版本生成的脚手架只常规的符合commonjs规范。并没有支持vue,react等。

根据mb/pc不同生成的脚手架具体内容不同,比如html头信息不同。

browser-sync实时调试 dev

  1. yazi dev

调试模式下打开默认打开localhost:8000页面。 在调试过程中支持

  • es6编译
  • less编译
  • 书写js的commonJS规范(require)

可以在项目中进行npm install xxx --save

项目构建 build

  1. yazi build -s 1
  2. yazi build -s 2
  3. yazi build

yazi build

将src文件夹内的项目文件构建并生成build文件夹。

其中包含:

  • es6编译混淆压缩
  • less编译
  • 图片压缩

注意事项:

需要进行雪碧图转换的图片需要放在images/slice文件下内,并且在css中需要使用background-image属性引用图片。

.test1 {
	width: 30px;
	height: 30px;
	background-image: url('../images/slice/img1.png');
}

yazi build -s 1

将src文件夹内的项目文件构建并生成build文件夹,并将图片转换为雪碧图,修改对应css。

此处的 -s 1表示sprite雪碧图设置,并且在普通屏幕上使用(pc和非retina屏)

yazi build -s 2

将src文件夹内的项目文件构建并生成build文件夹,并将图片转换为雪碧图,修改对应css。

此处的 -s 2表示sprite雪碧图设置,并且在retina屏使用。

TODO

  • [ ] 添加一些处理css的gulp插件
  • [ ] build时图片进行七牛空间自动上传。

License

MIT © 南洋