Giter Club home page Giter Club logo

Comments (9)

RIAEvangelist avatar RIAEvangelist commented on July 2, 2024

See if this helps you out :

var cmd=require('node-cmd');
var readline = require('readline');
var repository;

var rl = readline.createInterface(
    {
        input: process.stdin,
        output: process.stdout
    }
);

rl.question(
    "Enter adress: ", 
    function(address) {
        repository = address.slice(address.lastIndexOf('/')+1, address.length);
        console.log(repository); 
        var commands=`git clone ${address}
cd ${repository}
git log
dir`;

        console.log(commands); //see if this is what you expect

        cmd.get(
            commands,
            function(data){
                console.log('the output is :\n\n',data)
            }
        );
    }
);

from node-cmd.

RIAEvangelist avatar RIAEvangelist commented on July 2, 2024

My guess is that it should work just as I wrote it it there if you copy and paste it unless your code has an issue somewhere.

from node-cmd.

bronzer09 avatar bronzer09 commented on July 2, 2024

thank you, if there is any instroction to use it?

2016-01-10 16:05 GMT+02:00 Brandon Nozaki Miller [email protected]:

My guess is that it should work just as I wrote it it there if you copy
and paste it unless your code has an issue somewhere.


Reply to this email directly or view it on GitHub
#2 (comment)
.

from node-cmd.

RIAEvangelist avatar RIAEvangelist commented on July 2, 2024

To use what? node-cmd? It allows you to execute command line code. If you want to execute more than one line at a time you will have to put them all into one command.

Is that what you are asking?

from node-cmd.

bronzer09 avatar bronzer09 commented on July 2, 2024

I just asking about what you adviced me before with that "$".

2016-01-10 22:47 GMT+02:00 Brandon Nozaki Miller [email protected]:

To use what? node-cmd? It allows you to execute command line code. If you
want to execute more than one line at a time you will have to put them all
into one command.

Is that what you are asking?


Reply to this email directly or view it on GitHub
#2 (comment)
.

from node-cmd.

bronzer09 avatar bronzer09 commented on July 2, 2024

I mean what the difference beetwen standart writing the code and that one?
How does it work?

2016-01-10 16:19 GMT+02:00 Александр Бондаренко [email protected]:

thank you, if there is any instroction to use it?

2016-01-10 16:05 GMT+02:00 Brandon Nozaki Miller <[email protected]

:

My guess is that it should work just as I wrote it it there if you copy
and paste it unless your code has an issue somewhere.


Reply to this email directly or view it on GitHub
#2 (comment)
.

from node-cmd.

RIAEvangelist avatar RIAEvangelist commented on July 2, 2024

Its called a template string and it is a part of ES6. It is built into JavaScript now. And it is AWESOME!

notice I did not use quotes. I used a back tic -> ` <- not a ' or a "

//using a back tics
let a = 123;
let b = `a is : ${a}`;
console.log(a);

your console will log a is : 123

//using regular quotes
let a = 123;
let b = 'a is : ${a}';
console.log(a);

your console will log a is : ${a}

Check out the documentation on MDN : Template strings - JavaScript | MDN

from node-cmd.

bronzer09 avatar bronzer09 commented on July 2, 2024

Thanks, because i haven't learned ES6 yet)

2016-01-11 11:59 GMT+02:00 Brandon Nozaki Miller [email protected]:

Its called a template string and it is a part of ES6. It is built into
JavaScript now. And it is AWESOME!

notice I did not use quotes. I used a back tic -> ` <- not a ' or a "

//using a back ticslet a = 123;let b = a is : ${a};console.log(a);

your console will log a is : 123

//using regular quoteslet a = 123;let b = 'a is : ${a}';console.log(a);

your console will log a is : ${a}

Check out the documentation on MDN : Template strings - JavaScript | MDN
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings


Reply to this email directly or view it on GitHub
#2 (comment)
.

from node-cmd.

RIAEvangelist avatar RIAEvangelist commented on July 2, 2024

a lot is supported now in node v4.x, I highly recommend it.

from node-cmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.