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

wpbase-cli

v0.0.7

Published

A front end project seed for whatever

Downloads

2

Readme

what-seed

A front end project seed for whatever

Functionality

这是一个前端webpack种子项目,可以用来生成前端的起始项目。通过问答完成移动端适配、sass编译等环境配置,类似vue-init.

详见已实现功能

Usage

$ wpbase-cli create <project-name>

Installation

git clone

$ git clone https://github.com/pillarBoy/what-seed
$ cd what-seed
$ npm link  # make wpbase-cli a global command, might have accession issues.
            # alternatively, set path-to-webcli-dir as env variable

$ wpbase-cli create myproject  
$ cd myproject

start to work

Customize this seed

当前可以通过修改 src/config.template.js 来修改默认配置,这个文件将会复制到生成项目的 webpack/config.js 由webpack引用

问答可以定制一些不同场景下的不同配置,在 src/questions.js 中可以定制问答项目。

引入单元测试,编写测试文件 test/test.jsnpm test 运行测试,npm run coverage 运行istanbul覆盖率测试

istanbul 依赖的 esprima 暂不支持async,因此控制台会有一些无关的报错

Details

移动端适配方案: 依照750px设计图写尺寸(后续将增设配置),单位用px, 编译时,由px2rem转为rem,根据ClientWidth设定根字体,完成响应式适配。

在webpack中引入了px2rem,基准宽度是750px,因此750px宽度设计图的尺寸可以直接用到css文件中,单位是px

代码在生成项目中的 src/utils/htmlFontSize.js

不想转换的,如1px 线,写作 border: 1px solid #ddd; /*no*/,想转换,但需要保留px单位的,如字体,写作 font-size: 28px; /*px*/

详见px2rem文档

支持版本

async await 需要node > 7.6支持

项目包管理,使用yarn

项目初始化

yarnnpm install

dev

yarn start

build

yarn build

Regards

vue-cli

px2rem