Skip to content

Commit 3fd0336

Browse files
committed
Linux Bugfix and application description made static
1 parent f5ddd78 commit 3fd0336

File tree

5 files changed

+14
-469
lines changed

5 files changed

+14
-469
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ This package is a command line interface for file handling using [SniperCode.Fil
4343
sfs
4444
```
4545

46+
If you cannot run the command directly in terminal just use the following command:
47+
48+
```bash
49+
npx sfs
50+
```
51+
4652
This command will show the usage of SniperCode.FileSystem.Cli as shown in picture below.
4753

4854
![SniperCode.FileSystem.Cli](./doc/cli-image.png)

config/details.js

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,14 @@ import FsCliPackage from '../lib/package.js';
77
* @extends {FsCliPackage}
88
*/
99
export default class Details extends FsCliPackage {
10-
Package_Json = {}
1110
Details = {
1211
Name: "SniperCode.FileSystem.Cli"
1312
}
14-
GetPackageJson() {
15-
this.Package_Json = this.Store.get('package_json');
16-
if (this.Package_Json == null) {
17-
this.Package_Json = {}
18-
this.Store.delete('package_json');
19-
const package_json = this.File_System.read_file('./package.json');
20-
if (package_json) {
21-
this.Package_Json = JSON.parse(package_json);
22-
this.Store.set('package_json', this.Package_Json);
23-
} else this.GetPackageJson();
24-
} else return this.Package_Json;
25-
}
26-
constructor() { super(); }
27-
2813
getDetails() {
29-
const details = this.GetPackageJson();
30-
this.Details.Version = `v${details.version}`;
31-
this.Details.Description = details.description;
32-
this.Details.Author = details.author;
33-
this.Details.Homepage = details.homepage;
14+
this.Details.Version = `v1.0.2`;
15+
this.Details.Description = "A command line interface for file handling using SniperCode.FileSystem";
16+
this.Details.Author = "Dibesh Raj Subedi";
17+
this.Details.Homepage = "https://github.com/Sniper-Code/SniperCode.FileSystem.Cli";
3418
return this.Details;
3519
}
3620
}

lib/package.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Package Imports
22
import Inquirer from "inquirer";
3-
import Config from "conf";
43
import Color from "colors";
54
import { program, Option } from 'commander'
65
import { File_System, fs, path, UcFirst } from "./file_system.js";
@@ -11,7 +10,6 @@ import { shell_command, scan_dir_recursive_depth } from './shell_command.js'
1110
* @description The Core package handler for the SniperCode.FileSystem.Cli
1211
*/
1312
export default class SniperCode_FsCliPackage {
14-
Config = Config
1513
Color = Color
1614
Inquirer = Inquirer;
1715
program = program;
@@ -22,10 +20,4 @@ export default class SniperCode_FsCliPackage {
2220
UcFirst = UcFirst;
2321
shell_command = shell_command;
2422
scan_dir_recursive_depth = scan_dir_recursive_depth;
25-
26-
constructor() {
27-
this.Store = new this.Config({
28-
projectName: "SniperCode.FileSystem.Cli"
29-
});
30-
}
3123
}

0 commit comments

Comments
 (0)