{"id":25670,"library":"grunt-es6-module-wrap-default","title":"grunt-es6-module-wrap-default","description":"Grunt plugin (v0.2.0) that wraps CommonJS and AMD modules generated by es6-module-transpiler so they can be required by their name rather than requiring `.default`. It helps transition from ES6 modules to CommonJS/AMD without changing consumer code. The plugin is minimal, specific to the es6-module-transpiler output, and provides a `type` option to choose between CJS and AMD wrapping. Release cadence is unknown; last release was 2014. It has no known alternatives for this exact use case.","status":"abandoned","version":"0.2.0","language":"javascript","source_language":"en","source_url":"git://github.com/stevoland/grunt-es6-module-wrap-default","tags":["javascript","gruntplugin"],"install":[{"cmd":"npm install grunt-es6-module-wrap-default","lang":"bash","label":"npm"},{"cmd":"yarn add grunt-es6-module-wrap-default","lang":"bash","label":"yarn"},{"cmd":"pnpm add grunt-es6-module-wrap-default","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency (Grunt ~0.4.2) required for plugin to work","package":"grunt","optional":false}],"imports":[{"note":"Grunt plugin: register via loadNpmTasks, not import.","wrong":"import es6_module_wrap_default from 'grunt-es6-module-wrap-default';","symbol":"es6_module_wrap_default","correct":"grunt.loadNpmTasks('grunt-es6-module-wrap-default');"},{"note":"Task name in config must be string 'es6_module_wrap_default' as per Grunt convention.","wrong":"grunt.initConfig({ es6ModuleWrapDefault: { ... } });","symbol":"es6_module_wrap_default task config","correct":"grunt.initConfig({ es6_module_wrap_default: { ... } });"},{"note":"Only 'cjs' or 'amd' are accepted; 'format' is not a valid option.","wrong":"options: { format: 'amd' }","symbol":"options.type","correct":"options: { type: 'cjs' }"}],"quickstart":{"code":"// Install: npm install grunt-es6-module-wrap-default --save-dev\n// In Gruntfile.js:\nmodule.exports = function(grunt) {\n  grunt.loadNpmTasks('grunt-es6-module-wrap-default');\n  grunt.initConfig({\n    es6_module_wrap_default: {\n      options: {\n        type: 'cjs'\n      },\n      files: [{\n        expand: true,\n        cwd: 'cjs/transpiled',\n        src: ['**/*.js'],\n        dest: 'cjs'\n      }]\n    }\n  });\n  grunt.registerTask('default', ['es6_module_wrap_default']);\n};","lang":"javascript","description":"Registers the Grunt task and configures it to wrap CJS files from a source directory to an output directory, enabling require('name') instead of require('name').default."},"warnings":[{"fix":"Verify that your modules were generated by es6-module-transpiler.","message":"Only works with output from es6-module-transpiler; other ES6 transpilers may not produce compatible modules.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Migrate to Babel or TypeScript, which handle imports directly and do not require wrapping.","message":"es6-module-transpiler is deprecated; consider using Babel or TypeScript for ES6 module transpilation.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Ensure the property name exactly matches 'es6_module_wrap_default'.","message":"Task configuration uses 'es6_module_wrap_default' as the property name; misspelling or incorrect casing will not throw an error—silent failure.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Double-check file glob patterns and cwd.","message":"If no files are matched, the task completes without any output—no error.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'2014':77 'altern':82 'amd':14,68 'cadenc':71 'case':87 'chang':43 'choos':64 'cjs':66 'code':45 'commonj':12 'commonjs/amd':41 'consum':44 'default':6,33 'es6':3,19,38,54 'es6-module-transpiler':18,53 'exact':85 'generat':16 'grunt':2,7 'grunt-es6-module-wrap-default':1 'gruntplugin':89 'help':35 'javascript':88 'known':81 'last':74 'minim':49 'modul':4,15,20,39,55 'name':29 'option':62 'output':57 'plugin':8,47 'provid':59 'rather':30 'releas':70,75 'requir':26,32 'specif':50 'transit':36 'transpil':21,56 'type':61 'unknown':73 'use':86 'v0.2.0':9 'without':42 'wrap':5,11,69","created_at":"2026-05-01T13:45:57.577916+00:00","updated_at":"2026-05-01T13:45:57.577916+00:00","problems":[{"fix":"Add `grunt.loadNpmTasks('grunt-es6-module-wrap-default');` to your Gruntfile.","cause":"The task is not registered; grunt.loadNpmTasks was not called or the plugin is not installed.","error":"Warning: Task \"es6_module_wrap_default\" not found."},{"fix":"Ensure your Gruntfile has a property named exactly 'es6_module_wrap_default' with valid options.","cause":"Invalid configuration; the property name may be misspelled or options are not an object.","error":"Fatal error: Unable to read task \"es6_module_wrap_default\" options."},{"fix":"Check the file paths and cwd in the files configuration.","cause":"The source file glob pattern is incorrect or the directory does not exist.","error":"No files matched."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/stevoland/grunt-es6-module-wrap-default","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/grunt-es6-module-wrap-default","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}