Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
h-wang committed Apr 12, 2018
0 parents commit b1ee436
Show file tree
Hide file tree
Showing 20 changed files with 1,082 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2014 LinkORB B.V.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
CodeSpace
======

Manages your local development projects and code repositories.

When developing projects, especially micro-services, we often end up with hundres of code repositories on our dev machines. CodeSpace helps to manage these repositories and do batch operations on them easily.
You can use it as a stand-alone tool. There is no need to integrate into any project.

CodeSpace is inspired by the [LinkORB Projex](https://github.com/linkorb/projex)
## Features

### Project scanner

Recursively scans the giving directory to find projects/repositories.
Scan the code repositories and show output to the console `bin/codespace scan [--path=~/git]`

### Export projects
1. Export to HTML `bin/codespace export:html /path/to/the/target.html [--path=~/git]`
2. Export to CSV `bin/codespace export:csv /path/to/the/target.csv [--path=~/git]`

### Do git fetch on all projects
When the `--pull` option is used, the `git pull` command is executed instead of the `git fetch` command.
```
bin/codespace git fetch [--path=~/git] [--pull]
```

### Auto-update your favorite IDE's project manager
Scan the repositories and make them available to your IDE's project manager plugins. Now __Atom__ and __VSCode__ are supported.
The project managers are:

https://atom.io/packages/project-manager
https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager

Commands:
Without specifying the `--ide=` option, both __Atom__ and __VSCode__ are updated.
```
bin/codespace ide:pm [--ide=atom] [--path=~/git]
```

## Installation:
Use the source code:
```
composer install
```
Use the phar:
```
php code-space.phar
```

## Use
Base command:
```
`bin/codespace`
# or
php code-space.phar
```
You can view all available commands by running the base command.


## License

Please refer to the included LICENSE.md file
29 changes: 29 additions & 0 deletions bin/codespace
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env php
<?php

$filename = __DIR__.'/../vendor/autoload.php';
if (!file_exists($filename)) {
$filename = __DIR__.'/../../../autoload.php';
}

if (!file_exists($filename)) {
die(
'You must set up the project dependencies, run the following commands:'.PHP_EOL .
'curl -s http://getcomposer.org/installer | php'.PHP_EOL .
'php composer.phar install'.PHP_EOL
);
}

$loader = require $filename;

use Symfony\Component\Console\Application;

$application = new Application('CodeSpace', '1.0.0');
$application->setCatchExceptions(true);
$application->add(new \Wispiring\CodeSpace\Command\ScanCommand());
$application->add(new \Wispiring\CodeSpace\Command\GitFetchCommand());
$application->add(new \Wispiring\CodeSpace\Command\AtomUpdateCommand());
$application->add(new \Wispiring\CodeSpace\Command\IdeProjectManagerUpdateCommand());
$application->add(new \Wispiring\CodeSpace\Command\ExportCommand());
$application->add(new \Wispiring\CodeSpace\Command\HtmlExportCommand());
$application->run();
Binary file added code-space.phar
Binary file not shown.
24 changes: 24 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "h-wang/code-space",
"description": "Managing your code - projects and repositories",
"homepage": "https://github.com/h-wang/code-space",
"keywords": ["project", "git", "project", "manager", "management", "code", "repository", "space", "hongliang", "wispiring"],
"type": "application",
"authors": [
{
"name": "Hongliang",
"email": "[email protected]",
"role": "Development"
}
],
"bin": ["bin/codespace"],
"require": {
"symfony/console": "~3.2"
},
"autoload": {
"psr-4": {
"Wispiring\\CodeSpace\\": "src/"
}
},
"license": "MIT"
}
249 changes: 249 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b1ee436

Please sign in to comment.