destiny
Advanced tools
Comparing version 0.0.12 to 0.0.13
{ | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"name": "destiny", | ||
@@ -4,0 +4,0 @@ "main": "dist/src/index.js", |
@@ -11,2 +11,3 @@ #!/usr/bin/env node | ||
const package_json_1 = require("../package.json"); | ||
const fs_extra_1 = require("fs-extra"); | ||
const { argv, env } = process; | ||
@@ -63,2 +64,10 @@ const defaults = { | ||
const filesToFixImports = filesToStructure; | ||
if (!fs_extra_1.existsSync(path)) { | ||
console.log("Unable to resolve the path:", path); | ||
return; | ||
} | ||
if (!filesToStructure.length) { | ||
console.log("Could not find any files for: ", path); | ||
return; | ||
} | ||
console.log("Files to structure:"); | ||
@@ -65,0 +74,0 @@ console.log(filesToStructure); |
{ | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"name": "destiny", | ||
@@ -4,0 +4,0 @@ "main": "dist/src/index.js", |
@@ -1,13 +0,13 @@ | ||
# butler-cli | ||
# destiny | ||
Prettier for File Structures | ||
[![npm version](https://badge.fury.io/js/butler-cli.svg)](https://badge.fury.io/js/butler-cli) | ||
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/benawad/butler-cli/issues) | ||
[![npm version](https://badge.fury.io/js/destiny.svg)](https://badge.fury.io/js/destiny) | ||
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/benawad/destiny/issues) | ||
--- | ||
Video explanation: https://www.youtube.com/watch?v=rGYbrIf-y58 | ||
Motivation: https://www.youtube.com/watch?v=rGYbrIf-y58 | ||
![example transformation](https://github.com/benawad/butler-cli/blob/master/assets/example.png) | ||
![example transformation](https://github.com/benawad/destiny/blob/master/assets/example.png) | ||
@@ -18,3 +18,3 @@ ## What does this do? | ||
2. Creates a directed graph based on how the JavaScript/TypeScript files import each other | ||
![example directed graph](https://github.com/benawad/butler-cli/blob/master/assets/graph.png) | ||
![example directed graph](https://github.com/benawad/destiny/blob/master/assets/graph.png) | ||
3. Creates a fractal representation of the graph (following similar rules outlined here: https://hackernoon.com/fractal-a-react-app-structure-for-infinite-scale-4dab943092af) | ||
@@ -32,3 +32,2 @@ 4. Moves existing files into the fractal structure | ||
- BEFORE running this tool on your codebase, make sure you have commited to git or made a backup (I don't expect the tool to destroy your work (although it's possible), but just in case you don't like the results) | ||
- Haven't tested this on Windows so idk if it'll work, but I'm using the `path` module so it might. | ||
- Snapshot tests don't format correctly | ||
@@ -40,3 +39,3 @@ - Only works on JavaScript/TypeScript codebases (althought this concept could probably be extended to any language) | ||
``` | ||
npx butler-cli path/to/src | ||
npx destiny src/**/*.* | ||
``` | ||
@@ -48,4 +47,8 @@ | ||
## Why did you name it destiny? | ||
![The name could be "Destiny" maybe. Like the file was meant to be there.](https://github.com/benawad/destiny/blob/master/assets/name.png) | ||
## Contributing | ||
pull requests are welcome :) |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
47389
645
51
0
6