-
Notifications
You must be signed in to change notification settings - Fork 82
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
Support for babel-plugins #12
Comments
I will look at adding this. In the meantime use a babelrc file. |
I have a babelrc file that has plugins mentioned in it and whenever I save, I get a transpile error saying unknown plugin. https://github.com/rackt/react-router This is the repository I am working on. |
What is the plugin you are using? |
OK I see what babel-core is doing. You have to install a local copy of |
Plugins may be a problem as the Atom environment is a self contained nodejs app. If plugins are required they must be installed within the atom exe path as a local package or atom must know of it via a sym link. Using links something like this - https://atom.io/docs/v0.211.0/behind-atom-developing-node-modules So I'm closing this as it works if using .babelrc files and local packages. |
The Regardless, I think this is a great package. Thanks a lot !! Can't express how much I love this package. Do you have any plans to add snippets for the common html tags?? I didn't configure transpile output to folder. So I always get a notification No transpile output configured. It just doesn't go until the timeout. Can you add an option to supress it ?? If I send PR will you merge it ?? |
Nothing I can do about how babel-core handles plugin dependencies in regard to .babelrc files. Babel-core itself reads the plugin name and attempts to resolve it. I'm not even aware of what is in the babelrc files. The only way I could do something is if I provide another config array in the settings and then use a kludge like linter which would work. My inclination is not to bother as most people would prefer to use .babelrc. However it's very quick to just add the plugin to the atom path and this works fine. Haven't thought about snippets. I find they tend to be quite personal and are easy to create. I can add a line that checks the existing supress on save messages option to disable the 'no output configured' message if that helps? |
By all means please do. It blocks me from changing the tabs all the time. |
Whenver I type |
If you find |
language-babel 0.8.1 just published that suppresses 'no output configured' messages. The html tags are specific to React and not babel ( babel just happens to support react ). If React is key then it may be better waiting for the Facebook Nuclide project - I'm guessing most people will use Nuclide. http://nuclide.io/ when it ships. As I said. the babel-core code resolves plugins not my code. Babel-core reads the babelrc files and uses the options. My code has no part in this and as I don't read the files I can't know what plugins are even being used. If you're interested the two babel files involved in this are:- https://github.com/babel/babel/blob/master/src/babel/util.js and |
P.S. Yes I could do what linter does and spawn npm to find out where node is but as I said it's a bit of a kludge. Not something I really want to do. |
@gandm Anyway Thanks a lot!! |
I think I'm experiencing this same issue |
@HeyHugo I am also using "react-transfrom" plugin. It works perfectly fine for me. May it is a problem with environment variables. I am on Ubuntu 14.04. What is your system?? Have you tried opening atom from your terminal? |
I am using the same setup in my own app. It works properly fine for me. If change the plugin-name to somthing else, language-babel complains to me that plugin is not found. So, it is checking my local packages as far as I know. |
@HeyHugo It works for me. I use Windows so don't know about OS X. On windows babel-core searches in the following node-modules directories for plugins.
I cd to C:\Users\username\AppData\Local\atom and then did a I then added the following to my .babelrc
Worlked for me. |
@gandm Thanks for taking time troubleshooting with me =) I think the corresponding path on OS X is I'll try and see if I have the same problem on my windows PC later. |
Maybe try it in a less specific folder - the apm folder seems wrong to me. Try going to /Applications/Atom.app and doing the npm install there. |
Tried multiple parent folders too now with same result. The reason I tried the apm folder was that it already had a package.json + node_modules folder I figured that could work. Trying this on windows machine soon. |
If you can't solve it I can tell you how to use chrome inspector to debug Babel-core to find out where it is looking. Let me know. |
On windows - no problems. Yeah I'm having a look at the chrome inspector now. found that some files seems to be loaded from: So I've tried installing babel-plugin-react-transform there and down the tree on some places without success. |
Before going through inspector to see what Babel-core is actually using you might want to just console.log(process.cwd()); that is normally where Babel looks. This may not always be the case, and if not I will put together some screenshots to explain where to debug it. |
@HeyHugo I use node through nvm. So, it shouldn't have any effect. |
I installed the plugin to the very root now (creating "/node_modules") and that solves the problem. It doesn't feel so good having a node_modules there but hey it works =) Anyways, thanks for all the help, language-babel is a great package. |
No description provided.
The text was updated successfully, but these errors were encountered: