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

Show how to use npm-asset with composer #107

Open
cherifGsoul opened this issue Apr 17, 2016 · 6 comments
Open

Show how to use npm-asset with composer #107

cherifGsoul opened this issue Apr 17, 2016 · 6 comments

Comments

@cherifGsoul
Copy link

for Asset processing with Grunt I think is better to show how to use npm-asset or bower-asset of fxp/composer-asset-plugin to to encourage users to use yii2 workflow

@samdark
Copy link
Owner

samdark commented Apr 17, 2016

Probably but usage of bower/npm packages via fxp is in the official guide already...

@cherifGsoul
Copy link
Author

Oh I missed that in the guide 👍

@cherifGsoul
Copy link
Author

Seems that the fxp/composer-asset-plugin dosent handle dependencies automaticaly this issue might be useless

@samdark
Copy link
Owner

samdark commented Apr 18, 2016

What do you mean by doesn't handle dependencies? It does.

@cherifGsoul
Copy link
Author

I will check it again, because composer require npm-asset/gulp throws errors:

Problem 1
    - Conclusion: don't install npm-asset/gulp 3.9.1
    - Installation request for npm-asset/gulp ^3.9 -> satisfiable by npm-asset/gulp[3.9.0, 3.9.1].
    - npm-asset/gulp 3.9.0 requires npm-asset/vinyl-fs >=0.3.0,<0.4.0 -> satisfiable by npm-asset/vinyl-fs[0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.3.13, 0.3.14].
    - npm-asset/vinyl-fs 0.3.0 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.1 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.2 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.3 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.4 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.5 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.6 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.7 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.8 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.9 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.10 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.11 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.12 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.13 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/vinyl-fs 0.3.14 requires npm-asset/mkdirp >=0.5.0,<0.6.0 -> satisfiable by npm-asset/mkdirp[0.5.0, 0.5.1].
    - npm-asset/mkdirp 0.5.0 requires npm-asset/minimist 0.0.8 -> satisfiable by npm-asset/minimist[0.0.8].
    - npm-asset/mkdirp 0.5.1 requires npm-asset/minimist 0.0.8 -> satisfiable by npm-asset/minimist[0.0.8].
    - Conclusion: don't install npm-asset/minimist 0.0.8

@schmunk42
Copy link

@cherifGsoul This issue can not be solved with fxp & composer, without tweaking your config, see fxpio/composer-asset-plugin#307 (comment) for details.

The underlying issue is that npm can handle multiple versions, but composer can't. You can work around this limitation, but it's going to be hard when you have a lot of assets in your app.

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

3 participants