jonkemp / jonkemp/gulp-useref

base option not working as expected

Open
#208 6 comments 6 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
700
Forks
89
PR merge metrics
No merged PRs in 30d

Description

Thanks for this plugin, it's been very useful to me.

My understanding is that the `base` option provides a mechanism to output assets to the given directory. Perhaps it's just that I'm misunderstanding how the base option works.

I've created a test repos that hopefully demonstrates the problem: https://github.com/MozMorris/gulp-useref-example

I set the base option like so:

``` javascript
.pipe(useref({
searchPath: 'static',
base: 'dist/some/other/directory'
}))
```

HTML:

``` html

```

My expectation is that assets in my `static` folder get written to `dist/some/other/directory` with the final html looking like:

``` html

```

The actual result is my assets are written to `dist` without the base option folder structure.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.