appleboy / appleboy/gulp-compass

Unexpected gulp.dest path

Open
#88 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
172
Forks
54
PR merge metrics
No merged PRs in 30d

Description

``` js
// gulpfile.js
gulp.task('styles', function () {
return gulp.src('./assets/sass/**/*.scss')
.pipe(plumber({
errorHandler: function (err) {
console.log(err.message);
this.emit('end');
}
}))
.pipe(compass({
bundle_exec: true,
project: __dirname,
style: 'expanded',
comments: true,
css: 'public/assets/stylesheets',
sass: 'assets/sass',
javascript: 'public/assets/javascripts',
font: 'assets/fonts',
image: 'assets/images',
generated_images_path: 'public/assets/images/css-sprites',
require: ['susy', 'breakpoint']
}))
.on('error', function (err) {
console.log(err);
})
.pipe(autoprefixer())
.pipe(gulp.dest('public/assets/stylesheets'));
});
```

expected file structure:

```
|-- assets/
| |-- sass/
| |-- main.scss
|
|-- public/
| |-- assets/
| |-- stylesheets/
| |-- main.css
```

after `gulp styles`:

```
|-- assets/
| |-- sass/
| |-- main.scss
|
|-- public/
| |-- public/ <--- why?
| |-- assets/
| |-- stylesheets/
| |-- main.css
```

This only occur on one of my computer, another one works normally.

Gulp version: `3.8.10` (both).

Any idea?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with gulpfile.js and the styles task, especially the Compass configuration and gulp.dest('public/assets/stylesheets'). Compare the generated path on the two machines using Gulp 3.8.10, then verify that gulp styles produces public/assets/stylesheets/main.css without an extra public directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, sass
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.