Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

Pass timestamp option for svgo(node engine) #358

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

garyanikin
Copy link

No description provided.

tasks/webfont.js Outdated
@@ -116,7 +116,8 @@ module.exports = function(grunt) {
cache: options.cache || path.join(__dirname, '..', '.cache'),
callback: options.callback,
customOutputs: options.customOutputs,
execMaxBuffer: options.execMaxBuffer || 1024 * 200
execMaxBuffer: options.execMaxBuffer || 1024 * 200,
ts: (options.ts === 0) ? 0 : options.ts || Math.floor(Date.now() / 1000)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name is far from clear. Could you add docs and tests too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll add docs and tests

@hacker112
Copy link

This seems to solution to make woff binary to not differ from time to time. I thinks this is what I need to stop webpack from giving the font a different hash every time the font is generated.

How is the status?
Anything I can do to help?

@@ -6,6 +6,8 @@ var path = require('path');
var grunt = require('grunt');
var parseXMLString = require('xml2js').parseString;
var wf = require('../tasks/util/util');
var crypto = require('crypto');
var Promise = require('promise');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promises are supported since Node 0.12, so you don’t need a polyfill.


// If font created multiple times with same value as timestamp option
// then md5 of created files must be the same too
timestamp_same: function (test) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn’t it be easier to compare file contents? ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants