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

es6-webpack2-boilerplate

v1.0.3

Published

a boilerpalte for web devolopment with es6 and webpack2

Downloads

2

Readme

Es6-Webpack2-Boilerplate npm version Build Status Coverage Status

基于 babel6webpack2 构建的前端开发工作流

项目规范

该模板是遵循下面的目录规范进行构建的,如果要使用不同的目录结构,需要修改对应的配置文件(主要是入口文件和静态页面文件)

  • 所有页面放置在 views 文件夹下,并且不能有嵌套目录结构,否则会被忽略

  • 每个页面对应的入口文件(入口文件一定要命名为 index.js )都需要放在 src/views/[name] 文件夹下,其中 [name] 为页面的文件名

  • 构建时,提取前端资源遵循以下方法:

    • 项目依赖的第三方模块(通过 npm 管理的)以及 src/vendor 目录下面的模块一起打包成一个文件,即 vendor.js
    • src/vendor 目录下面应该放置一些不经常更新的模块,这样做主要是为了更好使用缓存
    • 每个模块如果被 2 个及以上的页面所共用,则会提取出来放到 common.js 文件中

特性

下载

$ git clone https://github.com/maiwenan/es6-webpack2-boilerplate my-app
$ cd my-app
$ npm install

注意 : 修改 package.json 文件相关的内容,如 : name, description, author, repository

使用

  • 开发阶段可以运行下面的命令启动项目,启动后可以访问 http://localhost:3000/home.html
npm start
  • 启动移动端调试的开发模式,启动后可以访问 http://localhost:3001/remote-debug 进行调试
npm run debug
  • 发布阶段运行下面的命令对前端资源进行构建
npm run build

License

MIT License