New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build script #36

Merged
merged 6 commits into from Oct 18, 2017
Next

Add script to transpile (babel) and minify (uglify v3) a given list o…

…f scripts

Add correct file execute permissions
  • Loading branch information...
AquiGorka committed Oct 13, 2017
commit c010aaeaa36bb9da70076e7d93ad14e9f5d7f854
@@ -43,6 +43,8 @@
"npm": "5.4.2"
},
"devDependencies": {
"surge": "^0.19.0"
"babel-cli": "^6.26.0",
"surge": "^0.19.0",
"uglify-es": "^3.1.3"
}
}
@@ -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."
@@ -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
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.