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

frontbuild

v1.0.1

Published

front build tool

Downloads

2

Readme

frontbuild

前端构建工具

version license

=========

frontbuild是干什么用的?

frontbuild是快速搭建前端构建工程的一个命令行工具

  • 在初始化时,它会新建项目的目录结构
  • 它集成browserify、reactjs、less、ejs,对js、css、html文件的模块进行管理
  • 在线下开发时,它使用express对资源进行动态解析,使代码实时生效
  • 它能对资源进行打包,生成线上资源,同时给html文件中引用的资源添加md5戳

frontbuild怎么使用?

先安装frontbuild

npm install frontbuild -g

接着新建你的项目目录

mkdir yourProject
cd yourProject

初始化项目

frontbuild init
// 这时会生成如下目录结构
-src       // 资源目录 开发的html文件可以放这里  html文件支持ejs
|--js      // js资源目录 开发的js文件可以放这里  js文件支持browserify jsx文件支持reactjs
|--css     // css资源目录 开发的less文件可以放这里 less文件支持less解析
-asset     // 打包的资源目录   当打包代码时,frontbuild会将src下的文件打包到这里来
|--js      
|--css
-widget    // 放置模块的目录

开启解析服务,可以访问线上文件或者线下文件,也可以指定服务的端口

// 开启服务,这时根目录指向/src,访问线下文件
// 访问js文件夹下的js文件,会使用browserify解析,访问jsx文件时会使用browserify和reactify解析
// 访问css文件夹下的less文件,会使用less解析
frontbuild server offline -p 9000

// 开启服务,这时根目录指向/asset,访问线上文件
// 这里访问到的文件都是已经打包好的
frontbuild server online -p 9000

打包src下的文件

// 将/src下的文件按相同的路径打包到/asset下
// less文件会被编译称css文件,js、jsx文件都会被编译成js文件,所以/src路径下,在同样路径中的js、jsx文件不允许同名
frontbuild build