mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-23 02:48:21 +00:00
add meteor build and ipfs support
This commit is contained in:
parent
ea16259f34
commit
88866f1357
12
bin/embark
12
bin/embark
@ -58,6 +58,10 @@ program.command('build [env]').description('build dapp').action(function(env_) {
|
|||||||
run("grunt deploy_contracts:" + env);
|
run("grunt deploy_contracts:" + env);
|
||||||
run('grunt build:' + env);
|
run('grunt build:' + env);
|
||||||
}
|
}
|
||||||
|
else if (embarkConfig.type === "meteor") {
|
||||||
|
//deploy
|
||||||
|
run("meteor-build-client ./build -p ''");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
program.command('ipfs [env]').description('build dapp and make it available in ipfs').action(function(env_) {
|
program.command('ipfs [env]').description('build dapp and make it available in ipfs').action(function(env_) {
|
||||||
@ -70,8 +74,14 @@ program.command('ipfs [env]').description('build dapp and make it available in i
|
|||||||
run('grunt build:' + env)
|
run('grunt build:' + env)
|
||||||
run('grunt ipfs:' + env)
|
run('grunt ipfs:' + env)
|
||||||
}
|
}
|
||||||
|
else if (embarkConfig.type === "meteor") {
|
||||||
|
//deploy
|
||||||
|
//build
|
||||||
|
Embark = require('embark-framework')
|
||||||
|
Embark.release.ipfs("build/")
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
console.log("command not available in meteor or manual mode yet");
|
console.log("command not available in manual mode yet");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
require('shelljs/global');
|
require('shelljs/global');
|
||||||
|
|
||||||
ipfs = function() {
|
ipfs = function(build_dir) {
|
||||||
ipfs_path = "~/go/bin";
|
ipfs_path = "~/go/bin";
|
||||||
|
|
||||||
build_dir = "dist/dapp/";
|
|
||||||
|
|
||||||
cmd = ipfs_path + "/ipfs add -r " + build_dir;
|
cmd = ipfs_path + "/ipfs add -r " + build_dir;
|
||||||
|
|
||||||
console.log("=== adding " + cmd + " to ipfs");
|
console.log("=== adding " + cmd + " to ipfs");
|
||||||
|
@ -3,5 +3,5 @@ module.exports = (grunt) ->
|
|||||||
grunt.registerTask "ipfs", "distribute into ipfs", (env_) =>
|
grunt.registerTask "ipfs", "distribute into ipfs", (env_) =>
|
||||||
env = env_ || "development"
|
env = env_ || "development"
|
||||||
Embark = require('embark-framework')
|
Embark = require('embark-framework')
|
||||||
Embark.release.ipfs()
|
Embark.release.ipfs("dist/dapp/")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user