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 add plugins #34

Merged
merged 18 commits into from
Jan 10, 2021
Merged

Feature add plugins #34

merged 18 commits into from
Jan 10, 2021

Conversation

sebkolind
Copy link
Contributor

This will allow users to specify a list of plugins to add before running prettier on their files. I have used this on Volcano more specifically here

Closes #22

@sebkolind
Copy link
Contributor Author

sebkolind commented Jan 10, 2021

I do realize that this is a very simple and somewhat naive way of doing this, since you could potentially install anything you want. So a check on the packages with regex, checking a pattern like @prettier/x-y-z might be a good idea.

Update

I added a check of the plugins' names with regex.

@creyD
Copy link
Owner

creyD commented Jan 10, 2021

Looks extremely good! Thanks so much for your contribution! I will test this myself and then merge it.

@creyD creyD changed the base branch from master to dev January 10, 2021 20:07
@creyD creyD merged commit ad03b42 into creyD:dev Jan 10, 2021
@sebkolind sebkolind deleted the feature-add-plugins branch January 10, 2021 20:24
@sebkolind
Copy link
Contributor Author

@creyD Thank you! And you are welcome.

Out of curiosity - how do you test Actions locally? I've been having a workflow where I make a change, push to a branch, release a new version, and then test it in a separate project. This is extremely cumbersome😂 I can only imagine there is a better way of doing this?

@creyD
Copy link
Owner

creyD commented Jan 10, 2021

I am not an expert at this, but here is my process: I test the commands locally (without the yml parameters ...) and then I create a test GitHub repo where I write uses: creyD/prettier_action@dev in the config. This does at least avoids the release cycle.

@creyD
Copy link
Owner

creyD commented Jan 10, 2021

Your new release I tested in this: https://github.com/creyD/prettier_test , will delete this later.

@sebkolind
Copy link
Contributor Author

Ahh I see. I was looking for a way of doing something like: uses: ../action/on/machine and use the action from a local directory or something like this. But I don't think that is possible, unfortunately.

Well, anyways, thanks!

infotexture added a commit to dita-ot/docs that referenced this pull request Feb 27, 2021
No need for the infotexture fork now that the upstream action repo has added support for Prettier plugins:

- creyD/prettier_action#22
- creyD/prettier_action#34
- creyD/prettier_action#36

Signed-off-by: Roger Sheen <roger@infotexture.net>
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

Successfully merging this pull request may close these issues.

[FEATURE] Option to install Prettier plugins
2 participants