Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect command name in docs #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ build
temp
vendor
composer.lock
.idea/
.directory/

7 changes: 6 additions & 1 deletion Source/Models/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@ public function process($configuration, string $packagePrefix, string $namespace
unset($config['extra']['branch-alias']['dev-master']);

@mkdir("$outputPath{$this->name}", 0755, true);
`cp -r {$this->path} $outputPath{$this->name}/`;
/*
* change $this->name dirname of $this->name it make sthe assumption ALL packages are in teh format account/package
* maybe this needs to be validated but I haven't found an example that doesn't
*/
$target = $outputPath . dirname( $this->name );
`cp -r {$this->path} {$target}`;

file_put_contents($outputPath.$this->name.'/composer.json', json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));

Expand Down
2 changes: 1 addition & 1 deletion Source/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function arrayPath($array, $path, $defaultValue = null) {
}
}

if (!function_exists('')) {
if (!function_exists('trailingslashit')) {
function trailingslashit( $string ) {
return untrailingslashit( $string ) . '/';
}
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ composer require ilab/namespacer
Once installed:

```bash
./vendor/bin/renamespace [--composer COMPOSER] [--source SOURCE] [--package PACKAGE] [--namespace NAMESPACE] [--config CONFIG] <dest>
./vendor/bin/namespacer [--composer COMPOSER] [--source SOURCE] [--package PACKAGE] [--namespace NAMESPACE] [--config CONFIG] <dest>
```

### Arguments
Expand Down Expand Up @@ -55,4 +55,4 @@ process to catch special cases.

## Reporting Bugs
If you run into issues, please open a ticket and attach the composer.json you were trying to process with a clear
description of the problem.
description of the problem.