0

我有几个想要连接的 json 文件,但分隔符没有插入到最终文件中。

我的 gruntfile 的 concat 部分:

    concat: {
        options: {
            seperator: ','
        },
        dist: {
            src: ['src/texts/*.json'],
            dest: 'dist/texts.json'
        }
    }

生成的文件示例:

{
  "name": "Bavaria Ipsum",
  "source": "bavaria-ipsum.de",
  "sourceLink": "http://bavaria-ipsum.de/",
  "license": "Other",
  "licenseLink": "http://bavaria-ipsum.de/about.html",
  "text": "Lorem ipsum dolor sit amet, …"
}

{
  "name": "Lorem Ipsum",
  "source": "Unknown",
  "sourceLink": "",
  "license": "none",
  "licenseLink": "",
  "text": "Lorem ipsum dolor sit amet, …"
}

我的 gruntfile 是错误的还是我错过了其他东西?

4

1 回答 1

0

应该是aword separatornotseperator

于 2014-06-11T07:00:18.120 回答