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

cocoon-framework

v2.0.2

Published

The front end framework with angular and requrie.

Downloads

6

Readme

Cocoon

Cocoon是集成angular.jsrequire.js的前端MVC开发框架,通过require.js扩展angular.js模块按需要加载资源文件。结合gulpcompass,提高开发流程效率,降低程序维护成本。

特性

  • 遵循AMD规范
  • 项目构建命令行工具
  • 移动布局处理工具

安装

$ sudo npm install cocoon-framework -g
$ cocoon --new project-name

运行

注:cocoon 默认依赖 compassgulp 4.0

$ cd project-name
$ npm install
$ gulp

目录结构

├── bower.json
├── build.js
├── config.rb
├── gulpfile.js
├── package.json
└── src
    ├── config.json
    ├── css
    │   ├── home.css
    │   └── layout.css	
    ├── index.html
    ├── sass
    │   ├── _globals.scss 
    │   ├── home.scss
    │   └── layout.scss            
    ├── scripts
    │   ├── app.js 
    │   ├── bootstrap.js  
    │   ├── controllers   
    │   │   └── home.js
    │   ├── directives   
    │   │   └── back.js
    │   ├── layout.js    
    │   ├── services     
    │   │   ├── ajax.js
    │   │   ├── storage.js
    │   │   ├── typing.js
    │   │   └── url.js
    │   └── vendor 
    └── views			
        ├── 404.html
        └── home.html

配置文件

└── src
    ├── config.json

配置文件中定义包括了路由信息,通过define(['config'],function(config) { })读取配置。

创建控制器

$ cocoon --create controller user 
$ cocoon --create controller user product
$ cocoon --create controller user/login  user/profile

创建控制器的过程中,会同时创建与控制器相绑定的 html视图,scss 文件和 css文件,自动注册路由。

创建模型

$ cocoon --create model user

创建指令

$ cocoon --create directive back

创建服务

$ cocoon --create service storage

交流反馈

联系邮箱:[email protected]

协议

Cocoon框架遵循 MIT 开源协议。