From 1d6a741847dba201d978486fc7ff98fd2711ad76 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 24 May 2015 09:21:08 -0400 Subject: [PATCH] add demo task --- bin/embark | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/embark b/bin/embark index acf910666..ba0c59e6e 100644 --- a/bin/embark +++ b/bin/embark @@ -44,6 +44,19 @@ program.command('blockchain [env]').description('run blockchain').action(functio exec('grunt blockchain:' + env); }); +program.command('demo').description('create a working dapp with a SimpleStorage contract').action(function() { + var boilerPath = path.join(__dirname + '/../boilerplate'); + var demoPath = path.join(__dirname + '/../demo'); + + var targetDir = "./embark_demo"; + wrench.copyDirSyncRecursive(boilerPath, targetDir); + wrench.copyDirSyncRecursive(demoPath, targetDir + "/app", {forceDelete: true}); + + cd(targetDir); + exec('npm install'); + console.log('\n\ninit complete'); +}); + program.parse(process.argv) if (!process.argv.slice(2).length) {