-
Notifications
You must be signed in to change notification settings - Fork 3
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
"npm run build" overwrites source code #16
Comments
Why don't you want to deploy the transpiled code? |
We can certainly make do with that, it just seems unnecessarily dangerous to default to overwriting source code in-place. If it doesn't bother anyone else to do it this way then we can just add a step in our deployment process to do the transpilation, I just found it unexpected. |
Gotcha. There's an assumption that the code being transpiled has just been freshly cloned and doesn't contain any "works in progress". |
Fair enough. I'm fine with leaving it as-is then, although I think it would definitely be helpful to have some additional documentation on the Production-style build process so that everyone's aware of those assumptions. Right now only running via "npm start" is covered, so just letting everyone know that they should do something else for real deployments would be a big help. |
I find this confusing as well. When I check github status it tells me I have modified the code. I can easily see a dev committing the transpiled code into github my mistake. Is there a way to let the transpiled code get create in a different folder that can be added to gitignore ? +1 on better documentation for both dev and prod modes also ! |
Still no production build and deploy instructions in 1603. Should I open a support ticket on this instead ? |
@gouldner & @rojlarge - The next release will have a new npm run build option for build_babel_to which takes a parameter for target output directory. It's very similar to what Jeff has in his first comment. The release will also have more documentation around the different run options and guidance on which to use for development versus prod. |
Thanks Terry! I'll keep an eye out for that in the 1604 release-- that sounds like what I was looking for. |
In looking at prepping the COI code for a Production-like environment, it doesn't look like there's a great way to package the server-side javascript code up for deployment without using babel-node. The current build script in package.json overwrites the source code with the transpiled output from Babel, which is pretty inconvenient.
Could the build script be changed to output to a build/ or dist/ folder to avoid this? Something like:
"babel . --ignore "./client/,./node_modules,./loadtest,./webpack.config.js,./test" -d build"
instead of
"babel . --ignore "./client/,./node_modules,./loadtest,./webpack.config.js,./test" -d ."
The text was updated successfully, but these errors were encountered: