grunt
grunt copied to clipboard
grunt.config.merge getter differently
Grunt config merge does not work exactly in v1.0.2 and v1.0.3. Second and third getters are differently.
Example:
module.exports = function (grunt) {
"use strict";
var i = 0, y = 0;
grunt.initConfig({});
grunt.config.merge({
a: {
b: {
get inc () { return y++; }
},
get inc () { return i++; }
}
});
grunt.registerTask("default", function() {
console.debug( grunt.config.get("a.b.inc") );
console.debug( grunt.config.get("a.b.inc") );
console.debug( grunt.config.get("a.inc") );
console.debug( grunt.config.get("a.inc") );
});
};
$ grunt --version
grunt v1.0.2
$ grunt
0
1
0
0
$ grunt --version
grunt v1.0.3
$ grunt
0
0
0
0
Env:
$ npm -v
6.0.1
$ nodejs -v
v10.4.0
Hello, any progress?