node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

generator-baumeister

npm version Build Status Coverage Status devDependency Status Dependency Status Code of Conduct Join the chat at https://gitter.im/micromata/baumeister Twitter

Yeoman Generator for »Baumeister«

Baumeister Logo          Yeoman Logo   

Using this generator will give you a solid base for your project in a matter of minutes. No matter if it’s a static website or a single page application.

Baumeister is here to help you to build your things by providing:

  • a file structure with focus on maintainability and upgradability
  • a Gulp workflow with the following »features«
    • generate static sites with ease using handlebars templates (optional)
    • transpile, bundle and minify your code (ES6 as well as Sass)
    • remove console output and debugger statements in production files
    • add vendor prefixes
    • lint JavaScript, Sass and HTML
    • optimize images (lossless)
    • start a local server
    • keep browsers in sync for testing
    • delete unused CSS (optional)
    • check for know vulnerabilities in dependencies
    • release new versions
    • run unit tests and create coverage reports
    • and more.

Please check the epic README of »Baumeister« to get detailed information about what it’s all about.

Features of this generator

There are tons of options for now 😱
… but don’t be afraid – most of them are optional and you probably won’t see them all because some are depending on others. Plus the ones that probably don’t change from one project to the other are stored for your convenience.

Option Description
projectName Used in the generated README and package.json
projectDescription Used in the generated README and package.json
theme Name of your Bootstrap theme. Used to name a file and a folder within the Sass directory
projectType Adds static site generator abilities (using Handlebars and Frontmatters) if you choose to build a static website
customPaths Option to define output paths
boilerplateAmount Option to choose the amount of boilerplate code (HTML, Sass and JS examples)
license Option to define the license type. Defaults to MIT
initialVersion Option to define the initial version number used in generated package.json. Defaults to 0.0.0
authorName Option to define the author for use in the generated package.json and JavaScript files
authorMail Option to define the author for use in the generated package.json and JavaScript files
authorUrl Option to define the author for use in the generated package.json
projectHomepage, projectRepositoryType, projectRepository Option to define homepage and repository for use in the generated package.json
issueTracker Option to define the URL to your issue tracker for use in the generated package.json
banner Optionally adds a comment banner containing author name, version and build date to your production files (CSS and JS)
addDistToVersionControl Option to decide whether to add the dist directory to version control or include it in .gitignore

Frequent Users, who are tired being asked the same questions again and again might use a config file called .yo-rc.json like described here.


Quick install guide

For those already using Yeoman.

npm install -g generator-baumeister
yo baumeister

Dependencies

  • Node.js (>=6.0.0)
  • Gulp

See detailed installation instructions over here if you are new to this.

Getting Started

What is Yeoman?

Trick question. It's not a thing. It's this guy:

Yeoman Logo

Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.

Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.

npm install -g yo

Yeoman Generators

Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.

To install generator-baumeister from npm, run:

npm install -g generator-baumeister

Finally, initiate the generator:

yo baumeister

Options via command line flags

--skip-cache

Do not remember prompt answers for next run of the generator

Default: false

yo baumeister --skip-cache

--skip-install

Do not automatically install dependencies

Default: false

yo baumeister --skip-install

--yo-rc

Read and apply options from .yo-rc.json and skip prompting

Default: false

yo baumeister --yo-rc

You could place a .yo-rc.json in the directory you are going to run the generator or in any parent directory up to your user directory (~/.yo-rc.json)

This file should contain the options which are otherwise prompted by Yeoman. See the follwoing example .yo-rc.json:

{
  "generator-baumeister": {
    "projectName": "My project",
    "projectDescription": "My projects description",
    "banners": false,
    "projectType": "A static website (Static site generator using Handlebars and Frontmatters)",
    "theme": "my-theme",
    "boilerplateAmount": "Almost nothing - Just the minimum files and folders",
    "license": "MIT",
    "authorName": "Michael Kühnel",
    "authorUrl": "http://www.micromata.de",
    "authorMail": "m.kuehnel@micromata.de",
    "projectHomepage": "https://github.com/micromata/baumeister",
    "projectRepositoryType": "git",
    "projectRepository": "git@github.com:micromata/baumeister.git",
    "issueTracker": "https://github.com/micromata/baumeister/issues",
    "customPaths": false,
    "initialVersion": "1.0.0",
    "addDistToVersionControl": false
  }
}

See Features of this generator.

Getting To Know Yeoman

Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.

If you'd like to get to know Yeoman better, check out the complete Getting Started Guide.

Contributing to this project

Anyone and everyone is welcome to contribute. Please take a moment to review our Code of Conduct as well as our guidelines for contributing.

License

Please be aware of the licenses of the components we use in this project. Everything else that has been developed by the contributions to this project is under MIT License.