示例#1
0
        private void MigrateCallback(object sender, EventArgs e)
        {
            OutputPane pane = package.TrufflePane;

            pane.Clear();
            pane.AddLine("Migrating...");
            pane.RunTruffleCommand("migrate --reset", () =>
            {
                pane.AddLine("Done.");
            });
        }
示例#2
0
        private void TestCallback(object sender, EventArgs e)
        {
            OutputPane pane = package.TrufflePane;

            pane.Clear();
            pane.AddLine("Running tests...");
            pane.RunTruffleCommand("test", () =>
            {
                pane.AddLine("Done.");
            });
        }
示例#3
0
        private void CompileCallback(object sender, EventArgs e)
        {
            OutputPane pane = package.TrufflePane;

            pane.Clear();
            pane.AddLine("Compiling...");
            pane.RunTruffleCommand("compile --all", () =>
            {
                pane.AddLine("Done.");
            });
        }
示例#4
0
        private void InitializeProjectCallback(object sender, EventArgs e)
        {
            OutputPane pane = package.TrufflePane;

            pane.Clear();
            pane.AddLine("Initializing project...");
            pane.RunTruffleCommand("init", () =>
            {
                pane.AddLine("Done");
                this.package.RecheckEnvironment();
            });
        }
示例#5
0
        private void InstallTestRPCCallback(object sender, EventArgs e)
        {
            OutputPane pane = package.TrufflePane;

            pane.Clear();
            pane.AddLine("Checking Node.JS and NPM installation...");

            TruffleENV.CheckNPMInstalled((isNPMInstalled) =>
            {
                if (isNPMInstalled == false)
                {
                    pane.AddLine("Cannot install TestRPC. It appears you don't have Node.JS or NPM installed on your system. Please visit http://nodejs.org for more information.");
                    return;
                }

                pane.AddLine("Installing TestRPC... (this may take a minute)");

                pane.RunInProject("npm install ethereumjs-testrpc", () =>
                {
                    pane.AddLine("Done! Checking installation...");

                    if (TruffleENV.CheckTestRPCInstalled(package.ProjectPath) == true)
                    {
                        ((TrufflePackage)this.package).RecheckEnvironment();
                        pane.AddLine("Completed successfully.");
                    }
                    else
                    {
                        pane.AddLine("Installation failed. Please see error messages above and try again.");
                    }
                });
            });
        }