-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
I am using the gulp plugin to generate favicons, however it doesn't seems to work correct with special characters in manifest name, e.g. with Danish æ, ø and å.
If I manually enter æ, ø or å into manifest name it works fine, but the task seems to convert it to ø
Furthermore the task returns an error like this:
[15:17:57] Finished 'favicon' after 2.82 ms
fs.js:438
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
TypeError: path must be a string
at Object.fs.openSync (fs.js:438:18)
at Object.fs.writeFileSync (fs.js:977:15)
at C:\Visual Studio Projects\STG\STG\STG.Site\node_modules\gulp-real-favicon\index.js:30:10
at ProxyWriter.<anonymous> (C:\Visual Studio Projects\STG\STG\STG.Site\node_modules\gulp-real-favicon\node_modules\rfg-api\index.js:64:11)
at ProxyWriter.emit (events.js:117:20)
at DirWriter.emit (events.js:92:17)
at end (C:\Visual Studio Projects\STG\STG\STG.Site\node_modules\gulp-real-favicon\node_modules\rfg-api\node_modules\fstream\lib\writer.js:324:14)
at C:\Visual Studio Projects\STG\STG\STG.Site\node_modules\gulp-real-favicon\node_modules\rfg-api\node_modules\fstream\lib\writer.js:314:34
at endUtimes (C:\Visual Studio Projects\STG\STG\STG.Site\node_modules\gulp-real-favicon\node_modules\rfg-api\node_modules\fstream\lib\writer.js:215:58)
Process terminated with code 8.
at setProps (C:\Visual Studio Projects\STG\STG\STG.Site\node_modules\gulp-real-favicon\node_modules\rfg-api\node_modules\fstream\lib\writer.js:297:5)
In this case I have also wrapped it inside a loop to execute for 4 sites, but it sometimes not generate icons for all sites.
The error mentioned before get I even it's not wrapped inside a loop and just running for single favicon.
gulp.task("favicon", function () {
var sites = [
{ name: "Højmark", alias: "hojmark", bgColor: "#ffffff" },
{ name: "Lion Alpin", alias: "lionalpin", bgColor: "#10528c" },
{ name: "Team Benns Ski", alias: "tbski", bgColor: "#9e1231" },
{ name: "Clickski", alias: "clickski", bgColor: "#e5582b" }
];
for (i = 0; i < sites.length; i++) {
//sites[i].name
//sites[i].alias
console.log("generating favicon for " + sites[i].name);
realFavicon.generateFavicon({
masterPicture: config.sourcePath + "img/favicon/" + sites[i].alias + ".png",
dest: "./dist/img/favicons/" + sites[i].alias + "/",
iconsPath: "./",
design: {
ios: {
pictureAspect: 'backgroundAndMargin', //noChange
backgroundColor: sites[i].bgColor,
margin: '14%'
},
desktopBrowser: {},
windows: {
pictureAspect: 'noChange',
backgroundColor: sites[i].bgColor, //#ffffff
onConflict: 'override'
},
androidChrome: {
pictureAspect: 'backgroundAndMargin', //noChange
margin: '17%',
backgroundColor: '#ffffff',
themeColor: '#ffffff',
manifest: {
name: sites[i].name,
display: 'browser',
orientation: 'notSet',
onConflict: 'override',
declared: true
}
},
safariPinnedTab: {
pictureAspect: 'blackAndWhite', //silhouette
threshold: 53.125,
themeColor: "#5bbad5"
}
},
settings: {
scalingAlgorithm: 'Mitchell',
errorOnImageTooSmall: false
}//,
//markupFile: FAVICON_DATA_FILE
}, function () {
done();
});
}
});
Finally according to docs https://developer.chrome.com/extensions/manifest the properties manifest_version, name and version are required - how do I add manifest_version and version*?
Reactions are currently unavailable