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

Exclude unnecessary files from composer package #9

Closed
KEINOS opened this issue Sep 17, 2019 · 2 comments
Closed

Exclude unnecessary files from composer package #9

KEINOS opened this issue Sep 17, 2019 · 2 comments

Comments

@KEINOS
Copy link
Owner

KEINOS commented Sep 17, 2019

As simple as possible, the downloaded package should be

When composer require keinos/parsedown-toc, composer brings the tests and samples files down to the user's local.

I want user local dir to be as minimum as possible. Only the necessary files.

$ tree -a
.
├── SAMPLE.md
├── composer.json
├── composer.lock
├── main.php
└── vendor
    ├── autoload.php
    ├── composer
    │   ├── ClassLoader.php
    │   ├── LICENSE
    │   ├── autoload_classmap.php
    │   ├── autoload_files.php
    │   ├── autoload_namespaces.php
    │   ├── autoload_psr4.php
    │   ├── autoload_real.php
    │   ├── autoload_static.php
    │   └── installed.json
    ├── erusev
    │   └── parsedown
    │       ├── LICENSE.txt
    │       ├── Parsedown.php
    │       ├── README.md
    │       └── composer.json
    └── keinos
        └── parsedown-toc
            ├── .gitignore
            ├── .travis.yml <-------------- May not be needed
            ├── Extension.php
            ├── LICENSE
            ├── README.md
            ├── composer.json
            ├── samples <------------------ Not necessary
            │   ├── composer
            │   │   ├── README.md
            │   │   ├── composer.json
            │   │   └── main.php
            │   └── download
            │       ├── Extension-1.0.0.php
            │       ├── Parsedown-1.7.3.php
            │       └── main.php
            └── tests <-------------------- Not necessary
                ├── parser.php
                ├── run-tests.sh
                ├── test_1.sh
                └── test_2.sh

10 directories, 34 files
@KEINOS
Copy link
Owner Author

KEINOS commented Sep 17, 2019

This info might help.

@KEINOS KEINOS closed this as completed in 3591be2 Sep 21, 2019
KEINOS added a commit that referenced this issue Sep 21, 2019
@KEINOS
Copy link
Owner Author

KEINOS commented Sep 21, 2019

Now Smaller Package File

As of v1.0.1, the package keinos/parsedown-toc will no longer include unnecessary files.

Only the minimum files will be downloaded.

$ mkdir sample_project && cd $_
$ composer require --no-cache keinos/parsedown-toc
Using version ^1.0 for keinos/parsedown-toc
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing erusev/parsedown (1.7.3): Downloading (100%)         
  - Installing keinos/parsedown-toc (1.0.1): Downloading (100%)         
Writing lock file
Generating autoload files
$ tree
.
├── composer.json
├── composer.lock
└── vendor
    ├── autoload.php
    ├── composer
    │   ├── ClassLoader.php
    │   ├── LICENSE
    │   ├── autoload_classmap.php
    │   ├── autoload_files.php
    │   ├── autoload_namespaces.php
    │   ├── autoload_psr4.php
    │   ├── autoload_real.php
    │   ├── autoload_static.php
    │   └── installed.json
    ├── erusev
    │   └── parsedown
    │       ├── LICENSE.txt
    │       ├── Parsedown.php
    │       ├── README.md
    │       └── composer.json
    └── keinos
        └── parsedown-toc
            ├── Extension.php
            ├── LICENSE
            ├── README.md
            └── composer.json

6 directories, 20 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant