I was looking for a solution to my problem, and I found posts with similar problems, but not the same. I have the following folder structure:
js
└── GUIFramework
├── external
└── WaspFramework
├── Core
└── GUI
└── Controls
└── WaspMask
├── css
│ └── WaspMask.css
└── resources
└── default_loader_circle.gif
Inside the file WaspMask.css, I have this rule:
.wasp-loader-default {background-image: url ("../resources/default_loader_circle.gif"); }
Well, I tried to minimize it (in combination with other css files) with the plugin cssmin. My grunt file is placed in a folder WaspFrameworkand I want to generate minified css there. The grunt file file is as follows:
module.exports = function (grunt) {
var _sources = grunt.file.readJSON('./sources.json');
var _filesCSS = _sources.css;
grunt.initConfig({
cssmin: {
wasp: {
options: {
keepSpecialComments: 0
},
files: {
'wasp-bundle.min.css': _filesCSS
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', ['cssmin']);
};
As _filesCSSI have a way for all of the files in order to minimize and associations WaspMask.css.
, cssmin URL- wasp-loader-default , , , . cssmin, root:
options: {
keepSpecialComments: 0,
root: '.',
},
URL- /GUI/Controls/WaspMask/resources/default_loader_circle.gif, - . (GUI/Controls/WaspMask/resources/default_loader_circle.gif ), . . root, URL , .
, ?