我正在尝试从phpStorm中使用gulp.js文件来编译我的SCSS。有人看到我做错了吗?输出未显示任何错误。
输出显示:
/usr/local/bin/node /Users/UserName/Desktop/mywebsite/node_modules/gulp/bin/gulp.js --color --gulpfile /Users/UserName/Desktop/mywebsite/gulpfile.js compile-web-scss
[13:49:25] Using gulpfile ~/Desktop/mywebsite/gulpfile.js
[13:49:25] Starting 'compile-web-scss'...
[13:49:26] Finished 'compile-web-scss' after 613 ms
Process finished with exit code 0
但是永远不会创建更新CSS文件。
这是gulp.js文件
var gulp = require('gulp');
var path = require('path');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var open = require('gulp-open');
var WebPaths = {
HERE: './',
DIST: 'dist/',
CSS: './public/web/css/',
SCSS_TOOLKIT_SOURCES: './public/web/scss/now-ui-kit.scss',
SCSS: './public/web/scss/**/**'
};
gulp.task('compile-web-scss', function() {
return gulp.src(WebPaths.SCSS_TOOLKIT_SOURCES)
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer())
.pipe(sourcemaps.write(WebPaths.HERE))
.pipe(gulp.dest(WebPaths.CSS));
});
这是文件路径。