Gathering detailed insights and metrics for grunt-glue-nu
Gathering detailed insights and metrics for grunt-glue-nu
Gathering detailed insights and metrics for grunt-glue-nu
Gathering detailed insights and metrics for grunt-glue-nu
npm install grunt-glue-nu
Typescript
Module System
Min. Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
11 Stars
36 Commits
3 Forks
2 Watchers
2 Branches
1 Contributors
Updated on Jul 24, 2017
Latest Version
0.3.2
Package Id
grunt-glue-nu@0.3.2
Size
21.72 kB
NPM Version
1.4.7
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Create sprites automatically with Glue, but the Grunt.js way!
This Grunt plugin wraps and enhances the Glue command line spriting tool. It's built as a Grunt multiTask that supports extensible task and target-specific options, multiple source locations per target, globbing and so on.
Every task target results in one sprite 'bundle', consisting of the sprite sheet PNG image and a style sheet. All of Glue's command line options are supported through the options, adding some sensible defaults in order to minimize the need for configuration.
Glue supports .less style sheet output.
☞ Jump to Usage
grunt-glue-nu also allows you to send the argument to glue as a string, bypassing the plugin logic. Meaning you can migrate to this plugin quickly and sort things out later. Or dodge bugs, should the need arise.
This plugin requires Grunt ~0.4.2
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
1npm install grunt-glue-nu --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
1grunt.loadNpmTasks('grunt-glue-nu');
grunt-glue-nu >= v0.3.0 is compatible with glue >= v0.9.0
grunt-glue-nu >= v0.2.0 is compatible with glue <= v0.9.1
grunt-glue-nu < v0.2.0 is compatible with glue <= v0.4
To make old grunt-glue-nu <= v0.2.0 compatible with glue >= v0.9 in the task options set debug: false
and remove any offending options that glue complains about. See: Glue's changelog
You can install specific version of grunt-glue-nu with npm install grunt-glue-nu@x.y.z --save-dev
In your project's Gruntfile, add a section named glue
to the data object passed into grunt.initConfig()
. This
section is called a task.
Minimal config: You must specify the task target's src
and dest
properties.
The file names of the sprite bundle and the sprite namespace will then be the same as the task target. You can change
any aspect of that through the options of course.
1grunt.initConfig({
2 glue: {
3 options: {
4 // Task-specific options go here.
5 },
6 // Target-specific file lists and/or options go here.
7 your_target: {
8 src: ['path/to/sprites/'],
9 dest: 'output/folder/'
10 }
11 }
12});
When setting up or troubleshooting a task it's always a good idea to run grunt with the --verbose
option to see
information such as the resulting exact arguments used with the glue
command and which files and folder are being
processed by Glue.
You can pass any command line options supported by glue as task and/or target options.
In addition grunt-glue-nu has a few configuration options that are not passed on to glue.
options.bundleName {String} task:target
– The file names of the files created for the sprite bundle. By default they are the same as the task target name.
options.tmpDir {String} require('os').tmpdir()
– A temporary source folder for glue to operate in. By default it's your OS's temp directory.
options.glueArgs {Boolean} false
– Use glueArgs
to set all arguments to the glue
command manually as a string. All options
, src
and dest
are
then ignored for this target.
grunt-glue-nu sets some defaults for glue options that are deemed helpful.
1recursive : true // process sprites in sub-folders 2crop : true // crop sprites minimizing empty pixels 3force : true // forces glue to execute even if it detects no changes in the input
Glue by itself will exit with an error code if there are no images in the source folders. grunt-glue-nu catches that, prints a warning and lets Grunt continue doing its job.
1grunt.initConfig({
2 glue: {
3 options: { // Defaults for all following tasks
4 css : 'dist',
5 less : true, // Boolean, output to des
6 url : '/static/img',
7 namespace : 's',
8 'sprite-namespace' : '',
9 retina: : true
10 },
11 backgrounds: {
12 options: {
13 retina: false
14 },
15 src: ['path/to/sprites/*.{png,jpg,conf}'],
16 dest: 'output/folder/'
17 },
18 icons: {
19 options: {
20 'sprite-namespace': 'icon'
21 less: 'less/output/path' // override dest
22 },
23 src: ['path/to/sprites/*.png'],
24 dest: 'output/folder/'
25 },
26 modules: {
27 options: {
28 bundleName: 'module'
29 'sprite-namespace': ''
30 },
31 src: ['modules/carousel', 'modules/accordion'],
32 dest: 'output/folder/'
33 }
34 }
35});
How to contribute to a project on Github
see CHANGELOG.md
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More