Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[ignore]
.*/node_modules/babel-.*
.*/node_modules/fbjs/.*
.*/node_modules/json5/.*
.*/node_modules/systemjs-builder/.*
.*/node_modules/.tmp/.*
.*/node_modules/invariant/*

[include]
src

[options]
esproposal.decorators=ignore
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
module.name_mapper='.+css$' -> 'CSSModule'
strip_root=true
module.system=haste
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=src
unsafe.enable_getters_and_setters=true
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.DEFAULT_GOAL := build

setup: clean
yarn --pure-lockfile

build:
yarn build

clean:
rm -rf ./node_modules
rm -rf ./lib/*

test: build
yarn flow

.PHONY: setup build clean test
3 changes: 1 addition & 2 deletions flow-typed/api.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

declare module '@foxcomm/api-js' {
declare type StringDict = {[name: string]: string};

declare type AbortablePromise = Promise & {
declare type AbortablePromise = Promise<*> & {
abort(): void;
};

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"test": "mocha test",
"build": "babel src -d lib",
"docs": "APIARY_DOCS_PATH=../phoenix-scala/docs/api/docs/objects node ./bin/import-docs.js && node ./bin/make-docs.js",
"prepublish": "npm run build"
"prepublish": "npm run build",
"flow": "./node_modules/.bin/flow check"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -39,6 +40,7 @@
"babel-preset-es2015": "^6.9.0",
"babel-preset-stage-1": "^6.5.0",
"escape-html": "^1.0.3",
"flow-bin": "^0.46.0",
"leafdoc": "github:anru/Leafdoc#v1.1",
"mkdirp": "^0.5.1",
"mocha": "^2.5.2",
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,10 @@ fill-range@^2.1.0:
repeat-element "^1.1.2"
repeat-string "^1.5.2"

flow-bin@^0.46.0:
version "0.46.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.46.0.tgz#06ad7fe19dddb1042264438064a2a32fee12b872"

for-in@^0.1.5:
version "0.1.6"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8"
Expand Down