Don't inline specific icons file content in Gulp/Grunt generated code
stevie-p opened this issue · 3 comments
stevie-p commented
When using Gulp, with a custom (transparent) windows icon, the generate-favicon task throws "Error: ENAMETOOLONG: name too long" due to the design.windows.masterPicture.content
being 60,196 characters.
phbernard commented
The plugin lets you use file paths and content encoded as base64. Apparently, you are passing base64 content but the plugin is using it as a file name. Could you copy/paste your code snippet?
ctrlmaniac commented
Same error:
generated via realfavicongenerator.net
var realFavicon = require ('gulp-real-favicon');
var fs = require('fs');
// File where the favicon markups are stored
var FAVICON_DATA_FILE = 'faviconData.json';
// Generate the icons. This task takes a few seconds to complete.
// You should run it at least once to create the icons. Then,
// you should run it whenever RealFaviconGenerator updates its
// package (see the check-for-favicon-update task below).
gulp.task('generate-favicon', function(done) {
realFavicon.generateFavicon({
masterPicture: "master.svg",
dest: "favicons"
iconsPath: '/assets/favicons',
design: {
ios: {
masterPicture: {
type: 'inline',
content: 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiCiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9EVEQvc29kaXBvZGktMC5kdGQiCiAgIHhtbG5zOmlua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Ny40MjEsMy40MjIgMCwwIDIuODkzLC0wLjUwNCA3LjY5NSwtMS41NjIgNS4wOTQsLTAuODM2IDExLjQ1OSwtMS41NTcgMTUuMDI1LC0wLjY5OSBsIDAuODYsLTUuNDU5IC0wLjAwMywwIDAuMDAzLC0wLjAyNCAwLjAwMiwwLjAxOCBDIDM5Ljg5OCw1Ni43NTEgNDAuODcsNTUuMyA0MC43LDUzLjcgWiBNIDE1LjY5Myw0NS43MSBjIC0wLjQ3MSwwIC0wLjg1MSwtMC4zODEgLTAuODUxLC0wLjg1MiAwLC0wLjQ3MSAwLjM4LC0wLjg1MiAwLjg1MSwtMC44NTIgMC40NzEsMCAwLjg1MSwwLjM4MSAwLjg1MSwwLjg1MiAtMC4wMDEsMC40NzEgLTAuMzgsMC44NTIgLTAuODUxLDAuODUyIHogbSAxNS42NDksOS45NyBjIC0wLjQ3MiwwIC0wLjg1MiwtMC4zNzggLTAuODUyLC0wLjg1MSAwLC0wLjQ3IDAuMzc5LC0wLjg1MiAwLjg1MiwtMC44NTIgMC40NzEsMCAwLjg1LDAuMzgyIDAuODUsMC44NTIgLTEwZS00LDAuNDczIC0wLjM4LDAuODUxIC0wLjg1LDAuODUxIHoiCiAgICAgICAgIGlkPSJwYXRoMjYiCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIHN0eWxlPSJmaWxsOiNmYWZhZmE7ZmlsbC1vcGFjaXR5OjEiIC8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'
},
pictureAspect: 'backgroundAndMargin',
backgroundColor: '#212121',
margin: '14%',
assets: {
ios6AndPriorIcons: false,
ios7AndLaterIcons: false,
precomposedIcons: false,
declareOnlyDefaultIcon: true
}
},
desktopBrowser: {},
windows: {
masterPicture: {
type: 'inline',
content: 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3J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zgyIDAuODUsMC44NTIgLTEwZS00LDAuNDczIC0wLjM4LDAuODUxIC0wLjg1LDAuODUxIHoiCiAgICAgICAgIGlkPSJwYXRoMjYiCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIHN0eWxlPSJmaWxsOiNmYWZhZmE7ZmlsbC1vcGFjaXR5OjEiIC8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'
},
pictureAspect: 'noChange',
backgroundColor: '#2980b9',
onConflict: 'override',
assets: {
windows80Ie10Tile: true,
windows10Ie11EdgeTiles: {
small: true,
medium: true,
big: true,
rectangle: true
}
}
},
androidChrome: {
pictureAspect: 'noChange',
themeColor: '#ffffff',
manifest: {
display: 'standalone',
orientation: 'notSet',
onConflict: 'override',
declared: true
},
assets: {
legacyIcon: true,
lowResolutionIcons: true
}
},
safariPinnedTab: {
masterPicture: {
type: 'inline',
content: 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiCiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9EVEQvc29kaXBvZGktMC5kdGQiC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Mi4xMDEsNC43NDUgNy40MjEsMy40MjIgMCwwIDIuODkzLC0wLjUwNCA3LjY5NSwtMS41NjIgNS4wOTQsLTAuODM2IDExLjQ1OSwtMS41NTcgMTUuMDI1LC0wLjY5OSBsIDAuODYsLTUuNDU5IC0wLjAwMywwIDAuMDAzLC0wLjAyNCAwLjAwMiwwLjAxOCBDIDM5Ljg5OCw1Ni43NTEgNDAuODcsNTUuMyA0MC43LDUzLjcgWiBNIDE1LjY5Myw0NS43MSBjIC0wLjQ3MSwwIC0wLjg1MSwtMC4zODEgLTAuODUxLC0wLjg1MiAwLC0wLjQ3MSAwLjM4LC0wLjg1MiAwLjg1MSwtMC44NTIgMC40NzEsMCAwLjg1MSwwLjM4MSAwLjg1MSwwLjg1MiAtMC4wMDEsMC40NzEgLTAuMzgsMC44NTIgLTAuODUxLDAuODUyIHogbSAxNS42NDksOS45NyBjIC0wLjQ3MiwwIC0wLjg1MiwtMC4zNzggLTAuODUyLC0wLjg1MSAwLC0wLjQ3IDAuMzc5LC0wLjg1MiAwLjg1MiwtMC44NTIgMC40NzEsMCAwLjg1LDAuMzgyIDAuODUsMC44NTIgLTEwZS00LDAuNDczIC0wLjM4LDAuODUxIC0wLjg1LDAuODUxIHoiCiAgICAgICAgIGlkPSJwYXRoMjYiCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIHN0eWxlPSJmaWxsOiNmYWZhZmE7ZmlsbC1vcGFjaXR5OjEiIC8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'
},
pictureAspect: 'silhouette',
themeColor: '#2980b9'
}
},
settings: {
compression: 2,
scalingAlgorithm: 'Mitchell',
errorOnImageTooSmall: false
},
markupFile: FAVICON_DATA_FILE
}, function() {
done();
});
});
// Inject the favicon markups in your HTML pages. You should run
// this task whenever you modify a page. You can keep this task
// as is or refactor your existing HTML pipeline.
gulp.task('inject-favicon-markups', function() {
return gulp.src([ 'TODO: List of the HTML files where to inject favicon markups' ])
.pipe(realFavicon.injectFaviconMarkups(JSON.parse(fs.readFileSync(FAVICON_DATA_FILE)).favicon.html_code))
.pipe(gulp.dest('TODO: Path to the directory where to store the HTML files'));
});
// Check for updates on RealFaviconGenerator (think: Apple has just
// released a new Touch icon along with the latest version of iOS).
// Run this task from time to time. Ideally, make it part of your
// continuous integration system.
gulp.task('check-for-favicon-update', function(done) {
var currentVersion = JSON.parse(fs.readFileSync(FAVICON_DATA_FILE)).version;
realFavicon.checkForUpdates(currentVersion, function(err) {
if (err) {
throw err;
}
});
});
Console log:
user@linux:/srv/user$ gulp generate-favicon
[19:25:45] Using gulpfile /srv/user/gulpfile.js
[19:25:45] Starting 'generate-favicon'...
[19:25:45] 'generate-favicon' errored after 7.68 ms
[19:25:45] Error: ENAMETOOLONG: name too long, open 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiCiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9EVEQvc29kaXBvZGktMC5kdGQiCiAgIHhtbG5zOmlua3NjYXBlPSJodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy9uYW1lc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41NjIgNS4wOTQsLTAuODM2IDExLjQ1OSwtMS41NTcgMTUuMDI1LC0wLjY5OSBsIDAuODYsLTUuNDU5IC0wLjAwMywwIDAuMDAzLC0wLjAyNCAwLjAwMiwwLjAxOCBDIDM5Ljg5OCw1Ni43NTEgNDAuODcsNTUuMyA0MC43LDUzLjcgWiBNIDE1LjY5Myw0NS43MSBjIC0wLjQ3MSwwIC0wLjg1MSwtMC4zODEgLTAuODUxLC0wLjg1MiAwLC0wLjQ3MSAwLjM4LC0wLjg1MiAwLjg1MSwtMC44NTIgMC40NzEsMCAwLjg1MSwwLjM4MSAwLjg1MSwwLjg1MiAtMC4wMDEsMC40NzEgLTAuMzgsMC44NTIgLTAuODUxLDAuODUyIHogbSAxNS42NDksOS45NyBjIC0wLjQ3MiwwIC0wLjg1MiwtMC4zNzggLTAuODUyLC0wLjg1MSAwLC0wLjQ3IDAuMzc5LC0wLjg1MiAwLjg1MiwtMC44NTIgMC40NzEsMCAwLjg1LDAuMzgyIDAuODUsMC44NTIgLTEwZS00LDAuNDczIC0wLjM4LDAuODUxIC0wLjg1LDAuODUxIHoiCiAgICAgICAgIGlkPSJwYXRoMjYiCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIHN0eWxlPSJmaWxsOiNmYWZhZmE7ZmlsbC1vcGFjaXR5OjEiIC8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at Object.exports.fileToBase64Sync (/srv/user/node_modules/rfg-api/index.js:35:15)
at Object.exports.normalizeMasterPicture (/srv/user/node_modules/rfg-api/index.js:189:47)
at Object.exports.normalizeAllMasterPictures (/srv/user/node_modules/rfg-api/index.js:218:38)
at Object.exports.normalizeAllMasterPictures (/srv/user/node_modules/rfg-api/index.js:221:38)
at Object.exports.createRequest (/srv/user/node_modules/rfg-api/index.js:254:38)
at Object.generateFavicon (/srv/user/node_modules/gulp-real-favicon/index.js:13:23)
at Gulp.<anonymous> (/srv/user/gulpfile.js:59:14)
also what should I put into the faviconData.json
file?
phbernard commented
Thank you. I reproduce the issue.
There are two issues in one:
- The generated code doesn't work. This is RealFaviconGenerator/rfg-api#10
- The generated code is not satisfying. Instead of inlining content, there should be a caption
TODO: Path to your master picture
, just like for the master picture. After all, you want to be able to update one of your files locally and having it taken into account when regenerating your icons.