Permalink
Browse files

Add support for JSON files

  • Loading branch information...
wyze committed Aug 27, 2018
1 parent c69df16 commit 7c1bc1afa7803a82cea3c6c588e5df0874d9876b
Showing with 17 additions and 1 deletion.
  1. +1 −0 package.json
  2. +3 −1 src/index.ts
  3. +13 −0 yarn.lock
View
@@ -34,6 +34,7 @@
"rollup": "^0.65.0",
"rollup-plugin-bucklescript": "^0.7.0",
"rollup-plugin-commonjs": "^9.1.6",
"rollup-plugin-json": "^3.0.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-sucrase": "^2.0.0"
},
View
@@ -3,6 +3,7 @@ import { Result } from 'meow'
import builtins = require('builtins')
import bucklescript from 'rollup-plugin-bucklescript'
import commonjs from 'rollup-plugin-commonjs'
import json from 'rollup-plugin-json'
import resolve from 'rollup-plugin-node-resolve'
import sucrase from 'rollup-plugin-sucrase'
@@ -29,13 +30,14 @@ const options: RollupFileOptions = {
const build = async (input: string, flags: Result['flags']) => {
const { format, output: file } = flags
const plugins = [
json(),
maybeAddScript(input),
maybeAddReason(input),
commonjs({
include: 'node_modules/**',
}),
resolve({
extensions: ['.mjs', '.js', '.ts'],
extensions: ['.mjs', '.js', '.json', '.ts'],
}),
].filter(Boolean)
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 7c1bc1a

Please sign in to comment.