Registry / devops / grunt-mailru-frontend

grunt-mailru-frontend

JSON →
library0.0.3jsnpmunverified

A Grunt.js multi-task that minifies CSS and JS files with intelligent caching. It uses UglifyJS for JavaScript and CSSO (by Yandex) for CSS, with automatic @import inlining and url() rewriting. The key differentiator is its .build-catalog.json catalog that stores file checksums and last compilation dates, skipping re-minification of unchanged files to save CPU time and preserve modification timestamps. Version 0.0.3 is the latest release, with no recent updates. This plugin also supports versioned URL rewriting for effective cache busting.

npm install grunt-mailru-frontend
INSTALL
IMPORT
SIG · GRUNT-MAILRU-FRONT
G
grunt-mailru-frontend
devopsjavascriptv0.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

frontend-js
grunt.loadNpmTasks('grunt-mailru-frontend')
require('grunt-mailru-frontend')
Registers the plugin tasks (frontend-js, frontend-css, frontend-index) via Grunt's loadNpmTasks.
frontend-css
grunt.loadNpmTasks('grunt-mailru-frontend')
const frontendCss = require('grunt-mailru-frontend')
Tasks are registered globally; no direct import needed.
frontend-index
grunt.loadNpmTasks('grunt-mailru-frontend')
require('grunt-mailru-frontend').registerTasks(grunt)
The plugin auto-registers tasks via npm task loading.

Shows basic Gruntfile configuration for JS and CSS minification tasks using grunt-mailru-frontend.

module.exports = function(grunt) { grunt.initConfig({ 'frontend-js': { main: { options: { minify: true }, files: { 'out/js/bundle.js': ['src/js/*.js'] } } }, 'frontend-css': { main: { options: { inline: true, rewriteUrl: true, minify: true }, files: [{ src: 'src/css/*.css', dest: 'out/css' }] } }, frontend: { srcWebroot: './src', webroot: './out', rewriteScheme: '/-/<%= version %><%= url %>' } }); grunt.loadNpmTasks('grunt-mailru-frontend'); };
Debug
Known issues
deprecatedPackage is unmaintained and only supports Grunt 0.x, not Grunt 1.x.
fix
Use modern alternatives like grunt-contrib-uglify and grunt-contrib-cssmin, or migrate to other build tools.
affects: >=0.0.0
gotchaThe catalog file (.build-catalog.json) is created in the 'targetdir' option, not in the output directory by default.
fix
Set 'targetdir' explicitly to the desired catalog location or use 'onlyCatalog: true' to generate catalog only.
affects: >=0.0.0
breakingTypo in global config key: 'frontent' (missing 'd') in example.
fix
Use 'frontend' instead of 'frontent' in Gruntfile config.
affects: 0.0.3
gotchaCSS @import inlining with 'inline: true' may break if imports use absolute paths without 'srcWebroot' set correctly.
fix
Set 'srcWebroot' to the root of your source files to resolve absolute paths.
affects: >=0.0.0
deprecatedUglifyJS version bundled is outdated; no support for modern JS features like ES6+.
fix
Use a dedicated JS minifier plugin or tool that supports ES6+.
affects: >=0.0.0
Errors
Common errors & fixes
Fatal error: Unable to find task 'frontend-js'.
Plugin not registered via grunt.loadNpmTasks.
fix
Add 'grunt.loadNpmTasks('grunt-mailru-frontend');' in your Gruntfile.
TypeError: Cannot read property 'force' of undefined
Global config key 'frontend' is misspelled or missing.
fix
Ensure you have a 'frontend' config object (not 'frontent' or other).
Warning: Task 'frontend-js:main' failed. No files created.
Source files not found or glob pattern incorrect.
fix
Check file paths in the 'files' configuration; use absolute paths or adjust srcWebroot.
Upgrade
Version history
0.0.3latest on npm
Audit
Dependencies
gruntrequiredGrunt.js plugin, requires Grunt to run
Agent activity
6 hits · last 30 days
node
6
Resources
grunt-mailru-frontend — npm install grunt-mailru-frontend · libregistry