scpを使ってファイルのアップロードを行うGruntタスクがあるとして、このようにタスク定義をすると、grunt upload:css
でエラーになる。Gruntが指定されたタスク設定をパースする時、タスク設定にある他のターゲットの設定もパースするので、CLIオプションに依存するようなターゲットが他にあると(この場合はfileターゲットで使っている--file
オプション)そこでパースが失敗する。
Last active
August 29, 2015 14:02
-
-
Save hail2u/02591628c85951bf7225 to your computer and use it in GitHub Desktop.
Gruntのバグ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint node: true */ | |
'use strict'; | |
var path = require('path'); | |
module.exports = function (grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
upload: { | |
file: { | |
dest: path.relative(process.cwd(), grunt.option('file')) | |
}, | |
css: { | |
expand: true, | |
cwd: 'styles/', | |
src: [ | |
'*.css', | |
'*.map' | |
], | |
dest: 'styles/' | |
}, | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment