Skip to content

Instantly share code, notes, and snippets.

Henrique Kuwai Rikezenho

View GitHub Profile
@Rikezenho
Rikezenho / cli-10.js
Created Feb 11, 2019
CLI tutorial - step 10
View cli-10.js
#!/usr/bin/env node
const program = require('commander');
const { join } = require('path');
const fs = require('fs');
const inquirer = require('inquirer');
const chalk = require('chalk');
const Table = require('cli-table');
const shell = require('shelljs');
const figlet = require('figlet');
@Rikezenho
Rikezenho / cli-09.js
Created Feb 11, 2019
CLI tutorial - step 9
View cli-09.js
#!/usr/bin/env node
const program = require('commander');
const { join } = require('path');
const fs = require('fs');
const inquirer = require('inquirer');
const chalk = require('chalk');
const Table = require('cli-table');
const shell = require('shelljs');
@Rikezenho
Rikezenho / cli-08.js
Last active Feb 11, 2019
CLI tutorial - step 8
View cli-08.js
#!/usr/bin/env node
const program = require('commander');
const { join } = require('path');
const fs = require('fs');
const inquirer = require('inquirer');
const chalk = require('chalk');
const Table = require('cli-table');
const package = require('./package.json');
@Rikezenho
Rikezenho / cli-07.js
Last active Feb 11, 2019
CLI tutorial - step 7
View cli-07.js
#!/usr/bin/env node
const program = require('commander');
const { join } = require('path');
const fs = require('fs');
const inquirer = require('inquirer');
const chalk = require('chalk');
const Table = require('cli-table');
const package = require('./package.json');
@Rikezenho
Rikezenho / cli-06.js
Last active Feb 11, 2019
CLI tutorial - step 6
View cli-06.js
#!/usr/bin/env node
const program = require('commander');
const { join } = require('path');
const fs = require('fs');
const inquirer = require('inquirer');
const chalk = require('chalk');
const package = require('./package.json');
const todosPath = join(__dirname, 'todos.json');
@Rikezenho
Rikezenho / cli-05.js
Last active Feb 11, 2019
CLI tutorial - step 5
View cli-05.js
#!/usr/bin/env node
const program = require('commander');
const { join } = require('path');
const fs = require('fs');
const inquirer = require('inquirer');
const chalk = require('chalk');
const package = require('./package.json');
const todosPath = join(__dirname, 'todos.json');
@Rikezenho
Rikezenho / cli-04.js
Last active Feb 11, 2019
CLI tutorial - step 4
View cli-04.js
#!/usr/bin/env node
const program = require('commander');
const { join } = require('path');
const fs = require('fs');
const inquirer = require('inquirer');
const package = require('./package.json');
const todosPath = join(__dirname, 'todos.json');
@Rikezenho
Rikezenho / cli-03.js
Last active Feb 11, 2019
CLI tutorial - step 3
View cli-03.js
#!/usr/bin/env node
const program = require('commander');
const { join } = require('path');
const fs = require('fs');
const inquirer = require('inquirer');
const package = require('./package.json');
const todosPath = join(__dirname, 'todos.json');
@Rikezenho
Rikezenho / cli-02.js
Last active Feb 11, 2019
CLI tutorial - step 2
View cli-02.js
#!/usr/bin/env node
const program = require('commander');
const { join } = require('path');
const fs = require('fs');
const package = require('./package.json');
const todosPath = join(__dirname, 'todos.json');
const getJson = (path) => {
@Rikezenho
Rikezenho / cli-01.js
Last active Feb 11, 2019
CLI tutorial - step 1
View cli-01.js
#!/usr/bin/env node
const program = require('commander');
const package = require('./package.json');
program.version(package.version);
program
.command('add [todo]')
.description('Adiciona um to-do')
You can’t perform that action at this time.