Skip to content

Commit

Permalink
Configure prettier & Move dependencies to dev dependencies (#166)
Browse files Browse the repository at this point in the history
* Configure prettier & Move dependencies to dev dependencies

* Run `yarn format`

* fix type error

* ignore redundant `build` ignore in prettier
  • Loading branch information
rithviknishad authored Jan 10, 2024
1 parent 12648b2 commit 0e8809f
Show file tree
Hide file tree
Showing 71 changed files with 3,713 additions and 2,972 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

#to stop npm
# lock files
package-lock.json
pnpm-lock.yaml
bun.lockb

#chatbot
public/chatbot.js
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
public
*.css
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"singleQuote": false,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"jsxSingleQuote": false,
"arrowParens": "always",
"tailwindFunctions": [
"classNames"
]
}
2 changes: 1 addition & 1 deletion chatbot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
"@microsoft/fetch-event-source": "^2.0.1",
"tailwind-merge": "^1.14.0"
}
}
}
92 changes: 46 additions & 46 deletions chatbot/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
import esbuild from 'rollup-plugin-esbuild';
import postcss from 'rollup-plugin-postcss';
import commonjs from '@rollup/plugin-commonjs';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import babel from '@rollup/plugin-babel';
import tailwindcss from 'tailwindcss';
import pkg from './package.json';
import esbuild from "rollup-plugin-esbuild";
import postcss from "rollup-plugin-postcss";
import commonjs from "@rollup/plugin-commonjs";
import { nodeResolve } from "@rollup/plugin-node-resolve";
import replace from "@rollup/plugin-replace";
import babel from "@rollup/plugin-babel";
import tailwindcss from "tailwindcss";
import pkg from "./package.json";

const tailwindConfig = require('./tailwind.config.js');
const tailwindConfig = require("./tailwind.config.js");

export default [
{
input: 'src/index.ts',
output: [
{
name: "Chatbot",
file: pkg.main,
format: 'iife',
sourcemap: "inline",
inlineDynamicImports: true,
globals: {
"react/jsx-runtime": "jsxRuntime",
"react-dom/client": "ReactDOM",
"react": "React",
"jotai": "jotai",
},
},
],
{
input: "src/index.ts",
output: [
{
name: "Chatbot",
file: pkg.main,
format: "iife",
sourcemap: "inline",
inlineDynamicImports: true,
globals: {
"react/jsx-runtime": "jsxRuntime",
"react-dom/client": "ReactDOM",
react: "React",
jotai: "jotai",
},
},
],

plugins: [
nodeResolve(),
esbuild(),
postcss({
extensions: ['.css'],
plugins: [tailwindcss(tailwindConfig)],
}),
replace({
preventAssignment: true,
'process.env.NODE_ENV': JSON.stringify('dev')
}),
commonjs(),
babel({
babelHelpers: "bundled",
exclude: 'node_modules/**',
presets: [["@babel/preset-react", { "runtime": "automatic" }]]
}),
],
},
];
plugins: [
nodeResolve(),
esbuild(),
postcss({
extensions: [".css"],
plugins: [tailwindcss(tailwindConfig)],
}),
replace({
preventAssignment: true,
"process.env.NODE_ENV": JSON.stringify("dev"),
}),
commonjs(),
babel({
babelHelpers: "bundled",
exclude: "node_modules/**",
presets: [["@babel/preset-react", { runtime: "automatic" }]],
}),
],
},
];
Loading

1 comment on commit 0e8809f

@vercel
Copy link

@vercel vercel bot commented on 0e8809f Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.