Closed Anahkiasen closed 9 years ago
It should rebuild if you delete files. Try grunt --verbose
.
Macedoine ➜ weholi git:(develop) ✗ grunt webfont
Running "webfont:dist" (webfont) task
Font icons wasn’t changed since last run.
Done, without errors.
Macedoine ➜ weholi git:(develop) ✗ ls public/app/fonts
icons.eot icons.svg icons.ttf icons.woff
Macedoine ➜ weholi git:(develop) ✗ rm -rf public/app/fonts
Macedoine ➜ weholi git:(develop) ✗ grunt webfont --verbose
Initializing
Command-line options: --verbose
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks.
Registering "grunt-newer" local Npm module tasks.
Reading /Users/anahkiasen/Sites/madewithlove/weholi/node_modules/grunt-newer/package.json...OK
Parsing /Users/anahkiasen/Sites/madewithlove/weholi/node_modules/grunt-newer/package.json...OK
Loading "newer.js" tasks...OK
+ any-newer, newer, newer-clean, newer-postrun
Registering "grunt-concurrent" local Npm module tasks.
Reading /Users/anahkiasen/Sites/madewithlove/weholi/node_modules/grunt-concurrent/package.json...OK
Parsing /Users/anahkiasen/Sites/madewithlove/weholi/node_modules/grunt-concurrent/package.json...OK
Loading "concurrent.js" tasks...OK
+ concurrent
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK
Loading "Gruntfile.js" tasks...OK
+ css, default, docs, js, lang, lint, minify, production, rebuild, svg
Running tasks: webfont
Loading "grunt-webfont" plugin
Registering "/Users/anahkiasen/Sites/madewithlove/weholi/node_modules/grunt-webfont/tasks" tasks.
Loading "webfont.js" tasks...OK
+ webfont
Running "webfont" task
Running "webfont:dist" (webfont) task
Verifying property webfont.dist exists in config...OK
Files: public/app/svg/activity/beach.svg, public/app/svg/activity/city.svg, public/app/svg/activity/family.svg, public/app/svg/activity/golf.svg, public/app/svg/activity/mountain.svg, public/app/svg/activity/nature.svg, public/app/svg/activity/shopping.svg, public/app/svg/activity/ski.svg, public/app/svg/activity/sport.svg, public/app/svg/activity/theme-park.svg, public/app/svg/activity/wellness.svg, public/app/svg/general/accomodation.svg, public/app/svg/general/activity.svg, public/app/svg/general/archive.svg, public/app/svg/general/arrow-back.svg, public/app/svg/general/arrow-down.svg, public/app/svg/general/arrow-forward.svg, public/app/svg/general/arrow-right.svg, public/app/svg/general/arrow-up.svg, public/app/svg/general/bell.svg, public/app/svg/general/bin.svg, public/app/svg/general/calendar.svg, public/app/svg/general/chat.svg, public/app/svg/general/checkmark.svg, public/app/svg/general/clock.svg, public/app/svg/general/comment.svg, public/app/svg/general/compass.svg, public/app/svg/general/create-listing.svg, public/app/svg/general/credit-card.svg, public/app/svg/general/dashboard.svg, public/app/svg/general/document.svg, public/app/svg/general/facebook.svg, public/app/svg/general/favorite.svg, public/app/svg/general/featured.svg, public/app/svg/general/fullscreen.svg, public/app/svg/general/googleplus.svg, public/app/svg/general/home.svg, public/app/svg/general/inbox.svg, public/app/svg/general/information.svg, public/app/svg/general/iphone.svg, public/app/svg/general/key.svg, public/app/svg/general/linkedin.svg, public/app/svg/general/list.svg, public/app/svg/general/location.svg, public/app/svg/general/lock.svg, public/app/svg/general/mail.svg, public/app/svg/general/management.svg, public/app/svg/general/minus.svg, public/app/svg/general/moreinfo.svg, public/app/svg/general/mylistings.svg, public/app/svg/general/pencil.svg, public/app/svg/general/plus.svg, public/app/svg/general/portrait.svg, public/app/svg/general/price.svg, public/app/svg/general/question.svg, public/app/svg/general/reply.svg, public/app/svg/general/search.svg, public/app/svg/general/settings.svg, public/app/svg/general/sharthis.svg, public/app/svg/general/shield.svg, public/app/svg/general/small-mail.svg, public/app/svg/general/spin.svg, public/app/svg/general/star.svg, public/app/svg/general/stats.svg, public/app/svg/general/status.svg, public/app/svg/general/testimonials.svg, public/app/svg/general/twitter.svg, public/app/svg/general/user.svg, public/app/svg/general/verified.svg, public/app/svg/general/weholi.svg, public/app/svg/general/window.svg, public/app/svg/general/x.svg -> public/app/fonts
Verifying property webfont.dist.src exists in config...OK
Verifying property webfont.dist.dest exists in config...OK
Options: hashes=false, engine="node", stylesheet="scss", htmlDemo, relativeFontPath="../fonts", template=".grunt/webfont-template.css", htmlDemoTemplate=".grunt/webfont-template.html", templateOptions={"classPrefix":"icon-"}, rename=undefined
New hash: 5c1af5664447c829cbd39431dfeeb03f - previous hash: 5c1af5664447c829cbd39431dfeeb03f
Config and source files weren’t changed since last run, checking resulting files...
Font icons wasn’t changed since last run.
Done, without errors.
Did you have any icons when you run webfont for the first time?
I didn't either. Now to note, if I delete the directory where the Sass files are generated, then it works
Could you send me your gruntfile.js/package.json? There’s probably some bug in checking but I’m can’t figure out where.
And I’m going to disable cache when --force
options is used.
var path = require('path');
module.exports = {
dist: {
options: {
hashes : false,
engine : 'node',
stylesheet : 'scss',
htmlDemo : true,
relativeFontPath: '../fonts',
template : '.grunt/webfont-template.css',
htmlDemoTemplate: '.grunt/webfont-template.html',
templateOptions : {
classPrefix: 'icon-',
},
rename : function (name) {
name = name.replace('-grey', '');
name = name.toLowerCase();
return [path.basename(path.dirname(name)), path.basename(name)].join('-');
}
},
src : ['public/app/svg/**/*.svg', '!public/app/svg/map.svg'],
dest : 'public/app/fonts',
destCss: 'public/app/sass/font',
}
};
{
"name": "foobar",
"dependencies": {
"bower": "^1.3.10",
"glob": "^4.0.5",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13"
},
"devDependencies": {
"grunt-angular-gettext": "^2.0.1",
"grunt-angular-templates": "^0.5.7",
"grunt-autoprefixer": "^2.0.0",
"grunt-bower-task": "^0.4.0",
"grunt-concurrent": "^1.0.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-compass": "^1.0.1",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-csslint": "^0.4.0",
"grunt-contrib-cssmin": "^0.11.0",
"grunt-contrib-uglify": "^0.7.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-csscss": "^0.6.2",
"grunt-html-angular-validate": "^0.4.0",
"grunt-newer": "^1.1.0",
"grunt-ng-annotate": "^0.8.0",
"grunt-phplint": "^0.0.5",
"grunt-phpunit": "^0.3.5",
"grunt-scss-lint": "^0.3.3",
"grunt-shell": "^1.1.1",
"grunt-styleguide": "^0.2.15",
"grunt-svgmin": "^2.0.0",
"grunt-tinypng": "^0.5.3",
"grunt-tslint": "^1.0.1",
"grunt-typescript": "^0.6.1",
"grunt-usemin": "^3.0.0",
"grunt-webfont": "^0.5.1",
"jit-grunt": "^0.9.0",
"tsd": "^0.5.7",
"typescript": "^1.4.1"
}
}
:+1:
This is the the same issue I reported before: https://github.com/sapegin/grunt-webfont/issues/224
Should be fixed now.
I still experience that issue, please investigate and reopen.
@redaxmedia +1
Feel free to submit a pull request with a fix.
If I run
grunt webfont
once, it'll generate my fonts inpublic/app/fonts
. Now if I delete that folder manually and rerun the command, it'll sayFont icons wasn’t changed since last run.
, any way to force it to rebuild ? Passing --force doesn't do the trick