Skip to content
This repository was archived by the owner on May 31, 2020. It is now read-only.

Commit acbc1c4

Browse files
committed
update running flow scripts
1 parent 86019b6 commit acbc1c4

File tree

8 files changed

+150
-27
lines changed

8 files changed

+150
-27
lines changed

.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
"jsx": true
1616
}
1717
},
18+
"settings": {
19+
"react": {
20+
"version": "16"
21+
}
22+
},
1823
"plugins": ["prettier", "flowtype", "react", "standard"],
1924
"env": {
2025
"es6": true,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# draft-js-plugins@next
22
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors)
3-
[![Build Status]](https://travis-ci.org/draft-js-plugins/next.svg?branch=master)
3+
![Build Status](https://travis-ci.org/draft-js-plugins/next.svg?branch=master)
44

55
# DISCLAIMER: This project isn't usable yet
66

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"lint": "./node_modules/.bin/eslint **/*.js",
4242
"reinstall": "./node_modules/.bin/lerna exec -- rm -rf ./node_modules && ./node_modules/.bin/lerna exec -- npm install",
4343
"publish:all": "node ./scripts/publish.js",
44-
"flow": "./node_modules/.bin/lerna exec -- npm run flow",
44+
"flow": "./node_modules/.bin/lerna run flow",
4545
"unlink": "./node_modules/.bin/lerna exec -- npm unlink"
4646
},
4747
"husky": {

packages/atomic-block/src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class AtomicBlockPlugin extends Component<Props, State> {
2626
const { registerPlugin } = this.props
2727

2828
this.unregister = registerPlugin({
29-
handleReturn: this.handleReturn,
3029
keyBindingFn: this.keyBindingFn,
3130
blockRendererFn: this.blockRendererFn,
3231
})

packages/utils/.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
.*/node_modules/draft-js/lib/DraftEditor.react.js.flow
1212

1313
[include]
14-
flow-typed
14+
node_modules/@djsp/core/flow-lib
1515

1616
[libs]
1717

packages/utils/package-lock.json

Lines changed: 122 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/utils/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"access": "public"
2323
},
2424
"devDependencies": {
25+
"@djsp/core": "^0.1.0",
2526
"cross-env": "^5.1.4",
2627
"flow-bin": "^0.81.0",
2728
"flow-typed": "^2.5.1",

scripts/publish.js

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,33 @@ const fs = require('fs')
22
const path = require('path')
33
const packagePath = path.join(__dirname, '../', 'packages')
44
const spawn = require('child_process').spawn
5-
6-
const packages = fs.readdirSync(packagePath, 'utf8')
7-
.filter(file => fs.statSync(path.join(packagePath, file)).isDirectory())
85

9-
const runPublish = (folderName) => new Promise((resolve, reject) => {
10-
const process = spawn(
11-
'npm',
12-
['publish'],
13-
{
6+
const packages = fs
7+
.readdirSync(packagePath, 'utf8')
8+
.filter(file => fs.statSync(path.join(packagePath, file)).isDirectory())
9+
10+
const runPublish = folderName =>
11+
new Promise((resolve, reject) => {
12+
const process = spawn('npm', ['publish'], {
1413
stdio: 'inherit',
15-
cwd: path.join(packagePath, folderName)
16-
}
17-
)
14+
cwd: path.join(packagePath, folderName),
15+
})
1816

19-
process.on('exit', (code) => {
20-
if (code !== 0) {
21-
process.exit(1)
22-
reject(code)
23-
}
24-
resolve(code)
17+
process.on('exit', code => {
18+
if (code !== 0) {
19+
reject(code)
20+
}
21+
resolve(code)
22+
})
2523
})
26-
})
2724

28-
const publishPackages = (packageFolders) => {
25+
const publishPackages = packageFolders => {
2926
const folderName = packageFolders.slice(-1)[0]
3027
if (folderName != null) {
31-
return runPublish(folderName)
32-
.then(() => {
28+
return runPublish(folderName).then(() => {
3329
console.log(`\nPUBLISHED: ${folderName}`)
34-
publishPackages(packageFolders.slice(0,-1)
35-
)})
30+
publishPackages(packageFolders.slice(0, -1))
31+
})
3632
} else {
3733
console.log('published')
3834
}

0 commit comments

Comments
 (0)