Skip to content

Commit

Permalink
[chore] update configs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksteamdev committed Oct 19, 2020
1 parent 8606b40 commit e438ef5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
9 changes: 4 additions & 5 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
semi: false
tabWidth: 2
trailingComma: "all"
arrowParens: "always"
jsxSingleQuote: true
printWidth: 80
semi: false
singleQuote: true
arrowParens: "always"
proseWrap: "always"
tabWidth: 2
trailingComma: "all"
26 changes: 22 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
/* eslint-env node */

import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import zip from 'rollup-plugin-zip'
import { emptyDir } from 'rollup-plugin-empty-dir'

import { chromeExtension, simpleReloader } from 'rollup-plugin-chrome-extension'

const p = process.env.NODE_ENV === 'production'

export default {
input: ['src/manifest.json'],
output: {
dir: 'dist',
format: 'esm',
},
// always put chromeExtension() before other plugins
plugins: [chromeExtension(), simpleReloader(), resolve(), commonjs()],
plugins: [
// always put chromeExtension() before other plugins
chromeExtension(),
// includes an automatic reloader in watch mode
simpleReloader(),
// resolves node modules
resolve(),
// converts libraries that use commonjs
commonjs(),
// empties the dist for each build
emptyDir(),
// creates a zip to upload to the Chrome Web Store :)
p && zip({ dir: 'releases' }),
],
}

0 comments on commit e438ef5

Please sign in to comment.