diff --git a/README.md b/README.md index 97f46c9..183ff3f 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,10 @@ Which is the same as... Which builds the passed in components (and their dependancies) using your registered packages. + ./packager build +components Core/Type Core/Fx ART/ART.Element -components Core/Core + +This will build a library that has the same dependencies as the previous example but exclude the `Core/Core` component. + ./packager build +files Core/Core Core/Fx ART/ART This builds the passed in files (and their dependancies) using your registered packages. diff --git a/packager b/packager index 61e8274..75b572a 100755 --- a/packager +++ b/packager @@ -87,6 +87,7 @@ switch ($command){ 'files' => array(), 'add-packages' => array(), 'remove-packages' => array(), + 'remove-components' => array(), 'blocks' => array(), 'use-only' => null ); @@ -120,7 +121,11 @@ switch ($command){ $build = 'components'; continue; } - + if ($arg == '-components'){ + $build = 'remove-components'; + continue; + } + if ($arg == '+files'){ $build = 'files'; continue; @@ -176,7 +181,12 @@ switch ($command){ } $files = $pkg->complete_files($files); - + + foreach ($selected['remove-components'] as $component){ + $file = $pkg->component_to_file($component); + array_erase($files, $file); + } + Packager::warn("Build using: " . implode(', ', $pkg->get_packages()) . "\n"); Packager::warn("Included Files/Components:\n");