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

Closes #7 Add support for Elixir Phoenix #8

Merged
merged 4 commits into from
Mar 11, 2018

Conversation

fapdash
Copy link
Contributor

@fapdash fapdash commented Mar 11, 2018

@bkeepers All the commands are working except for strappy server.
Phoenix projects have a package.json file in the top directory and so the npm_server command is triggered.

$ ls
brunch-config.js  deps     mix.lock      package-lock.json  test
_build            lib      node_modules  priv               web
config            mix.exs  package.json  README.md

Would it be possible to make the npm_server check more specific?

@bkeepers
Copy link
Owner

Would it be possible to make the npm_server check more specific?

Definitely. Any suggestions on what the heuristics should be for detecting npm vs phoenix?

@fapdash fapdash force-pushed the add-elixir-phoenix branch 2 times, most recently from 996f5f2 to 997dfae Compare March 11, 2018 15:27
@fapdash
Copy link
Contributor Author

fapdash commented Mar 11, 2018

Definitely. Any suggestions on what the heuristics should be for detecting npm vs phoenix?

By default Phoenix doesn't define a npm start script so checking for that should be enough. I've added a check to the change.

plugins/3-npm.sh Outdated
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

test -f package.json || return 1
NPM_START_SCRIPT=$(grep "\"start\":" package.json)
Copy link
Owner

Choose a reason for hiding this comment

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

What if I have a package.json for node that doesn't have a start script? This is pretty common in npm modules.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe have the more specific check only for the server command?

@bkeepers bkeepers merged commit 93fe1d5 into bkeepers:master Mar 11, 2018
@bkeepers
Copy link
Owner

Thanks @fapdash. I pushed a few fixes after testing it locally, but everything looks good now.

@fapdash fapdash deleted the add-elixir-phoenix branch March 12, 2018 01:44
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.

2 participants