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
yo
command to scaffold complete projects or useful parts.
And 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 line
npm install && bower install
gulp serve
You can visit http://0.0.0.0:7000/
.
✓ Powerful development server(BrowserSync for static files, Koa for API proxy and template rendering). Automatically restart server by nodemon
.
✓ 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 ownlayout
,data file
and so on. - The
data file
means 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: false
inside 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.js
rewrite based onkoa-hbs
. Because ofyaml
support, layout dynamic load and other features, rewritekoa-hbs
instead of depend on it.- Borrowed base config and some gulp tasks from
generator-gulp-webapp
.
Thanks for their great work.
0.x
is deprecated.
2015-10-26 v1.1.0
upgrade build task.
2015-10-21 v1.0.1
fix render data priority.
2015-10-21 v1.0.0
modify templating and rendering process; other changes.
2015-10-08 v0.3.0
add raw html demo; add gitignore config prompt.
2015-10-08 v0.2.0
serve raw html(no templating); config file change/enhance and others.
2015-09-23 v0.1.1
include normolize.css correctly; other small changes.
2015-09-22 v0.1.0
init
MIT