Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work with grunt-webfont #45

Open
artpolikarpov opened this issue May 19, 2014 · 4 comments
Open

Work with grunt-webfont #45

artpolikarpov opened this issue May 19, 2014 · 4 comments

Comments

@artpolikarpov
Copy link

Test repository: https://github.com/artpolikarpov/newer-webfont-test

Just can’t prefix grunt-webfont with grunt-newer.

When I simply run grunt I get this:

screen shot 2014-05-19 at 15 18 09

But webfont.icons.src is in Gruntfile.js.

When I run unprefixed grunt webfont and then grunt again everything looks fine:

screen shot 2014-05-19 at 15 24 51

But now it doesn’t react to the changes in src/icons/ and always says that “no newer files to process”:

screen shot 2014-05-19 at 15 37 30

What is wrong?


/cc @sapegin — creator of grunt-webfont

@sapegin
Copy link

sapegin commented May 19, 2014

Something strange happens to this.data. When I run grunt webfont webfont receives normal options object:

{ src: 'src/icons/*.svg',
  dest: 'out/css/fonts',
  destCss: 'out/css',
  options: { htmlDemo: false } }

But when I run grunt newer:webfont it receives very strange object:

{ destCss: 'out/css',
  options: { htmlDemo: false },
  files:
   [ { src: [Object],
       dest: 'out/css/fonts',
       destCss: 'out/css',
       orig: [Object] } ] }

@mpalpha
Copy link

mpalpha commented Jan 12, 2015

My "proxy task" workaround until this is resolved.

Add some grunt-newer compatible proxy task configuration options inside grunt.initConfig

// Add src and dest attributes to your "icons" proxy task for grunt-newer.
icons: {
    build: {
        // used src from the svgmin config and dest from webfont config.
        src: 'assets/icons/*/min/*',
        dest: 'assets/fonts/'
    }
}

Register the proxy task.

// add wrapper task to fix grunt-newer/webfont compatibility issue
grunt.registerTask('icons', 'build glyphicons.', function() {
    grunt.task.run('svgmin','webfont');
});

//use "'newer:icons'" to build the glyphicons using grunt-newer

@ArmorDarks
Copy link

Hi

Any chances to see native fix of that issue?

@jsmirnov
Copy link

/ping

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

No branches or pull requests

5 participants