Skip to content

Commit

Permalink
Merge pull request #119 from nlxai/unify-rollup
Browse files Browse the repository at this point in the history
unify rollup
  • Loading branch information
peterszerzo authored Jul 4, 2024
2 parents e2cc28e + 67c0df8 commit 3b3911c
Show file tree
Hide file tree
Showing 22 changed files with 325 additions and 382 deletions.
211 changes: 99 additions & 112 deletions package-lock.json

Large diffs are not rendered by default.

19 changes: 8 additions & 11 deletions packages/chat-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"name": "@nlxai/chat-core",
"version": "0.1.34",
"description": "NLX Chat SDK core",
"main": "lib/index.esm.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"commonjs": "lib/index.cjs.js",
"browser": "lib/index.umd.js",
"types": "lib/index.d.ts",
"exports": {
"types": "./lib/index.d.ts",
"import": "./lib/index.esm.js",
"require": "./lib/index.cjs.js"
},
"scripts": {
"build": "rm -rf lib && rollup -c",
"build": "rm -rf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"docs": "rm -rf docs/ && typedoc && concat-md --decrease-title-levels --dir-name-as-title docs/ > docs/index.md",
"lint:check": "eslint src/ --ext .ts,.tsx,.js,.jsx --max-warnings 0",
"lint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix",
Expand All @@ -21,21 +25,14 @@
"author": "Peter Szerzo <peter@nlx.ai>",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@types/isomorphic-fetch": "^0.0.36",
"@types/node": "^11.15.11",
"@types/ramda": "0.29.1",
"@types/uuid": "^9.0.7",
"concat-md": "^0.5.1",
"eslint-config-nlx": "*",
"prettier": "^3.1.0",
"rollup": "^4.9.3",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-config-nlx": "*",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.2.2"
Expand Down
45 changes: 0 additions & 45 deletions packages/chat-core/rollup.config.mjs

This file was deleted.

9 changes: 9 additions & 0 deletions packages/chat-core/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import rollupConfig from "rollup-config-nlx";
import pkg from "./package.json" assert { type: "json" };

export default rollupConfig({
pkg: pkg,
name: "nlxai.chatCore",
externalDeps: ["isomorphic-fetch", "reconnecting-websocket", "uuid", "ramda"],
input: "src/index.ts",
});
19 changes: 8 additions & 11 deletions packages/chat-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
"name": "@nlxai/chat-preact",
"version": "0.1.34",
"description": "Preact hook wrapper for the NLX Chat SDK",
"main": "lib/index.esm.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"commonjs": "lib/index.cjs.js",
"types": "lib/index.d.ts",
"exports": {
"types": "./lib/index.d.ts",
"import": "./lib/index.esm.js",
"require": "./lib/index.cjs.js"
},
"scripts": {
"build": "rm -rf lib && rollup -c",
"build": "rm -rf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"docs": "rm -rf docs/ && typedoc && concat-md --decrease-title-levels --dir-name-as-title docs/ > docs/index.md",
"lint:check": "eslint src/ --ext .ts,.tsx,.js,.jsx --max-warnings 0",
"lint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix",
Expand All @@ -20,18 +24,11 @@
"author": "Peter Szerzo <peter@nlx.ai>",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@types/node": "^11.15.11",
"@types/ramda": "0.29.1",
"eslint-config-nlx": "*",
"prettier": "^3.0.3",
"rollup": "^4.3.0",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-config-nlx": "*",
"typescript": "^5.2.2"
},
"dependencies": {
Expand Down
16 changes: 0 additions & 16 deletions packages/chat-preact/rollup.config.mjs

This file was deleted.

8 changes: 8 additions & 0 deletions packages/chat-preact/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import rollupConfig from "rollup-config-nlx";
import pkg from "./package.json" assert { type: "json" };

export default rollupConfig({
pkg: pkg,
externalDeps: ["preact/hooks", "ramda", "@nlxai/chat-core"],
input: "src/index.ts",
});
18 changes: 8 additions & 10 deletions packages/chat-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
"name": "@nlxai/chat-react",
"version": "0.1.34",
"description": "React hook wrapper for the NLX Chat SDK",
"main": "lib/index.esm.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"commonjs": "lib/index.cjs.js",
"types": "lib/index.d.ts",
"exports": {
"types": "./lib/index.d.ts",
"import": "./lib/index.esm.js",
"require": "./lib/index.cjs.js"
},
"scripts": {
"build": "rm -rf lib && rollup -c",
"build": "rm -rf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"docs": "rm -rf docs/ && typedoc && concat-md --decrease-title-levels --dir-name-as-title docs/ > docs/index.md",
"lint:check": "eslint src/ --ext .ts,.tsx,.js,.jsx --max-warnings 0",
"lint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix",
Expand All @@ -20,19 +24,13 @@
"author": "Peter Szerzo <peter@nlx.ai>",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@types/node": "^11.15.11",
"@types/ramda": "0.29.1",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"eslint-config-nlx": "*",
"prettier": "^3.0.3",
"rollup": "^4.3.0",
"rollup-config-nlx": "*",
"rollup-plugin-node-polyfills": "^0.2.1",
"typescript": "^5.2.2"
},
Expand Down
16 changes: 0 additions & 16 deletions packages/chat-react/rollup.config.mjs

This file was deleted.

8 changes: 8 additions & 0 deletions packages/chat-react/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import rollupConfig from "rollup-config-nlx";
import pkg from "./package.json" assert { type: "json" };

export default rollupConfig({
pkg: pkg,
externalDeps: ["preact/hooks", "ramda", "@nlxai/chat-core"],
input: "src/index.ts",
});
19 changes: 8 additions & 11 deletions packages/chat-widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"name": "@nlxai/chat-widget",
"version": "0.1.34",
"description": "Standalone chat widget based on the NLX Chat SDK",
"main": "lib/index.esm.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"commonjs": "lib/index.cjs.js",
"browser": "lib/index.umd.js",
"types": "lib/index.d.ts",
"exports": {
"types": "./lib/index.d.ts",
"import": "./lib/index.esm.js",
"require": "./lib/index.cjs.js"
},
"scripts": {
"build": "rm -rf lib && rollup -c",
"build": "rm -rf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"docs": "rm -rf docs/ && typedoc && concat-md --decrease-title-levels --dir-name-as-title docs/ > docs/index.md",
"lint:check": "eslint src/ --ext .ts,.tsx,.js,.jsx --max-warnings 0",
"lint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix",
Expand All @@ -21,12 +25,6 @@
"author": "Peter Szerzo <peter@nlx.ai>",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@types/node": "^11.15.11",
"@types/ramda": "0.29.1",
"@types/react": "^18.2.21",
Expand All @@ -36,8 +34,7 @@
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^4.3.0",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-config-nlx": "*",
"typescript": "^5.2.2"
},
"dependencies": {
Expand Down
45 changes: 0 additions & 45 deletions packages/chat-widget/rollup.config.mjs

This file was deleted.

20 changes: 20 additions & 0 deletions packages/chat-widget/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import rollupConfig from "rollup-config-nlx";
import pkg from "./package.json" assert { type: "json" };

export default rollupConfig({
pkg: pkg,
name: "nlxai.chatWidget",
externalDeps: [
"react/jsx-runtime",
"marked",
"react",
"react-dom/client",
"@emotion/react",
"@nlxai/chat-react",
"ramda",
"react-dom",
"@emotion/styled",
"tinycolor2",
],
input: "src/index.tsx",
});
19 changes: 8 additions & 11 deletions packages/journey-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"name": "@nlxai/journey-manager",
"version": "0.1.34",
"description": "Journey Manager",
"main": "lib/index.esm.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"commonjs": "lib/index.cjs.js",
"browser": "lib/index.umd.js",
"types": "lib/index.d.ts",
"exports": {
"types": "./lib/index.d.ts",
"import": "./lib/index.esm.js",
"require": "./lib/index.cjs.js"
},
"scripts": {
"build": "rm -rf lib && rollup -c",
"build": "rm -rf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"docs": "rm -rf docs/ && typedoc && concat-md --decrease-title-levels --dir-name-as-title docs/ > docs/index.md",
"lint:check": "eslint src/ --ext .ts,.tsx,.js,.jsx --max-warnings 0",
"lint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix",
Expand All @@ -22,21 +26,14 @@
"author": "Peter Szerzo <peter@nlx.ai>",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@types/isomorphic-fetch": "^0.0.36",
"@types/node": "^11.15.11",
"@types/ramda": "0.29.1",
"@types/uuid": "^9.0.7",
"concat-md": "^0.5.1",
"eslint-config-nlx": "*",
"prettier": "^3.1.0",
"rollup": "^4.9.3",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-config-nlx": "*",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.2.2"
Expand Down
Loading

0 comments on commit 3b3911c

Please sign in to comment.