Skip to content

Commit

Permalink
Release [1.0.0-beta.2]
Browse files Browse the repository at this point in the history
- Fix node:crypto error
  • Loading branch information
aswinshenoy committed Jan 27, 2024
1 parent 4163e4c commit 4394bb4
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 23 deletions.
31 changes: 31 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chaya-editor",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"description": "A powerful and flexible text editor for React, built with Tiptap.",
"scripts": {
"tailwind": "tailwindcss -i ./src/style.scss -o ./dist/style.css -c ./tailwind.config.cjs",
Expand Down Expand Up @@ -84,6 +84,7 @@
"rollup-plugin-dts": "^5.1.1",
"rollup-plugin-polyfill-node": "^0.11.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-preserve-directives": "^0.2.0",
"sass": "^1.57.1",
"sass-loader": "^13.2.0",
"storybook": "^7.6.4",
Expand All @@ -96,12 +97,6 @@
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"files": [
"dist"
],
"types": "dist/index.d.ts",
"dependencies": {
"@docs.plus/extension-hyperlink": "^1.5.2",
"@tiptap/extension-color": "^2.1.13",
Expand All @@ -115,5 +110,10 @@
"@tiptap/extension-text-style": "^2.1.13",
"@tiptap/suggestion": "^2.1.13",
"chaya-ui": "1.0.0-beta.74"
}
},
"files": [
"dist"
],
"module": "dist/src/index.js",
"types": "dist/types/index.d.ts"
}
25 changes: 11 additions & 14 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,21 @@ import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
import json from '@rollup/plugin-json';
import preserveDirectives from "rollup-plugin-preserve-directives";

import dts from 'rollup-plugin-dts';
import postcss from 'rollup-plugin-postcss';
import nodePolyfills from 'rollup-plugin-polyfill-node';

import packageJson from './package.json' assert { type: 'json' };

export default [
{
input: 'src/index.ts',
output: [
{
file: packageJson.main,
format: 'cjs',
},
{
file: packageJson.module,
format: 'esm',
dir: 'dist',
preserveModules: true,
exports: 'named',
entryFileNames: '[name].js',
},
],
plugins: [
Expand All @@ -33,17 +29,18 @@ export default [
postcss({
modules: true,
minimize: true,

}),
terser(),
nodePolyfills(),
json(),
preserveDirectives({
supressPreserveModulesWarning: true,
}),
],
external: ["react", "react-dom"]
external: ["react", "react-dom", "nanoid"]
},
{
input: 'dist/esm/types/index.d.ts',
output: [{ file: 'dist/index.d.ts', format: 'esm' }],
input: 'dist/types/index.d.ts',
output: [{ dir: 'dist', format: 'esm' }],
plugins: [dts()],
},
];
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
"jsx": "react",
"module": "esnext",
"declaration": true,
"declarationDir": "types",
"declarationDir": "dist/types",
"sourceMap": true,
"outDir": "dist",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"emitDeclarationOnly": true,
"typeRoots": [
"src/types",
"node_modules/@types"
]
}
}

0 comments on commit 4394bb4

Please sign in to comment.