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

Install via composer? #10

Open
sashabeep opened this issue Jan 17, 2022 · 2 comments
Open

Install via composer? #10

sashabeep opened this issue Jan 17, 2022 · 2 comments

Comments

@sashabeep
Copy link

Not a bug report.
I want to require this repo in my composer.json file, but i'm getting an errors:

No valid composer.json was found in any branch or tag of https://github.com/crissdev/bootstrap-scss.git, could not load a package from it.

or

Root composer.json requires crissdev/bootstrap-scss, it could not be found in any version, there may be a typo in the package name.

How to properly require this package?

@crissdev
Copy link
Owner

crissdev commented Jan 19, 2022

@sashabeep Looking around it seems that one approach is to spawn an npm install process that will get all your npm dependencies installed. Check this out: https://stackoverflow.com/a/25558291/2117516

I went with something short as:

// composer.json
{
  "scripts": {
      "post-install-cmd": [
          "php installer.php"
    ]
  }
}
// package.json
{
  "dependencies": {
      "bootstrap-scss": "^5.1.3"
   }
}

and ran composer install.

@sashabeep
Copy link
Author

sashabeep commented Jan 19, 2022

@crissdev i've added
git clone https://github.com/crissdev/bootstrap-scss.git .
to post-update-cmd, it works too, but still looks strange

I don't have any npm dependencies in my project, just static html/php files
and, for example, composer require eftec/bladeone works as intended in my case

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

2 participants