GithubHelp home page GithubHelp logo

Comments (8)

johnbillion avatar johnbillion commented on May 26, 2024

Thanks Chris, do you think I should remove this line altogether?

Previously: #6. /cc @spacedmonkey

from extended-cpts.

ctalkington avatar ctalkington commented on May 26, 2024

i guess i see that this library can also be loaded as a plugin based on the headers its carrying. thats kind of confusing seeing as its not published to the repo or such currently.

EDIT: it also seems like more of a developer library which it even calls itself in multiple places.

from extended-cpts.

johnbillion avatar johnbillion commented on May 26, 2024

Yeah it has the plugin header mostly for ease of use. It's primarily intended as a library that should be included as a dependency in a project, but it can also be activated as a plugin.

I guess I could make a breaking change and remove the plugin header and the wordpress-plugin type from composer.json.

from extended-cpts.

ctalkington avatar ctalkington commented on May 26, 2024

thought as much, to me it seems best to adjust for the primary intended users (ie library) unless it will drastically hurt your ability to test and enhance this otherwise great library.

from extended-cpts.

jjeaton avatar jjeaton commented on May 26, 2024

FWIW, I ran into this earlier as I am using this as a library within an existing plugin and was able to solve it by doing this:

"require": {
    "johnbillion/extended-cpts": "2.4.*"
},
"extra": {
    "installer-paths": {
        "vendor/{$name}": ["johnbillion/extended-cpts"]
    }
}

Since I'm using this as a dependency for a plugin This places the library in my-plugin-dir/vendor/extended-cpts, although you can change vendor/{$name} to be wherever you want.

I found this here: https://getcomposer.org/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md

This should give you the flexibility you need to put it wherever you need in your project.

Aside: Something that would be really nice is a way to say "only give the plugin files" without the tests and everything else, for when you're deploying. I instead have all the extra files deleted in a build step prior to deployment. Hope this helps.

from extended-cpts.

ctalkington avatar ctalkington commented on May 26, 2024

@jjeaton thanks for the tip. i knew there was some way to override but had last track of that page.

definitely remedies the issue in the short term.

EDIT: also you can do vendor/{$vendor}/{$name} which mimics the usual generated paths.

from extended-cpts.

johnbillion avatar johnbillion commented on May 26, 2024

Version 3.0.0 of Extended CPTs no longer has a plugin header or a type entry in composer.json.

from extended-cpts.

aaemnnosttv avatar aaemnnosttv commented on May 26, 2024

@johnbillion by removing the type header, it also breaks the ability to override the install path.

Note: You cannot use this to change the path of any package. This is only applicable to packages that require composer/installers and use a custom type that it handles.

source

from extended-cpts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.