grunt-microlib

raw JSON →
0.1.1 verified Fri May 01 auth: no javascript abandoned

Grunt plugin providing shared build tooling for microlibraries that use the ES6 module transpiler and a compatible folder structure. Version 0.1.1, last updated around 2015. Used by projects like rsvp.js. Provides tasks for building AMD, CommonJS, and browser bundles, as well as testing and development servers. Unmaintained since the ES6 module transpiler was superseded by Babel and modern module bundlers. Not compatible with current Node.js or Grunt versions due to deprecated dependencies.

error Error: Cannot find module 'es6-module-transpiler'
cause es6-module-transpiler not installed as a dependency.
fix
npm install es6-module-transpiler --save-dev
error Warning: Task "build" not found.
cause grunt-microlib not loaded or configured correctly.
fix
Ensure Gruntfile loads grunt-microlib via grunt.loadNpmTasks('grunt-microlib');
deprecated The ES6 module transpiler is deprecated; use Babel or Rollup instead.
fix Migrate to a modern build tool like Rollup or Webpack with Babel.
gotcha Dependencies rely on deprecated Grunt versions (0.4.x) and may not work with Grunt 1.x.
fix Pin Grunt to 0.4.x or switch to alternative.
breaking Node.js versions >10 may break due to outdated transitive dependencies.
fix Use Node.js version <=10 or find alternative.
npm install grunt-microlib
yarn add grunt-microlib
pnpm add grunt-microlib

Shows Gruntfile setup for grunt-microlib with basic configuration and available CLI tasks.

// Gruntfile.js
module.exports = function(grunt) {
  require('grunt-microlib')(grunt);
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    // Microlib config
    microlib: {
      name: 'my-lib',
      main: 'lib/main.js',
      output: 'dist/'
    }
  });
  grunt.loadNpmTasks('grunt-microlib');
};

// Then run:
// grunt build
// grunt test
// grunt server