Yeoman generator which scaffolds out a front-end web app with gulp.
Yeoman is THE WEB'S SCAFFOLDING TOOL FOR MODERN WEBAPPS.
Yeoman helps yo u to kickstart new projects, prescribing best practices and tools to help you stay productive.
To do so, we provide a generator ecosystem. A generator is basically a plugin that can be run with the
yocommand to scaffold complete projects or useful parts.
generator-fly-webapp is a generator to help you to scaffold out a front-end web app.
To install generator-fly-webapp from npm, run:
npm install -g yo generator-fly-webapp
Then, initiate the generator:
yo fly-webapp [appName]
Finally, start the app:
# if dependencies were installed, ignore next linenpm install && bower installgulp serve
You can visit
✓ Powerful development server(BrowserSync for static files, Koa for API proxy and template rendering). Automatically restart server by
✓ Handlebars templating support. And every view file can use yaml head to specify layout, data file and other settings.
✓ CSS preprocessor(
sass), postprocessor(postcss) and sourcemap. Watch
.sass file and automatically process it.
✓ Lint scripts automatically(use eslint).
✓ Automagically wire-up dependencies installed with Bower
✓ The gulpfile is wrote in ES2015 features.
Koa is used to render handlebars templates and proxy API currently. But it's easy to enhance it and serve as a product server.
Handlebars is the default template. And some excited features are supported.
- Every view file can has a yaml head, just like
github jekyll blog system. And inside head we can specify its own
data fileand so on.
data filemeans data for template rendering. The plugin will load the data file with the same name of view file default.
- It's ok to set
layout: falseinside yaml head, and this will close layout and render template just like static html file.
Besides gulpfile, the whole server side code is wrote in
ES2015. Feel ease and embrace it.
koa-handlebars.es6.jsrewrite based on
koa-hbs. Because of
yamlsupport, layout dynamic load and other features, rewrite
koa-hbsinstead of depend on it.
- Borrowed base config and some gulp tasks from
Thanks for their great work.
0.x is deprecated.
v1.1.0 upgrade build task.
v1.0.1 fix render data priority.
v1.0.0 modify templating and rendering process; other changes.
v0.3.0 add raw html demo; add gitignore config prompt.
v0.2.0 serve raw html(no templating); config file change/enhance and others.
v0.1.1 include normolize.css correctly; other small changes.