Skip to content
This repository has been archived by the owner. It is now read-only.
DEPRECATED. Tâmia workflow for Grunt.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
modules
test
.editorconfig
.gitignore
.jscs.json
.jshintrc
.travis.yml
Changelog.md
License.md
Readme.md
index.js
package.json

Readme.md

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.

You can’t perform that action at this time.