###前提・実現したいこと
gruntを使用して特定ディレクトリ以下のcoffeeスクリプトを、
ディレクトリ構成を全く同じにしたまま、
別のディレクトリに.jsと.mapを出力したいと思っています。
しかし、gruntを実行しても途中で処理が終了していまい、
ファイルが作成されておりませんでした。
どこの設定が誤っているのか、ご指摘いただきたく思います。
###発生している問題・エラーメッセージ
コンパイルを実行すると、次のようなエラーで処理が終了してしまいます。
プロジェクトフォルダ> grunt coffee Running "coffee:compile" (coffee) task Warning: pattern.indexOf is not a function Use --force to continue. Aborted due to warnings.
###該当のソースコード
module.exports = function(grunt) { grunt.initConfig({ coffee: { compile: { options: { sourceMap: true }, files: { expand: true, cwd: 'coffee/', src: ['*.coffee'], dest: 'cout/', ext: '.js' } }} }); grunt.loadNpmTasks('grunt-contrib-coffee'); grunt.registerTask('default', 'coffee'); };
###試したこと
filesの部分を次のようにしたら、当該ファイル単体はコンパイルできました。
そのため、基本的な設定や、node, mpn, grunt, grunt-contrib-coffee等のインストールはうまく行っていると思います。
files: { '/cout/test.js': 'coffee/test.coffee' } ------------------------------------------------------ プロジェクトフォルダ> grunt coffee Running "coffee:compile" (coffee) task >> 1 files created. >> 1 source map files created. Done.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/09/02 14:16