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

targetPath issue #16

Closed
zawilliams opened this issue Apr 4, 2014 · 7 comments
Closed

targetPath issue #16

zawilliams opened this issue Apr 4, 2014 · 7 comments

Comments

@zawilliams
Copy link

I think I've got the path, targetPath and fontPath configured correctly, but I'm having an issue now with targetPath.

I'm working on a Laravel app and have my gulpfile located in the project root. So my directory structure looks like:

  • /app
  • /public
  • gulpfile.js

My gulp configuration code for this plugin is as follows:

var fontName = 'icons';

gulp.task('icon-font', function(){
    gulp.src(['app/assets/icons/*.svg'])
        .pipe(iconfontcss({
            fontName: fontName,
            path: 'app/assets/scss/templates/_icons.scss',
            targetPath: '../../../app/assets/scss/components/_icons.scss',
            fontPath: '../fonts/'
        }))
        .pipe(iconfont({
            fontName: fontName
        }))
        .pipe(gulp.dest('public/assets/fonts/'));
});

The problem I'm running into is this: the targetPath is supposed to go into app/assets/scss/components/ but its going into public/assets/scss/components instead. It's like "app" is being replaced by "public" in the path.

Am I doing something wrong or is this an issue with the plugin?

@zawilliams
Copy link
Author

I've figured out how to solve the issue: by adding a base to the src.

Here's the src line that I used:

gulp.src(['app/assets/icons/*.svg'], {base: 'app/assets'})

@backflip
Copy link
Owner

backflip commented Apr 5, 2014

Which version of Gulp are you using?

@zawilliams
Copy link
Author

Using 3.5.6

backflip added a commit that referenced this issue Apr 7, 2014
@backflip
Copy link
Owner

backflip commented Apr 7, 2014

Hm, weird. I have added a note to the README. Thanks for reporting!
Anyway, this plugin is most likely going to be deprecated and the recommended solution won't have this issue: #9

@Iuriy-Budnikov
Copy link

Option base not works for me.
gulp 3.9.0

Issue still is open.

@backflip
Copy link
Owner

Hey Iuriy,
could you save your Gulpfile to https://gist.github.com so I can try to reproduce it?

@benifbond
Copy link

How can I resolve this problem ?
The targetPath creates a subfolder inside the fonts folder that comprises the full working path inside the fonts director.
For example:
fonts/
Users/username/full project path/icons.scss.

The problem occurs in MacOs and Linux. I do not desire to have either additional folders created or _icons.scss.

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

4 participants