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

dev-scripts

v1.1.3

Published

## 环境准备

Downloads

8

Readme

dev-scripts

环境准备

nodejs >= 8.0.0

功能

  • 支持 twig 模版引擎 ( 与 php twig 兼容情况 )

    • config/twig.js 里可配置相应 filter ( php 端也要对应实现 )
  • 支持 sass

    • 开发环境生成 sourceMap
  • 支持 webpack

    • 集成 babel 支持 es6 语法
    • 集成 jQuery 1.12.4 与 js-cookie 为 common.js 并且全局 ( window ) 可访问
  • 支持 css sprites

    • 开发环境需要单独引用图片
    • 在构建的时候可以自动合并图片
    • 支持移动端 rem 单位转换 ( dpr 转换 )
    • 自动给图片添加版本号 ( 通过图片的 md5 值计算 )
  • 服务器端代理请求

    • config/app.config.js 里 porxy 选项配置
    • 可直接配置线上请求地址来联调
  • 自定义 router

    • config/router.js 里配置 一般用在模拟 ajax 请求接口
  • 基于 gulp 构建

    • 构建出的 css js img 默认在 build 目录下

安装

$ npm install -g dev-scripts
# or
$ npm install dev-scripts -D

使用

$ dev-scripts server # http://127.0.0.1:1337
$ dev-scripts build

支持的目录结构

.
├── README.md
├── config <!-- 配置文件 -->
│   ├── app.config.js
│   ├── router.js
│   ├── twig.js
│   └── webpack.config.js
├── data  <!-- 模版数据文件 -->
│   └── index.js
├── package.json
├── static <!-- 静态文件 -->
│   ├── img
│   │   └── src
│   ├── js
│   │   └── index.js
│   └── sass
│       ├── index.scss
│       └── lib
│           ├── public.scss
│           └── reset.scss
├── views <!-- 模版文件 -->
│   ├── common
│   │   └── layout.html
│   └── index.html
└── yarn.lock

快速创建项目

更新记录

  • v1.1.3 (2017-06-26)

    • 修复局部安装 build 的问题
  • v1.1.2 (2017-06-22)

    • ~~修复局部安装 build 的问题~~
  • v1.1.1 (2017-06-22)

    • ~~修复 build 在 windows 下的问题~~
  • v1.1.0 (2017-06-22)

    • 添加对 twig 的配置文件支持
    • 修改 creates 的配置文件位置
    • 升级依赖包
  • v1.0.2 (2017-06-20)

    • 修复局部安装找不到 babel-preset-env 的问题