Windows Server 2012 VM で初めて gulp を試しています。私は通常 Mac ユーザーなので、このような開発ツール用の Windows と Powershell には少し慣れていません。Node.js と npm をインストールしました (他には何もインストールしませんでした)。Sass をコンパイルするために、次の基本的な Gulpfile を作成しました。
Gulpfile.js
var gulp = require('gulp'),
sass = require('gulp-ruby-sass');
gulp.task('styles', function() {
return gulp.src('Content/sass_new/application.scss')
.pipe(sass({ style: 'expanded', }))
.pipe(gulp.dest('Content/css'))
});
gulp.task('watch', function() {
gulp.watch('Content/sass_new/*', ['styles']);
})
gulp.task('default', ['styles']);
Windows Powershell でgulp
コマンドを実行すると、次のように出力されます。
[10:02:57] Using gulpfile C:\[path to]\gulpfile.js
[10:02:57] Starting 'styles'...
[10:02:57] gulp-ruby-sass: 'sass' is not recognized as an internal or external command,
operable program or batch file.
[10:02:57] Finished 'styles' after 316 ms
[10:02:57] Starting 'default'...
[10:02:57] Finished 'default' after 15 μs
ここで何か不足していますか?Ruby または Sass をインストールする必要がありますか? そうしようと思ったのですが、Ruby コマンド プロンプトが必要で、PowerShell からはアクセスできませんでした。任意のガイダンスをいただければ幸いです。