Skip to content

Commit

Permalink
Add esm support (#1334)
Browse files Browse the repository at this point in the history
In this diff I migrated from babel cli to rollup to build bundle with
hidden internals and easily provide esm support.

I keep build-css script for now because linaria plugin for rollup does
not play nice inside of monorepo.
  • Loading branch information
TrySound committed Sep 5, 2019
1 parent cdce08e commit 95ded7f
Show file tree
Hide file tree
Showing 47 changed files with 236 additions and 50 deletions.
2 changes: 2 additions & 0 deletions draft-js-alignment-plugin/CHANGELOG.md
Expand Up @@ -7,6 +7,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

- Replace legacy lifecycle hooks with UNSAFE aliases; the required react version is 16.3
- Migrate styles to linaria
- Hide internals in single bundle
- Add esm support

## 2.0.6

Expand Down
5 changes: 3 additions & 2 deletions draft-js-alignment-plugin/package.json
Expand Up @@ -10,7 +10,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"files": [
"lib"
],
Expand All @@ -27,7 +28,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:css",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:css": "node ../scripts/build-css.js $(pwd)",
"prepublish": "yarn build"
},
Expand Down
2 changes: 2 additions & 0 deletions draft-js-anchor-plugin/CHANGELOG.md
Expand Up @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## To be released

- Migrate styles to linaria
- Hide internals in single bundle
- Add esm support

## 2.0.3

Expand Down
5 changes: 3 additions & 2 deletions draft-js-anchor-plugin/package.json
Expand Up @@ -11,7 +11,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts",
"files": [
"lib"
Expand All @@ -30,7 +31,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:css && yarn build:ts",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:ts": "../node_modules/.bin/cpx src/*.d.ts lib/",
"build:css": "node ../scripts/build-css.js $(pwd)",
"prepublish": "yarn build"
Expand Down
8 changes: 6 additions & 2 deletions draft-js-buttons/CHANGELOG.md
@@ -1,15 +1,19 @@

# Change Log

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## To be released

- Hide internals in single bundle
- Add esm support

## 2.0.2

- Allow draft-js v0.11
- Remove unused dependencies
- Add typescript typings

## 2.0.0-rc9 - 2017-11-07
- Added buttons for Superscript and Subscript.

- Added buttons for Superscript and Subscript.
5 changes: 3 additions & 2 deletions draft-js-buttons/package.json
Expand Up @@ -10,7 +10,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts",
"files": [
"lib"
Expand All @@ -28,7 +29,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:ts",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:ts": "../node_modules/.bin/cpx src/*.d.ts lib/",
"prepublish": "yarn build"
},
Expand Down
4 changes: 4 additions & 0 deletions draft-js-counter-plugin/CHANGELOG.md
Expand Up @@ -6,14 +6,18 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## To Be Released

- Migrate styles to linaria
- Hide internals in single bundle
- Add esm support

## 2.0.2

- Allow draft-js v0.11
- Remove unused dependencies

## 2.0.1

- New release

## 1.0.0 - 2016-04-20

### Released the first working version of DraftJS Counter Plugin
5 changes: 3 additions & 2 deletions draft-js-counter-plugin/package.json
Expand Up @@ -11,7 +11,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"files": [
"lib"
],
Expand All @@ -28,7 +29,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:css",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:css": "node ../scripts/build-css.js $(pwd)",
"prepublish": "yarn build"
},
Expand Down
2 changes: 2 additions & 0 deletions draft-js-divider-plugin/CHANGELOG.md
Expand Up @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## To Be Released

- Migrate styles to linaria
- Hide internals in single bundle
- Add esm support

## 1.1.1

Expand Down
5 changes: 3 additions & 2 deletions draft-js-divider-plugin/package.json
Expand Up @@ -10,7 +10,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"files": [
"lib"
],
Expand All @@ -28,7 +29,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:css",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:css": "node ../scripts/build-css.js $(pwd)",
"prepublish": "yarn build"
},
Expand Down
7 changes: 7 additions & 0 deletions draft-js-drag-n-drop-plugin/CHANGELOG.md
Expand Up @@ -3,16 +3,23 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## To be released

- Hide internals in single bundle
- Add esm support

## 2.0.4

- Allow draft-js v0.11
- Remove unused dependencies
- Add typescript typings

## 2.0.2 - 2.0.3

- bumped find-with-regex

## 2.0.0-rc9

- add null-check to fix bug where store is not defined when decorator is rendered.

### Released the first working version of DraftJS DnD Plugin
5 changes: 3 additions & 2 deletions draft-js-drag-n-drop-plugin/package.json
Expand Up @@ -10,7 +10,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts",
"files": [
"lib"
Expand All @@ -28,7 +29,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:ts",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:ts": "../node_modules/.bin/cpx src/*.d.ts lib/",
"prepublish": "yarn build"
},
Expand Down
6 changes: 6 additions & 0 deletions draft-js-drag-n-drop-upload-plugin/CHANGELOG.md
Expand Up @@ -3,12 +3,18 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## To be released

- Hide internals in single bundle
- Add esm support

## 2.0.4

- Allow draft-js v0.11
- Remove unused dependencies

## 2.0.2 - 2.0.3

- bumped find-with-regex

## To Be Released
Expand Down
5 changes: 3 additions & 2 deletions draft-js-drag-n-drop-upload-plugin/package.json
Expand Up @@ -10,7 +10,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"files": [
"lib"
],
Expand All @@ -27,7 +28,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"prepublish": "yarn build"
},
"license": "MIT",
Expand Down
2 changes: 2 additions & 0 deletions draft-js-emoji-plugin/CHANGELOG.md
Expand Up @@ -7,6 +7,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

- Replace legacy lifecycle hooks with UNSAFE aliases; the required react version is 16.3
- Migrate styles to linaria
- Hide internals in single bundle
- Add esm support

## 2.1.3

Expand Down
5 changes: 3 additions & 2 deletions draft-js-emoji-plugin/package.json
Expand Up @@ -11,7 +11,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts",
"files": [
"lib"
Expand All @@ -29,7 +30,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:ts && yarn build:css",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:ts": "../node_modules/.bin/cpx src/*.d.ts lib/",
"build:css": "node ../scripts/build-css.js $(pwd)",
"prepublish": "yarn build"
Expand Down
8 changes: 8 additions & 0 deletions draft-js-focus-plugin/CHANGELOG.md
Expand Up @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## To Be Released

- Migrate styles to linaria
- Hide internals in single bundle
- Add esm support

## 3.0.1

Expand All @@ -18,19 +20,25 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Add typescript typings

## 2.2.0

- Fix blockKeyStore behaviour so it is not accidentally deleted before the component has finished mounting.

## 2.1.0

- Fix removeBlock behaviour (replace with unstyled block when no previous block...)

## 2.0.6

- Include all delete commands when handling deleting atomic blocks

## 2.0.5

- Delete block entities when deleting content

## 2.0.3 - 2.0.4

- bumped find-with-regex

## 2.0.2

- fix newline linked to entity
5 changes: 3 additions & 2 deletions draft-js-focus-plugin/package.json
Expand Up @@ -10,7 +10,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts",
"files": [
"lib"
Expand All @@ -28,7 +29,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:ts && yarn build:css",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:ts": "../node_modules/.bin/cpx src/*.d.ts lib/",
"build:css": "node ../scripts/build-css.js $(pwd)",
"prepublish": "yarn build"
Expand Down
2 changes: 2 additions & 0 deletions draft-js-hashtag-plugin/CHANGELOG.md
Expand Up @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## To Be Released

- Migrate styles to linaria
- Hide internals in single bundle
- Add esm support

## 2.0.4

Expand Down
5 changes: 3 additions & 2 deletions draft-js-hashtag-plugin/package.json
Expand Up @@ -11,7 +11,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"files": [
"lib"
],
Expand All @@ -28,7 +29,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:css",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:css": "node ../scripts/build-css.js $(pwd)",
"prepublish": "yarn build"
},
Expand Down
2 changes: 2 additions & 0 deletions draft-js-image-plugin/CHANGELOG.md
Expand Up @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## To be released

- Migrate styles to linaria
- Hide internals in single bundle
- Add esm support

## 2.0.7

Expand Down
5 changes: 3 additions & 2 deletions draft-js-image-plugin/package.json
Expand Up @@ -10,7 +10,8 @@
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins.git"
},
"main": "lib/index.js",
"main": "lib/index.cjs.js",
"module": "lib/index.esm.js",
"types": "lib/index.d.ts",
"files": [
"lib"
Expand All @@ -28,7 +29,7 @@
"scripts": {
"clean": "../node_modules/.bin/rimraf lib",
"build": "yarn clean && yarn build:js && yarn build:ts && yarn build:css",
"build:js": "../node_modules/.bin/babel src --out-dir=lib --root-mode=upward --ignore='__test__/*'",
"build:js": "../node_modules/.bin/rollup --config ../rollup.config.js",
"build:ts": "../node_modules/.bin/cpx src/*.d.ts lib/",
"build:css": "node ../scripts/build-css.js $(pwd)",
"prepublish": "yarn build"
Expand Down
2 changes: 2 additions & 0 deletions draft-js-inline-toolbar-plugin/CHANGELOG.md
Expand Up @@ -7,6 +7,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

- Replace legacy lifecycle hooks with UNSAFE aliases; the required react version is 16.3
- Migrate styles to linaria
- Hide internals in single bundle
- Add esm support

## 3.0.1

Expand Down

0 comments on commit 95ded7f

Please sign in to comment.