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

generator-anquire

v0.0.8

Published

Yeoman generator for AngularJS using RequireJS

Downloads

16

Readme

### 创建项目

mkdir my-new-project && cd $_ yo anquire:init bower install sudo tnpm install (npm install)

### 注意默认使用scss

### 开启项目
```bash
grunt serve   部分html动态合并project.tpl.js
grunt server  全部html动态合并为project.tpl.js

构建

grunt build  整站资源打包
grunt builder  全局打包+route页面2次打包

安装ui组件

bower install [email protected]:jianlin.zjl/angular-console-dpl.git --save

由于默认template 中使用angular-console-dpl 为获取更好效果您可以使用angular-console-dpl组件集 并打开main.js 与app.js 中注释

Generators 命令

Available generators:

  • 1.创建路由route, yo anquire:r [routename] [type?] --route routename参数路由名称 type参数创建路由页面的类型(可以没有,强烈建议选择类型)目前支持 -c | create; -e | edit; -l | list
  • 2.创建data模拟数据文件与注入, yo anquire:data [dataname][type?]
    dataname名称 type参数创建data的类型(可以没有)目前支持list submit data
  • 3.创建modal弹出层 yo anquire:m [modalname] [routename?] --modal modalname弹出层名称 routename所在路由页面的名称(可以没有默认注册在全局,强烈建议写上)
  • 4.创建directive, yo anquire:d[name][routename?] --directive (同上)
  • 5.创建service, yo anquire:s [name] [routename?] --service (同上)
  • 6.创建controller, yo anquire:controller [name] [routename?]
    (同上,创建route modal 会自动创建controller 一般不需要创建)
  • 7.创建filter, yo anquire:filter [name] [routename?]
    (同上)
  • 8.创建decorator provider value constant (同上)
  • 9.创建css, yo anquire:css [cssname]
    (不建议使用 创建route modal directive 会自动创建css 不需要重新创建)
  • 10.创建view yo anquire:view [viewname]
    (不建议使用 创建route modal 会自动创建view 不需要重新创建)

举例

  • 创建一个route名称为test类型为列表的页面 yo anquire:r test -l
  • 创建一个dirctive名称为dtest属于路由test页面 yo anquire:d dtest test

注意 请勿修改初始化代码的格式与注释 有可能导致后面的注入的代码有问题 推荐使用命令直接创建内容会自动注入关系 手动创建得当心

开发调试

  • 本地开发 grunt serve开启服务 使用apimap.js模块,url统一管理,根据host切换url,本地直接到data目录下创建模拟数据
  • daily线上调试 grunt server开启服务 使用代理工具将线上的index.html代理到本地localhost:9000/index.html 即可实现线上环境与接口 本地资源实时调试

Note: Generators are to be run from the root directory of your app.