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

As a user I would to be able to run a custom script before the server starts #14

Open
thescientist13 opened this issue Sep 9, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Sep 9, 2018

This would allow any user to add additional babel presets like for react at the time CMD is run. possibly as an npm script (like in #3 ), or chained as part of babel-node? (but what about presets?).

So given a default

CMD ["babel-node", "--presets=@babel/preset-env", "server.js"]

Expose an npm script could be run by the user, following that pattern? e.g.

CMD ["ssr:hook:start"]

and in package.json

# must include @babel/preset-env
"scripts": {
  "patch": "npm install @babel/preset-react",
  "ssr:hook:start": "npm run patch && babel-node --presets=@babel/preset-react,@babel/preset-env server.js",
}
@thescientist13 thescientist13 added this to the MVP milestone Sep 9, 2018
@thescientist13 thescientist13 self-assigned this Sep 9, 2018
@thescientist13 thescientist13 added enhancement New feature or request documentation labels Sep 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant