-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to transpile (babel) and minify (uglify v3) a given list o…
…f scripts
- Loading branch information
Showing
4 changed files
with
306 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,232 @@ | ||
. ./scripts/hack-source.sh | ||
|
||
for file in \ | ||
"borc/src/decoder.js" \ | ||
"borc/src/diagnose.js" \ | ||
"borc/src/encoder.js" \ | ||
"borc/src/simple.js" \ | ||
"borc/src/tagged.js" \ | ||
"borc/src/utils.js" \ | ||
"datastore-core/src/keytransform.js" \ | ||
"datastore-core/src/mount.js" \ | ||
"datastore-core/src/namespace.js" \ | ||
"datastore-core/src/shard-readme.js" \ | ||
"datastore-core/src/shard.js" \ | ||
"datastore-core/src/sharding.js" \ | ||
"datastore-core/src/tiered.js" \ | ||
"datastore-level/src/index.js" \ | ||
"hyperdiff/lib/index.js" \ | ||
"interface-connection/src/connection.js" \ | ||
"interface-datastore/src/key.js" \ | ||
"interface-datastore/src/memory.js" \ | ||
"interface-datastore/src/utils.js" \ | ||
"ipfs-bitswap/src/decision-engine/index.js" \ | ||
"ipfs-bitswap/src/decision-engine/ledger.js" \ | ||
"ipfs-bitswap/src/index.js" \ | ||
"ipfs-bitswap/src/network.js" \ | ||
"ipfs-bitswap/src/notifications.js" \ | ||
"ipfs-bitswap/src/types/message/entry.js" \ | ||
"ipfs-bitswap/src/types/message/index.js" \ | ||
"ipfs-bitswap/src/types/message/message.proto.js" \ | ||
"ipfs-bitswap/src/types/wantlist/entry.js" \ | ||
"ipfs-bitswap/src/types/wantlist/index.js" \ | ||
"ipfs-bitswap/src/utils.js" \ | ||
"ipfs-bitswap/src/want-manager/index.js" \ | ||
"ipfs-bitswap/src/want-manager/msg-queue.js" \ | ||
"ipfs-block-service/src/index.js" \ | ||
"ipfs-block/node_modules/cids/src/index.js" \ | ||
"ipfs-block/src/index.js" \ | ||
"ipfs-pubsub-room/src/connection.js" \ | ||
"ipfs-pubsub-room/src/encoding.js" \ | ||
"ipfs-pubsub-room/src/index.js" \ | ||
"ipfs-repo/src/api-addr.js" \ | ||
"ipfs-repo/src/blockstore.js" \ | ||
"ipfs-repo/src/config.js" \ | ||
"ipfs-repo/src/index.js" \ | ||
"ipfs-repo/src/lock-memory.js" \ | ||
"ipfs-repo/src/version.js" \ | ||
"ipfs-unixfs-engine/src/builder/balanced/balanced-reducer.js" \ | ||
"ipfs-unixfs-engine/src/builder/builder.js" \ | ||
"ipfs-unixfs-engine/src/builder/create-build-stream.js" \ | ||
"ipfs-unixfs-engine/src/builder/flat/index.js" \ | ||
"ipfs-unixfs-engine/src/builder/reduce.js" \ | ||
"ipfs-unixfs-engine/src/builder/trickle/trickle-reducer.js" \ | ||
"ipfs-unixfs-engine/src/chunker/fixed-size.js" \ | ||
"ipfs-unixfs-engine/src/hamt/bucket.js" \ | ||
"ipfs-unixfs-engine/src/exporter/clean-multihash.js" \ | ||
"ipfs-unixfs-engine/src/exporter/dir-flat.js" \ | ||
"ipfs-unixfs-engine/src/exporter/dir-hamt-sharded.js" \ | ||
"ipfs-unixfs-engine/src/exporter/file.js" \ | ||
"ipfs-unixfs-engine/src/exporter/index.js" \ | ||
"ipfs-unixfs-engine/src/exporter/object.js" \ | ||
"ipfs-unixfs-engine/src/hamt/bucket.js" \ | ||
"ipfs-unixfs-engine/src/hamt/consumable-buffer.js" \ | ||
"ipfs-unixfs-engine/src/hamt/consumable-hash.js" \ | ||
"ipfs-unixfs-engine/src/importer/dir-flat.js" \ | ||
"ipfs-unixfs-engine/src/importer/dir-sharded.js" \ | ||
"ipfs-unixfs-engine/src/importer/dir.js" \ | ||
"ipfs-unixfs-engine/src/importer/flat-to-shard.js" \ | ||
"ipfs-unixfs-engine/src/importer/index.js" \ | ||
"ipfs-unixfs-engine/src/importer/tree-builder.js" \ | ||
"ipfs-unixfs/src/index.js" \ | ||
"ipfs-unixfs/src/unixfs.proto.js" \ | ||
"ipfs/src/core/boot.js" \ | ||
"ipfs/src/core/components/bitswap.js" \ | ||
"ipfs/src/core/components/block.js" \ | ||
"ipfs/src/core/components/bootstrap.js" \ | ||
"ipfs/src/core/components/config.js" \ | ||
"ipfs/src/core/components/dag.js" \ | ||
"ipfs/src/core/components/dht.js" \ | ||
"ipfs/src/core/components/files.js" \ | ||
"ipfs/src/core/components/id.js" \ | ||
"ipfs/src/core/components/init.js" \ | ||
"ipfs/src/core/components/is-online.js" \ | ||
"ipfs/src/core/components/libp2p.js" \ | ||
"ipfs/src/core/components/object.js" \ | ||
"ipfs/src/core/components/ping.js" \ | ||
"ipfs/src/core/components/pre-start.js" \ | ||
"ipfs/src/core/components/pubsub.js" \ | ||
"ipfs/src/core/components/repo.js" \ | ||
"ipfs/src/core/components/start.js" \ | ||
"ipfs/src/core/components/stop.js" \ | ||
"ipfs/src/core/components/swarm.js" \ | ||
"ipfs/src/core/components/version.js" \ | ||
"ipfs/src/core/index.js" \ | ||
"ipfs/src/core/runtime/libp2p-browser.js" \ | ||
"ipfs/src/core/runtime/repo-browser.js" \ | ||
"ipfs/src/core/state.js" \ | ||
"ipld-dag-cbor/src/resolver.js" \ | ||
"ipld-dag-cbor/src/util.js" \ | ||
"ipld-dag-pb/src/dag-link/index.js" \ | ||
"ipld-dag-pb/src/dag-link/index.js" \ | ||
"ipld-dag-pb/src/dag-node/create.js" \ | ||
"ipld-dag-pb/src/dag-node/index.js" \ | ||
"ipld-dag-pb/src/dag-node/rmLink.js" \ | ||
"ipld-dag-pb/src/dag-node/util.js" \ | ||
"ipld-dag-pb/src/dag.proto.js" \ | ||
"ipld-dag-pb/src/resolver.js" \ | ||
"ipld-dag-pb/src/util.js" \ | ||
"ipld-eth-star/eth-block-list/index.js" \ | ||
"ipld-eth-star/util/createIsLink.js" \ | ||
"ipld-eth-star/util/createResolver.js" \ | ||
"ipld-eth-star/util/createTrieResolver.js" \ | ||
"ipld-eth-star/util/createUtil.js" \ | ||
"ipld-eth-star/util/toIpfsBlock.js" \ | ||
"ipld-git/src/resolver.js" \ | ||
"ipld-git/src/util.js" \ | ||
"ipld-git/src/util/commit.js" \ | ||
"ipld-git/src/util/tag.js" \ | ||
"ipld-git/src/util/tree.js" \ | ||
"ipld-git/src/util/util.js" \ | ||
"ipld-resolver/src/index.js" \ | ||
"libp2p-crypto-secp256k1/src/crypto.js" \ | ||
"libp2p-crypto-secp256k1/src/index.js" \ | ||
"libp2p-crypto/src/aes/index.js" \ | ||
"libp2p-crypto/src/hmac/index-browser.js" \ | ||
"libp2p-crypto/src/keys/ecdh-browser.js" \ | ||
"libp2p-crypto/src/keys/ed25519-class.js" \ | ||
"libp2p-crypto/src/keys/ed25519.js" \ | ||
"libp2p-crypto/src/keys/ephemeral-keys.js" \ | ||
"libp2p-crypto/src/keys/index.js" \ | ||
"libp2p-crypto/src/keys/key-stretcher.js" \ | ||
"libp2p-crypto/src/keys/keys.proto.js" \ | ||
"libp2p-crypto/src/keys/rsa-browser.js" \ | ||
"libp2p-crypto/src/keys/rsa-class.js" \ | ||
"libp2p-crypto/src/nodeify.js" \ | ||
"libp2p-crypto/src/util.js" \ | ||
"libp2p-crypto/src/webcrypto.js" \ | ||
"libp2p-floodsub/src/index.js" \ | ||
"libp2p-floodsub/src/message/rpc.proto.js" \ | ||
"libp2p-floodsub/src/message/topic-descriptor.proto.js" \ | ||
"libp2p-floodsub/src/peer.js" \ | ||
"libp2p-floodsub/src/utils.js" \ | ||
"libp2p-identify/src/dialer.js" \ | ||
"libp2p-identify/src/listener.js" \ | ||
"libp2p-identify/src/message.js" \ | ||
"libp2p-multiplex/src/index.js" \ | ||
"libp2p-multiplex/src/muxer.js" \ | ||
"libp2p-ping/src/handler.js" \ | ||
"libp2p-ping/src/ping.js" \ | ||
"libp2p-ping/src/util.js" \ | ||
"libp2p-railing/src/index.js" \ | ||
"libp2p-secio/src/etm.js" \ | ||
"libp2p-secio/src/handshake/crypto.js" \ | ||
"libp2p-secio/src/handshake/exchange.js" \ | ||
"libp2p-secio/src/handshake/finish.js" \ | ||
"libp2p-secio/src/handshake/index.js" \ | ||
"libp2p-secio/src/handshake/propose.js" \ | ||
"libp2p-secio/src/handshake/secio.proto.js" \ | ||
"libp2p-secio/src/index.js" \ | ||
"libp2p-secio/src/state.js" \ | ||
"libp2p-secio/src/support.js" \ | ||
"libp2p-swarm/src/connection.js" \ | ||
"libp2p-swarm/src/dial.js" \ | ||
"libp2p-swarm/src/get-peer-info.js" \ | ||
"libp2p-swarm/src/index.js" \ | ||
"libp2p-swarm/src/limit-dialer/index.js" \ | ||
"libp2p-swarm/src/limit-dialer/queue.js" \ | ||
"libp2p-swarm/src/plaintext.js" \ | ||
"libp2p-swarm/src/protocol-muxer.js" \ | ||
"libp2p-swarm/src/transport.js" \ | ||
"libp2p-webrtc-star/src/index.js" \ | ||
"libp2p-webrtc-star/src/utils.js" \ | ||
"libp2p-websockets/node_modules/mafmt/src/index.js" \ | ||
"libp2p-websockets/node_modules/multiaddr/src/codec.js" \ | ||
"libp2p-websockets/node_modules/multiaddr/src/index.js" \ | ||
"libp2p-websockets/src/index.js" \ | ||
"libp2p-websockets/src/listener.js" \ | ||
"libp2p-websockets/src/ma-to-url.js" \ | ||
"libp2p/src/index.js" \ | ||
"mafmt/src/index.js" \ | ||
"multiaddr/src/codec.js" \ | ||
"multiaddr/src/index.js" \ | ||
"multibase/src/base.js" \ | ||
"multibase/src/base16.js" \ | ||
"multibase/src/constants.js" \ | ||
"multibase/src/index.js" \ | ||
"multicodec/src/index.js" \ | ||
"multicodec/src/name-table.js" \ | ||
"multicodec/src/util.js" \ | ||
"multicodec/src/varint-table.js" \ | ||
"multihashes/src/index.js" \ | ||
"multihashing-async/src/blake.js" \ | ||
"multihashing-async/src/crypto-sha1-2-browser.js" \ | ||
"multihashing-async/src/index.js" \ | ||
"multihashing-async/src/utils.js" \ | ||
"multiplex/src/channel.js" \ | ||
"multiplex/src/index.js" \ | ||
"multistream-select/src/dialer/index.js" \ | ||
"multistream-select/src/listener/index.js" \ | ||
"multistream-select/src/listener/ls-handler.js" \ | ||
"multistream-select/src/listener/select-handler.js" \ | ||
"multistream-select/src/select.js" \ | ||
"multistream-select/src/util.js" \ | ||
"peer-book/src/index.js" \ | ||
"peer-id/src/index.js" \ | ||
"peer-info/src/index.js" \ | ||
"peer-info/src/multiaddr-set.js" \ | ||
"pull-length-prefixed/src/decode.js" \ | ||
"pull-length-prefixed/src/encode.js" \ | ||
"smart-buffer/build/smartbuffer.js" \ | ||
"sparse-array/index.js" \ | ||
"time-cache/src/index.js" \ | ||
"varint-decoder/src/index.js" \ | ||
"y-array/src/Array.js" \ | ||
"y-indexeddb/src/IndexedDB.js" \ | ||
"y-ipfs-connector/src/decode.js" \ | ||
"y-ipfs-connector/src/encode.js" \ | ||
"y-ipfs-connector/src/index.js" \ | ||
"y-memory/src/Memory.js" \ | ||
"y-memory/src/RedBlackTree.js" \ | ||
"yjs/src/Connector.js" \ | ||
"yjs/src/Connectors/Test.js" \ | ||
"yjs/src/Database.js" \ | ||
"yjs/src/Struct.js" \ | ||
"yjs/src/Transaction.js" \ | ||
"yjs/src/Utils.js" \ | ||
"yjs/src/y.js" \ | ||
"cids/src/index.js"; do | ||
hack_source $file | ||
done | ||
|
||
echo "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
hack_source() { | ||
file="./node_modules/$1" | ||
echo "babelify $file" | ||
./node_modules/babel-cli/bin/babel.js $file --presets=es2015 -o $file | ||
echo "uglify $file" | ||
./node_modules/uglify-es/bin/uglifyjs $file -o $file | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -434,6 +434,27 @@ [email protected]: | |
version "3.0.3" | ||
resolved "https://registry.yarnpkg.com/b64/-/b64-3.0.3.tgz#36afeee0d9345f046387ce6de8a6702afe5bb56e" | ||
|
||
babel-cli@^6.26.0: | ||
version "6.26.0" | ||
resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" | ||
dependencies: | ||
babel-core "^6.26.0" | ||
babel-polyfill "^6.26.0" | ||
babel-register "^6.26.0" | ||
babel-runtime "^6.26.0" | ||
commander "^2.11.0" | ||
convert-source-map "^1.5.0" | ||
fs-readdir-recursive "^1.0.0" | ||
glob "^7.1.2" | ||
lodash "^4.17.4" | ||
output-file-sync "^1.1.2" | ||
path-is-absolute "^1.0.1" | ||
slash "^1.0.0" | ||
source-map "^0.5.6" | ||
v8flags "^2.1.1" | ||
optionalDependencies: | ||
chokidar "^1.6.1" | ||
|
||
[email protected]: | ||
version "6.22.0" | ||
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" | ||
|
@@ -975,6 +996,14 @@ babel-plugin-transform-strict-mode@^6.24.1: | |
babel-runtime "^6.22.0" | ||
babel-types "^6.24.1" | ||
|
||
babel-polyfill@^6.26.0: | ||
version "6.26.0" | ||
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" | ||
dependencies: | ||
babel-runtime "^6.26.0" | ||
core-js "^2.5.0" | ||
regenerator-runtime "^0.10.5" | ||
|
||
[email protected]: | ||
version "1.5.2" | ||
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.5.2.tgz#cd4ae90a6e94b709f97374b33e5f8b983556adef" | ||
|
@@ -1635,7 +1664,7 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0: | |
escape-string-regexp "^1.0.5" | ||
supports-color "^4.0.0" | ||
|
||
chokidar@^1.6.0, chokidar@^1.7.0: | ||
chokidar@^1.6.0, chokidar@^1.6.1, chokidar@^1.7.0: | ||
version "1.7.0" | ||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" | ||
dependencies: | ||
|
@@ -3408,6 +3437,10 @@ fs-extra@^0.30.0: | |
path-is-absolute "^1.0.0" | ||
rimraf "^2.2.8" | ||
|
||
fs-readdir-recursive@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" | ||
|
||
fs.realpath@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" | ||
|
@@ -3630,7 +3663,7 @@ got@^6.7.1: | |
unzip-response "^2.0.1" | ||
url-parse-lax "^1.0.0" | ||
|
||
graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: | ||
graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6, graceful-fs@^4.1.9: | ||
version "4.1.11" | ||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" | ||
|
||
|
@@ -6569,6 +6602,14 @@ osenv@^0.1.0, osenv@^0.1.4: | |
os-homedir "^1.0.0" | ||
os-tmpdir "^1.0.0" | ||
|
||
output-file-sync@^1.1.2: | ||
version "1.1.2" | ||
resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" | ||
dependencies: | ||
graceful-fs "^4.1.4" | ||
mkdirp "^0.5.1" | ||
object-assign "^4.1.0" | ||
|
||
p-finally@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" | ||
|
@@ -7804,6 +7845,10 @@ regenerate@^1.2.1: | |
version "1.3.3" | ||
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" | ||
|
||
regenerator-runtime@^0.10.5: | ||
version "0.10.5" | ||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" | ||
|
||
regenerator-runtime@^0.11.0: | ||
version "0.11.0" | ||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" | ||
|
@@ -9074,6 +9119,13 @@ ua-parser-js@^0.7.9: | |
version "0.7.14" | ||
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" | ||
|
||
uglify-es@^3.1.3: | ||
version "3.1.3" | ||
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.1.3.tgz#a21eeb149cb120a1f8302563689e19496550780b" | ||
dependencies: | ||
commander "~2.11.0" | ||
source-map "~0.5.1" | ||
|
||
[email protected], uglify-js@^3.0.13: | ||
version "3.1.2" | ||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.2.tgz#b50bcf15a5fd9e9ed40afbcdef3b59d6891b291f" | ||
|
@@ -9230,6 +9282,10 @@ url@^0.11.0: | |
punycode "1.3.2" | ||
querystring "0.2.0" | ||
|
||
user-home@^1.1.1: | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" | ||
|
||
util-deprecate@^1.0.2, util-deprecate@~1.0.1: | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" | ||
|
@@ -9275,6 +9331,12 @@ uws@~0.14.4: | |
version "0.14.5" | ||
resolved "https://registry.yarnpkg.com/uws/-/uws-0.14.5.tgz#67aaf33c46b2a587a5f6666d00f7691328f149dc" | ||
|
||
v8flags@^2.1.1: | ||
version "2.1.1" | ||
resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" | ||
dependencies: | ||
user-home "^1.1.1" | ||
|
||
validate-npm-package-license@^3.0.1: | ||
version "3.0.1" | ||
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" | ||
|