akameco / s2s

Coding time Compile. A tool to write code fastest.

Home Page:https://qiita.com/akameco/items/e1489c6bbf3439ec6ca4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

テンプレートにoutputオプションを追加

akameco opened this issue · comments

Why

reduce.jsを作成した際に、reducer.test.jsも伴って作成したい。
今は以下のように別々に設定する必要がある。

  templates: [
    { test: /reducer.js/, input: 'reducer.js' },
    { test: /reducer.test.js/, input: 'reducer.test.js' },
  ],

ここにoutputオプションを加えると、以下のようにreducer.js作成時に、reducer.test.jsが作成可能になる。

  templates: [
    { test: /reducer.js/, input: 'reducer.js' },
    { test: /reducer.js/, input: 'reducer.test.js', output: 'reducer.test.js' },
  ],