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

feature: load plugins relative to the current working directory #74

Closed
wants to merge 4 commits into from
Closed

Conversation

markmartirosian
Copy link

@markmartirosian markmartirosian commented Jan 20, 2018

Proposed changes

In the spirit zero configuration (#0CJS) trend postcss-load-plugins should be able to require plugins relative to the ctx.cwd.

Closes #42

  • There are few lint issues unrelated to the code I submitted, those I have not touched.

Types of changes

  • Bug (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • [Breaking Change (fix or feature which changes existing functionality)

Checklist

  • I have read the CONTRIBUTING guide
  • Lint and unit tests pass with my changes
  • I have added tests that prove my fix is effective/works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes are merged and published in downstream modules

Reviewers: @michael-ciniawsky, ...

@coveralls
Copy link

coveralls commented Jan 20, 2018

Coverage Status

Coverage decreased (-3.7%) to 96.296% when pulling 6ab39ae on l5x:master into 38de8a5 on michael-ciniawsky:master.

@coveralls
Copy link

coveralls commented Jan 20, 2018

Coverage Status

Coverage decreased (-3.7%) to 96.296% when pulling 6ab39ae on l5x:master into 38de8a5 on michael-ciniawsky:master.

@coveralls
Copy link

coveralls commented Jan 20, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 753acb9 on l5x:master into 38de8a5 on michael-ciniawsky:master.

@coveralls
Copy link

coveralls commented Jan 20, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 6e47409 on l5x:master into 38de8a5 on michael-ciniawsky:master.

@coveralls
Copy link

coveralls commented Jan 20, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 483e2b5 on l5x:master into 38de8a5 on michael-ciniawsky:master.

@coveralls
Copy link

coveralls commented Jan 20, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 1c9f667 on l5x:master into 11f7173 on michael-ciniawsky:master.

@egoist
Copy link

egoist commented Jan 25, 2018

/cc @michael-ciniawsky can't wait to have this 😄

try {
return require(resolveFrom(cwd, plugin))
} catch (_err) {}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems to me flatry will be appropriate here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't want to add an extra dependency ;-)

@@ -2,19 +2,22 @@
"name": "postcss-load-plugins",
"version": "2.3.0",
"description": "Autoload Plugins for PostCSS",
"engines": { "node": ">=0.12" },
"engines": {
"node": ">=0.12"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be raised to 4+

@markmartirosian
Copy link
Author

@gitscrum @michael-ciniawsky let's get this merged?

@Scrum
Copy link
Collaborator

Scrum commented Feb 16, 2018

@michael-ciniawsky I need access from npm to publish this

@Scrum
Copy link
Collaborator

Scrum commented Feb 21, 2018

@michael-ciniawsky ping

1 similar comment
@Scrum
Copy link
Collaborator

Scrum commented Mar 4, 2018

@michael-ciniawsky ping

@markmartirosian
Copy link
Author

@Scrum @michael-ciniawsky ping

@Scrum
Copy link
Collaborator

Scrum commented Apr 15, 2018

@l5x sorry, I still do not have access.

@michael-ciniawsky
Copy link
Owner

michael-ciniawsky commented Jul 13, 2018

@l5x This is supported in postcss-load-config >= v2.0.0 via 9745bf0 now. Since I'm going to archive this repo here soon I'm closing this PR. Thx

@michael-ciniawsky michael-ciniawsky changed the title feauture: try relative require if all else fails feature: load plugins relative to the current working directory Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load plugins in cwd
5 participants