3.2.1 • Published 8 years ago

generator-wabp v3.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

wabp – Web App Boilerplate

:star2: Formerly known as jmBoilerplate :star2:

Dependency Status npm version License

A kickstarter boilerplate for web apps

1. Features

  • HTML5 ready
  • Modular JavaScript architecture with dependency management (RequireJS, Bower)
  • Optionally including AngularJS with frequently used services like routing, translation, configuration and a mediator
  • Builds for development and production
    • Including local server and livereload
    • SCSS/Compass compilation and minification
    • Sprite generation (including @2x)
    • HTML minification
    • ZIP generation
  • Deployment tasks (local and FTP)
  • Simply to integrate other components like Bootstrap or Foundation
  • Optionally including browser detection and fallback messages for unsupported browsers

2. Installation

Requirements: NodeJS including npm, Bower, Grunt and Yeoman as well as Compass installed.

  1. Install the yeoman generator and run it

    $ npm install -g generator-wabp
    $ yo wabp
  2. Run $ grunt dev

  3. Finally open the application in your browser via the file:///-protocol or the localhost URL that has been printed to the console, as in this example: http://localhost:8000.

Happy hacking!

Tip: You can forward your local server port to e.g. Android devices

3. Grunt tasks

The boilerplate has tasks for different approaches:

3.1 Dev build

The build for development. Run it with $ grunt dev.

Options:

OptionTypeDefaultDescription
serverbooltrueIf you want to run a development server. Note: This is necessary for livereload
portint8000The port for the development server
spritesbooltrueSpecify false if your application does not contain sprite images
livereloadbooltrueSet it to false if you want to disable livereload on file changes
livereloadPortint35729The related livereload port

Note: Options can be passed like $ grunt dev --option=value.

Learn more about this task at the wiki.

3.2 Prod build

The build for production. Run it with $ grunt prod.

Options:

OptionTypeDefaultDescription
spritesbooltrueSpecify false if your application does not contain sprite images
minifyHTMLbooltrueIf you want to disable HTML minification
minifyHTMLIgnorestring""If you just want to prevent HTML minification for specific files and not generally you can use this option. For a single file use --minifyHTMLIgnore=myfile.html and for multiple files --minifyHTMLIgnore={myfile.html,secondFile.html}
absolutePathsbooleanfalseWhether paths to js, css, resources and image files should be generated relative (./) or absolute (/)
zipbooltrueIf you want to generate a zip of the dist output

Note: Options can be passed like $ grunt prod --option=value.

Learn more about this task at the wiki.

3.3 Local deployment

Deploy the generated output to a local target. Run it with $ grunt deploy-local.
This assumes that you have already ran the production build.

Options:

OptionTypeDefaultOptionalDescription
targetstringnonefalseThe target destination path for the deployment. Note: Use / forward slashes instead of Windows \ backslashes.
excludestringnonetrueA list of files to exclude. Use a "," to separate multiple files. Example: --exclude="index.html, assets/**"

Note: Options can be passed like $ grunt deploy-local --option=value.

3.4 FTP deployment

Deploy the generated output to a FTP target. Run it with $ grunt deploy-ftp.
This assumes that you have already ran the production build.

Options:

OptionTypeDefaultOptionalDescription
hoststringnonefalseFTP host, e.g. "mydomain.com"
portnumber21trueFTP connection port. Normally it is 21
usernamestringnonetrueFTP username (if necessary)
passwordstringnonetrueFTP password (if necessary)
deststring"/"trueThe destination path on the FTP server
excludestringnonetrueA list of files to exclude. Use a "," to separate multiple files. Example: --exclude="index.html, file.txt"

Tip: You can also use this task with environment variables. Just set FTP_USERNAME, FTP_PASSWORD, FTP_HOST and optionally FTP_PORT. Environment variables will have higher priority than task arguments.

Note: Options can be passed like $ grunt deploy-ftp --option=value.

3.5 Version update

Update the version of your app. Will change the version in bower.json and package.json.
Run it with $ grunt version-update.

Options:

OptionTypeDefaultOptionalDescription
targetstringnonefalseThe version target, e.g. 1.0.0

Note: Options can be passed like $ grunt deploy-ftp --option=value.

3.2.1

8 years ago

3.2.0

8 years ago

3.1.0

8 years ago

3.0.4

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.0.0

8 years ago

0.1.0

8 years ago