From 9947911a61a27cd9ceb3c59f70e62fdb3a45c70f Mon Sep 17 00:00:00 2001 From: Jack Steam Date: Mon, 31 Aug 2020 15:39:52 -0500 Subject: [PATCH] Add initial config files --- .eslintrc.js | 15 ++++++ .gitignore | 119 +++++++++++++++++++++++++++++++++++++++++++++++ .prettierrc.yaml | 8 ++++ rollup.config.js | 14 ++---- 4 files changed, 146 insertions(+), 10 deletions(-) create mode 100644 .eslintrc.js create mode 100644 .gitignore create mode 100644 .prettierrc.yaml diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..64152c1 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,15 @@ +/* eslint-env node */ + +module.exports = { + env: { + browser: true, + es2020: true, + webextensions: true + }, + extends: 'eslint:recommended', + parserOptions: { + ecmaVersion: 11, + sourceType: 'module', + }, + rules: {}, +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..463cd04 --- /dev/null +++ b/.gitignore @@ -0,0 +1,119 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# VSCode config files +.vscode + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..283ed5b --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,8 @@ +semi: false +tabWidth: 2 +trailingComma: "all" +jsxSingleQuote: true +printWidth: 80 +singleQuote: true +arrowParens: "always" +proseWrap: "always" diff --git a/rollup.config.js b/rollup.config.js index 6ba4057..e25f1cc 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,20 +1,14 @@ -// rollup.config.js import resolve from 'rollup-plugin-node-resolve' import commonjs from 'rollup-plugin-commonjs' -import { chromeExtension } from 'rollup-plugin-chrome-extension' +import { chromeExtension, simpleReloader } from 'rollup-plugin-chrome-extension' export default { - input: 'src/manifest.json', - // input: 'src/background.js', + input: ['src/manifest.json'], output: { dir: 'dist', format: 'esm', }, // always put chromeExtension() before other plugins - plugins: [ - chromeExtension(), - resolve(), - commonjs() - ], -} \ No newline at end of file + plugins: [chromeExtension(), simpleReloader(), resolve(), commonjs()], +}