Skip to content

Commit

Permalink
code: Use bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Mar 28, 2022
1 parent 53bfce5 commit 94a5a37
Show file tree
Hide file tree
Showing 19 changed files with 72 additions and 27 deletions.
4 changes: 2 additions & 2 deletions cmds/autoloads.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

const util = require("../src/util");

exports.command = "autoloads";
exports.desc = "generate autoloads file";
exports.command = ['autoloads'];
exports.desc = 'generate autoloads file';

exports.handler = async (argv) => {
await util.e_call(argv, 'autoloads');
Expand Down
4 changes: 2 additions & 2 deletions cmds/clean-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

const util = require("../src/util");

exports.command = "clean-all";
exports.desc = "do all cleaning tasks";
exports.command = ['clean-all'];
exports.desc = 'do all cleaning tasks';

exports.handler = async (argv) => {
await util.e_call(argv, 'clean-all');
Expand Down
2 changes: 1 addition & 1 deletion cmds/clean-elc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const util = require("../src/util");

exports.command = 'clean-elc';
exports.command = ['clean-elc'];
exports.desc = 'remove byte compiled files generated by cask build';

exports.handler = async (argv) => {
Expand Down
4 changes: 2 additions & 2 deletions cmds/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

const util = require("../src/util");

exports.command = "clean";
exports.desc = "clean up local .eask directory";
exports.command = ['clean'];
exports.desc = 'clean up local .eask directory';

exports.handler = async (argv) => {
await util.e_call(argv, 'clean');
Expand Down
44 changes: 44 additions & 0 deletions cmds/concat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Copyright (C) 2022 Jen-Chieh Shen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Emacs; see the file COPYING. If not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/

"use strict";

const util = require("../src/util");

exports.command = ['concat [names..]', 'concatenate [names..]'];
exports.desc = 'concatenate all elisp files';
exports.builder = {
names: {
description: 'specify files to concatenate',
requiresArg: false,
type: 'array',
},
destintation: {
description: 'optional output destintation',
requiresArg: true,
alias: 'dest',
type: 'string',
}
};

exports.handler = async (argv) => {
await util.e_call(argv, 'concat'
, argv.names
, util.def_flag(argv.dest, '--dest', argv.dest));
};
2 changes: 1 addition & 1 deletion cmds/eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const util = require("../src/util");

exports.command = 'eval [form]';
exports.command = ['eval [form]'];
exports.desc = 'evaluate lisp form with a proper PATH';
exports.builder = {
form: {
Expand Down
2 changes: 1 addition & 1 deletion cmds/exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const util = require("../src/util");

exports.command = 'exec [args..]';
exports.command = ['exec [args..]'];
exports.desc = 'execute command with correct load-path set up';
exports.builder = {
args: {
Expand Down
2 changes: 1 addition & 1 deletion cmds/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const util = require("../src/util");

exports.command = 'files';
exports.command = ['files'];
exports.desc = 'print the list of all package files';

exports.handler = async (argv) => {
Expand Down
2 changes: 1 addition & 1 deletion cmds/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const util = require("../src/util");

exports.command = 'info';
exports.command = ['info'];
exports.desc = 'display information about the current package';

exports.handler = async (argv) => {
Expand Down
2 changes: 1 addition & 1 deletion cmds/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const EASK_FILE = path.join(process.cwd(), '/Eask');

var instance; /* `readline` instance */

exports.command = 'init';
exports.command = ['init'];
exports.desc = 'create new `Eask` file in current directory';

exports.handler = async ({}) => {
Expand Down
2 changes: 1 addition & 1 deletion cmds/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const util = require("../src/util");

exports.command = 'install [names..]';
exports.command = ['install [names..]'];
exports.desc = 'install packages';
exports.builder = {
names: {
Expand Down
4 changes: 2 additions & 2 deletions cmds/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

const util = require("../src/util");

exports.command = "lint [names..]";
exports.desc = "lint the package using `package-lint'";
exports.command = ['lint [names..]'];
exports.desc = 'lint the package using package-lint';
exports.builder = {
names: {
description: 'specify files to lint',
Expand Down
4 changes: 2 additions & 2 deletions cmds/list-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

const util = require("../src/util");

exports.command = "list-all";
exports.desc = "list all available packages";
exports.command = ['list-all'];
exports.desc = 'list all available packages';
exports.builder = {
depth: {
description: 'dependency depth level to print',
Expand Down
4 changes: 2 additions & 2 deletions cmds/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

const util = require("../src/util");

exports.command = "list";
exports.desc = "list all installed packages";
exports.command = ['list'];
exports.desc = 'list all installed packages';
exports.builder = {
depth: {
description: 'dependency depth level to print',
Expand Down
2 changes: 1 addition & 1 deletion cmds/load-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const util = require("../src/util");

exports.command = 'load-path';
exports.command = ['load-path'];
exports.desc = 'print the load-path from workspace';

exports.handler = async (argv) => {
Expand Down
2 changes: 1 addition & 1 deletion cmds/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

const util = require("../src/util");

exports.command = 'load [files..]';
exports.command = ['load [files..]'];
exports.desc = 'load files';
exports.builder = {
files: {
Expand Down
4 changes: 2 additions & 2 deletions cmds/outdated.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

const util = require("../src/util");

exports.command = "outdated";
exports.desc = "show all outdated dependencies";
exports.command = ['outdated'];
exports.desc = 'show all outdated dependencies';

exports.handler = async (argv) => {
await util.e_call(argv, 'outdated');
Expand Down
4 changes: 2 additions & 2 deletions cmds/package-directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

const util = require("../src/util");

exports.command = "package-directory";
exports.desc = "print path to package directory";
exports.command = ['package-directory'];
exports.desc = 'print path to package directory';

exports.handler = async (argv) => {
await util.e_call(argv, 'package-directory');
Expand Down
5 changes: 3 additions & 2 deletions cmds/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@

const util = require("../src/util");

exports.command = ['package [dest]'];
exports.command = ['package [destintation]'];
exports.desc = 'Build a package artefact, and put it into the given destination';
exports.builder = {
dest: {
destintation: {
description: 'destination path/folder',
requiresArg: false,
alias: 'dest',
type: 'string',
},
};
Expand Down

0 comments on commit 94a5a37

Please sign in to comment.