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-mtb-app

v0.2.2

Published

Generator Generator for Yeoman

Downloads

25

Readme

generator-mtb-app

mtb-app generator for Yeoman generators

NPM version Downloads

Getting started

  • Install: npm install -g generator-mtb-app
  • Run: yo mtb-app

What do you get?

Scaffolds out a complete project directory structure for you:

<repo>
├── <build> : 打包之后的待发布文件
├── <demo> : 视觉还原页、代码示例、用法展示等。合并类似用法: <samples>
├─┬ <src> : 项目产生的文件。合并类似用法:assets
│ ├─┬ <css> : CSS文件,包括Less/Sass也可以放在这里,并结合.gitignore和Grunt watch/Gulp watch使用
| | └── *.css
│ ├─┬ <js> : CSS文件,包括Coffee也可以放在这里,并结合.gitignore和Grunt watch/Gulp watch使用
| | └── *.js
│ ├─┬ <images> : 图片文件
| | └── *.jpg, *.png, ...
│ └── *.html : HTML 文件
├── <test> : 测试用例,lib库推荐使用
├──!<tmp> : 存放各种没有合适存放位置的临时文件。合并类似用法: <dist>
├──!<node_modules> : npm包,不随git提交
├──!<bower_components> : bower包,不随git提交
├── .gitignore : 待确定一个规范化的范围
├── bower.json : 前端静态资源包依赖
├── Gruntfile.js/Gulpfile.js : 自动化打包/编译/监视工具
├── package.json : node包依赖
└── README.md : 项目信息简介,格式待敲定

Useage

$ npm install -g yo
$ npm install -g generator-mtb-app
$ yo mtb-app

接下来,就可以启动grunt进行愉快的编码了。 项目初始化的时候会让您选择流式构建工具采用grunt 或者是 gulp

如果您选择的是grunt

$ grunt

grunt 默认会启动 watch 模式,less/文件下的less文件会自动编译到build/css/文件下,js/文件夹下的js会自动压缩至build/js/目录下。

$ grunt build

grunt build 会自动将 带有 data-htmlone 属性并引用本地文件的 <link><script> 标签自动替换为 css 和js的内容。Combo到html一起。在dest/目录下。详见项目 amfe/or.htmlone

如果您选择的是gulp

$ gulp

默认执行default task, 会自动编译less,scss,压缩css,js,并启动watch模式

ChangeLog

  • 0.1.8
    • 修复gulpfile中rename 生成 .debug 后缀的的使用方式
    • 根据less和sass的选择定制gulpfile, 去掉冗余的gulp plugin 引入
    • html模板 的 flexible.js 和 flexible.css 动态的从 gitlab lib.flexible 项目中master上拉取,保证最新
    • 根据需求加入 cleanconcat 的默认task
  • 0.1.9
    • 去掉默认自动调用 npm install, 容易丢包,此版本之后的版本都将不自动 npm install,用户手动安装本地npm 依赖
  • 0.2.0
    • 所有package.json 依赖都改成 ^ 依赖大版本号下最新
  • 0.2.1
    • 修复模板文件index.html 拼装失败(权限不够)问题
  • 0.2.2
    • fix gulp-ruby-sass & gulp task index