0.5.1 • Published 9 years ago

tamia-grunt v0.5.1

Weekly downloads
5
License
-
Repository
github
Last release
9 years ago

Tâmia Grunt

Build Status

Tâmia workflow for Grunt.

Installation

npm install --save-dev tamia-grunt

Notes

The tamia-grunt will check all required Grunt plugins and ask you to install missed ones. It also will load all installed Grunt plugins via load-grunt-tasks.

Example

module.exports = function(grunt) {
	'use strict';

	require('tamia-grunt')(grunt, {
		tamia: {
			author: 'Artem Sapegin, http://sapegin.me'
		},
		concat: {
			main: {
				nonull: true,
				src: [
					'<%= bower_concat.main.dest %>',
					'<%= modernizr.main.outputFile %>',
					'tamia/vendor/*.js',
					'tamia/tamia/tamia.js',
					'tamia/tamia/component.js',
					'tamia/modules/form/script.js',
					'js/components/*.js',
					'js/main.js'
				],
				dest: 'build/scripts.js'
			}
		},
		// All other Grunt plugins
	});

	grunt.registerTask('default', ['styles', 'scripts', 'images']);
};

Config:

tamia: {
	author: 'Artem Sapegin, http://sapegin.me',  // Required
	src: '',  // Optional
	dest: '',  // Optional
	tamiaSrc: '',  // Optional
	modernizr: false,  // Optional: disable Modernizr
	stylobuild: {}  // Optional: Stylobuild options
}

Modules

Styles

Put your Stylus files into styles folder. styles/index.styl should exists. Then run grunt styles.

Config:

tamia: {
	stylesSrc: '',  // Optional
	stylesDest: ''  // Optional: destination folder
	stylesDestFile: ''  // Optional: destination file
	stylobuild: {}  // Stylobuild config, optional
}

Includes:

Scripts

There are three types of scripts:

  • Regular scripts: js/**/*.js. js/main.js should exists. Add concat section to your Gruntfile as in an example above.
  • Inlines: js/inlines/*.js. They will be uglifyed and put into build/inlines folder.
  • Bower components. They will be concatenated and into build/_bower.js.

Don’t forget to add .jshintrc to enable JSHint.

Run grunt scripts.

Config:

tamia: {
	scriptsSrc: '',  // Optional
	scriptsDest: '',  // Optional
	scripts: false,  // Override auto detection of regular scripts, optional
	inlines: true,  // Override auto detection uglifying inline scripts, optional
	bower: false  // Override auto detection for Bower concatenation, optional
}

Includes:

Images

Put your images into images_src folder. Then run grunt images.

Config:

tamia: {
	imagesSrc: '',  // Optional
	imagesDest: '',  // Optional
	pngquant: false  // Disable pngquant
}

Includes:

Modernizr

Custom Modernizr build. Will run automatically for either styles or scripts tasks.

Includes:

Doctor

Checks project configuration: required dependencies (more later). Run grunt doctor.

Changelog

The changelog can be found in the Changelog.md file.

Author


License

The MIT License, see the included License.md file.

0.5.1

9 years ago

0.5.0

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.1

10 years ago