forked from FlowiseAI/FlowiseChatEmbed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1cddbc4
Showing
34 changed files
with
4,766 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:solid/typescript'], | ||
plugins: ['@typescript-eslint', 'solid'], | ||
parser: '@typescript-eslint/parser', | ||
ignorePatterns: ['**/*.md'], | ||
rules: { | ||
'@next/next/no-img-element': 'off', | ||
'@next/next/no-html-link-for-pages': 'off', | ||
'solid/no-innerhtml': 'off', | ||
'@typescript-eslint/no-namespace': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
rollup.config.js | ||
tailwind.config.cjs | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!-- markdownlint-disable MD030 --> | ||
|
||
# Flowise Embed | ||
|
||
Javascript library to display flowise chatbot on your website | ||
|
||
![Flowise](https://github.com/FlowiseAI/Flowise/blob/main/images/flowise.gif?raw=true) | ||
|
||
Install: | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
Dev: | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
Build: | ||
|
||
```bash | ||
yarn build | ||
``` | ||
|
||
## Embed in your HTML | ||
|
||
``` | ||
<script type="module"> | ||
import Chatbot from 'https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js' | ||
Chatbot.init({ | ||
chatflowid: '<chatflowid>', | ||
apiHost: 'http://localhost:3000' | ||
}) | ||
</script> | ||
``` | ||
|
||
## License | ||
|
||
Source code in this repository is made available under the [MIT License](https://github.com/FlowiseAI/Flowise/blob/master/LICENSE.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/tsconfig", | ||
"display": "Default", | ||
"compilerOptions": { | ||
"composite": false, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"inlineSources": false, | ||
"isolatedModules": true, | ||
"moduleResolution": "node", | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"preserveWatchOutput": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"downlevelIteration": true | ||
}, | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "flowise-embed", | ||
"version": "1.0.2", | ||
"description": "Javascript library to display flowise chatbot on your website", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"dev": "rollup --watch --config rollup.config.js", | ||
"build": "rollup --config rollup.config.js", | ||
"lint": "eslint \"src/**/*.ts*\"", | ||
"lint-fix": "eslint --fix \"src/**/*.ts*\"" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"solid-element": "1.7.0", | ||
"solid-js": "1.7.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/preset-typescript": "7.21.4", | ||
"@rollup/plugin-babel": "6.0.3", | ||
"@rollup/plugin-node-resolve": "15.0.1", | ||
"@rollup/plugin-terser": "0.4.0", | ||
"@rollup/plugin-typescript": "11.0.0", | ||
"@typescript-eslint/eslint-plugin": "^5.57.0", | ||
"@typescript-eslint/parser": "^5.57.0", | ||
"autoprefixer": "10.4.14", | ||
"babel-preset-solid": "1.7.1", | ||
"eslint": "^8.24.0", | ||
"eslint-config-next": "13.2.4", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"eslint-plugin-react": "^7.26.1", | ||
"eslint-plugin-solid": "0.12.0", | ||
"postcss": "8.4.21", | ||
"react": "18.2.0", | ||
"rollup": "3.20.2", | ||
"rollup-plugin-livereload": "2.0.5", | ||
"rollup-plugin-postcss": "4.0.2", | ||
"rollup-plugin-serve": "2.0.2", | ||
"rollup-plugin-typescript-paths": "1.4.0", | ||
"tailwindcss": "3.3.1", | ||
"typescript": "5.0.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import resolve from '@rollup/plugin-node-resolve' | ||
import terser from '@rollup/plugin-terser' | ||
import { babel } from '@rollup/plugin-babel' | ||
import postcss from 'rollup-plugin-postcss' | ||
import autoprefixer from 'autoprefixer' | ||
import tailwindcss from 'tailwindcss' | ||
import typescript from '@rollup/plugin-typescript' | ||
import { typescriptPaths } from 'rollup-plugin-typescript-paths' | ||
// import serve from 'rollup-plugin-serve' | ||
// import livereload from 'rollup-plugin-livereload' | ||
|
||
const extensions = ['.ts', '.tsx'] | ||
|
||
const indexConfig = { | ||
plugins: [ | ||
resolve({ extensions }), | ||
babel({ | ||
babelHelpers: 'bundled', | ||
exclude: 'node_modules/**', | ||
presets: ['solid', '@babel/preset-typescript'], | ||
extensions | ||
}), | ||
postcss({ | ||
plugins: [autoprefixer(), tailwindcss()], | ||
extract: false, | ||
modules: false, | ||
autoModules: false, | ||
minimize: true, | ||
inject: false | ||
}), | ||
typescript(), | ||
typescriptPaths({ preserveExtensions: true }), | ||
terser({ output: { comments: false } }) | ||
/* If you want to see the live app | ||
serve({ | ||
open: true, | ||
verbose: true, | ||
contentBase: ['dist'], | ||
host: 'localhost', | ||
port: 5678 | ||
}), | ||
livereload({ watch: 'dist' })*/ | ||
] | ||
} | ||
|
||
const configs = [ | ||
{ | ||
...indexConfig, | ||
input: './src/web.ts', | ||
output: { | ||
file: 'dist/web.js', | ||
format: 'es' | ||
} | ||
} | ||
] | ||
|
||
export default configs |
Oops, something went wrong.