Open dantman opened 10 years ago
I have been having nightmares with this cryptic error message.
This is my folder structure:
This is the config:
font_name: icons
no_hash: true
input:
vectors: svg
templates: .
output:
fonts: .
_icons.scss: ../../styles
templates: [_icons.scss]
Running from the project root:
$ fontcustom watch fonts/icons
I get the error:
/Users/chejss/.rvm/gems/ruby-2.1.1/gems/fontcustom-1.3.3/lib/fontcustom/base.rb:43:in `read': Is a directory @ io_fread - ./svg (Errno::EISDIR)
Anyone know what I have to do to get everything to work in the meantime? I am attempting to use Font Custom on two real-world projects with deadlines...
@jaydenseric Try cd'ing into fonts/icons and running fontcustom watch
without any arguments.
@dantman I have tried that, to exactly the same effect :(
@jaydenseric Try deleting the .fontcustom-manifest.json
and regenerating everything. The manifest goes and saves/overrides parts of the config, even if it's probably a bad idea.
@dantman I tried that, no effect also.
What did work was restructuring everything.
In the end:
With:
font_name: icons
no_hash: true
output:
fonts: ../
_icons.scss: ../../../styles
templates: [_icons.scss]
Running from the project root:
$ cd fonts/icons/fontcustom
$ fontcustom watch
Note that running $ fontcustom watch fonts/icons/fontcustom
from the project root will not pick up the config file and will set up a standard fontcustom
folder in the root.
can you create a repo with all the default templates set up so that someone can pull it down and tweak the templates? Very cool project with a very frustrating setup..
@ShaggyDude Might do that this weekend. It is already on Github as part of my Barebones repo but it does make sense to maintain the Font Custom Sass setup independently.
I'm trying out FontCustom now and I've been getting errors like: /Library/Ruby/Gems/2.0.0/gems/fontcustom-1.3.3/lib/fontcustom/base.rb:44:in `read': Is a directory - ./templates (Errno::EISDIR)
I've examined the code and think I figured out why this happens:
fontcustom compile .
(this seems to be what the quick start recommended) for the first time with a config file, no manifest, no output.:input => '.'
implicitly passed in to it.@cli_options[:config]
to "fontcustom.yml":input => { :vectors => '.', :templates => 'templates' }
.
.{ :vectors => '.', :templates => '.' }
Dir.glob File.join(@options[:input][:templates], "*")
to the list of files to checksum../*
, directories such as templates/ app/ assets/ (or whatever you use for your:output
directories will be added to the same list as the .svg files.I have found proper ways of running fontcustom now (-c and omitting the path), but I think there are still a few things that should be fixed:
fontcustom compile path/to/vectors
andfontcustom config
commands, fontcustom.com even suggestsfontcustom config /path/to/vectors
. But what it doesn't say is that if you are using a config file you should not be specifying a path/to/vectors when you runfontcustom compile
.