Skip to content

Commit

Permalink
Merge pull request LedgerHQ#194 from MortalKastor/build-scripts
Browse files Browse the repository at this point in the history
Make `yarn build | clean | watch` work on Windows for each package
  • Loading branch information
MortalKastor authored Jul 26, 2018
2 parents d39a51b + 99634b9 commit 0a14493
Show file tree
Hide file tree
Showing 20 changed files with 74 additions and 51 deletions.
6 changes: 3 additions & 3 deletions packages/example-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"scripts": {
"start": "node lib/index.js",
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-app-ada/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"homepage": "https://github.com/LedgerHQ/ledgerjs#readme",
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/ flow-typed/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib",
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh",
"clean-test": "rm -rf test/lib",
"build-test": "yarn run clean-test && cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d test/lib test/src && flow-copy-source -v test/src test/lib",
"core-test": "yarn run build-test && yarn run flow && mocha --timeout 3500 test/lib/core",
Expand Down
6 changes: 3 additions & 3 deletions packages/hw-app-btc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-app-eth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-app-str/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-app-xrp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-hid-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"start": "node ./lib/cmd.js",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-http-proxy-devserver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"start": "node ./lib/cmd.js",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-transport-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-transport-mocker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-transport-node-hid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-transport-u2f/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/hw-transport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/react-native-hid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/react-native-hw-transport-ble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"test-snapshot": "node lib/index-snapshot.js",
"test": "yarn run test-snapshot",
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
6 changes: 3 additions & 3 deletions packages/web3-subprovider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
},
"scripts": {
"flow": "flow",
"clean": "rm -rf lib/",
"build": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --source-maps -d lib src && flow-copy-source -v src lib",
"watch": "cd ../.. && export PATH=$(yarn bin):$PATH && cd - && babel --watch --source-maps -d lib src & flow-copy-source -w -v src lib"
"clean": "bash ../../script/clean.sh",
"build": "bash ../../script/build.sh",
"watch": "bash ../../script/watch.sh"
}
}
9 changes: 9 additions & 0 deletions script/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

cd ../..
PATH=$(yarn bin):$PATH
cd -
babel --source-maps -d lib src
flow-copy-source -v src lib
5 changes: 5 additions & 0 deletions script/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -e

rm -rf lib/ flow-typed/
9 changes: 9 additions & 0 deletions script/watch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

cd ../..
PATH=$(yarn bin):$PATH
cd -
babel --watch --source-maps -d lib src &
flow-copy-source -w -v src lib

0 comments on commit 0a14493

Please sign in to comment.