URL and output path need to be different
- Dominant language
- JavaScript
- Stars
- 700
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
So I have been learning gulp and working to deploy to a Github Page, so I setup the build reference like this:
```
```
I'll trigger this with a gulp task that might look like this:
```
gulp.task('private:app:useref', () => {
return gulp.src('./dist/**/*.html')
.pipe(plugins.plumber())
.pipe(plugins.useref())
.pipe(gulp.dest('./dist/'));
})
```
This will write the combined.js to the `./dist/project/scripts/` folder. However, the dist folder typically represents the document root of the github page, so I don't have a `dist/project` folder, I just have `dist/scripts/`. In order to deploy the dist folder to the `gh-pages` branch, I have to move the files in `./dist/project/` up to just `dist`. This feels clunky.
Is there a way to tell gulp-useref to write the combined file to one path with the URL it replaces being something else? In this case, I want to write combined.js to `dist/scripts/combined.js` and link to it in the HTML as `/project/scripts/combined.js`. Finding the files isn't the problem; I want the output file and the URL referenced in the `gulp.src` files to be be different.
Contributor guide
Assessment
This issue has not been assessed yet.