transform-to-matrix
Version:
A tiny library to get 2/3D matricies from CSS3 transform functions. Fully covered by unit tests, with support for AMD, CommonJS, Node, and browser globals.
56 lines (55 loc) • 1.31 kB
JavaScript
// Generated by CoffeeScript 1.6.3
module.exports = function(grunt) {
var config, deps, name, nameParts, pkg;
nameParts = __dirname.split('/');
name = nameParts[nameParts.length - 1];
pkg = grunt.file.readJSON('package.json');
deps = grunt.util._.keys(pkg.dependencies);
config = {
pkg: pkg,
coffee: {
compile: {
files: {}
},
options: {
bare: true
}
},
uglify: {
options: {
mangle: {
toplevel: true
},
compress: {
dead_code: true,
unused: true,
join_vars: true
},
comments: false
},
standard: {
files: {}
}
},
umd: {
all: {}
}
};
config.coffee.compile.files[name + '.js'] = name + '.coffee';
config.uglify.standard.files[name + '.min.js'] = [name + '.js'];
config.umd.all = {
src: name + '.js',
objectToExport: name.replace(/-/g, ''),
amdModuleId: name,
globalAlias: name,
deps: {
"default": deps || []
},
template: 'grunt-umd-template.hbs'
};
grunt.config.init(config);
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-umd');
return grunt.registerTask('default', ['coffee', 'umd', 'uglify']);
};