brain00021 / gulp_plugin

0 stars 0 forks source link

Individual stylesheets must be in the sass directory #1

Open brain00021 opened 7 years ago

brain00021 commented 7 years ago

i have no idea . i tried to complie cmopass for my project. so my *.scss

@import "compass";
@import "compass/reset";
#test1{
    width:100px;
    height:100px;

}

my config.rd

Encoding.default_external = 'utf-8'
require 'compass/import-once/activate'
# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"

# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false

preferred_syntax = :scss

this gulpfile.js about sass gulp task

gulp.task('styles', function() {
    gulp.src('sass/**/*.scss') // sass 來源路徑
    .pipe(gulpPlumber()) //判斷除錯
        .pipe(gulpCompass({
            css: 'css', // compass 輸出位置
            sass: 'sass/**/*.scss', // sass 來源路徑
            image: 'images', // 圖片來源路徑
            style: 'compressed', // CSS 處理方式,預設 nested(expanded, nested, compact, compressed)
            comments: false, // 是否要註解,預設(true)
            require: ['susy'], // 額外套件 susy
        }));
    // .pipe(gulp.dest('app/assets/temp')); // 輸出位置(非必要)
});

this is gulp process

BraindeMacBook-Pro:gulp_testing Brain$ gulp
[12:28:56] Using gulpfile ~/Desktop/gulp_testing/gulpfile.js
[12:28:56] Starting 'script'...
[12:28:56] Finished 'script' after 14 ms
[12:28:56] Starting 'styles'...
[12:28:56] Finished 'styles' after 6.93 ms
[12:28:56] Starting 'watch'...
[12:28:56] Finished 'watch' after 17 ms
[12:28:56] Starting 'default'...
[12:28:56] Finished 'default' after 9.71 μs
[12:28:58] Individual stylesheets must be in the sass directory.

[12:28:58] Plumber found unhandled error:
 Error in plugin 'gulp-compass'
Message:
    Compass failed

install plugin 'gulp-compass' doesn't working..

compass version Compass 1.0.3 (Polaris) ruby version ruby 2.3.1p112

brain00021 commented 7 years ago

i think it's package.json plugin doesn't work so need to check for environment npm install -D