UNPKG

matrix-utilities

Version:

Tiny, high performance utilities for performing 2/3D matrix calculations. Full unit test coverage, compatible with Node/CommonJS, AMD, and browser globals.

59 lines (57 loc) 1.45 kB
// Generated by CoffeeScript 1.6.3 (function() { 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('-', ''), 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']); }; }).call(this);