vs-component-app
vs-component-app copied to clipboard
Correct config for vscode user prefrences
So this is my entire user settings (verbatim) but can't get this plugin to work.
{ { "ccarc": { "type": "stateless", "jsExtension": "js", "cssExtension": "css", "includeTests": false, "includeStories": false, "indexFile": false, "connected": false, } } }
Any help with the correct config. Because the dialog doesn't pop as it does in the gif
Hi @footballdaddy ! The configuration that you are using is ok. I noticed that the published version of the extension doesn't work. I'm investigating why doesn't work, because in debugger mode it works very well. Do you have any idea ?
Thanks a lot for your feedback.
@footballdaddy I updated the version to v0.0.12 The problem is with npm and npm dependencies. I don't know why but when vscode installed the extension he don't install all dependencies. I added the missing dependencies manually on package and updated npm to v5.3 This version should work.
Uninstall and install again please. Could you tell me if it works ? Thanks
I reinstalled it multiple times. Now dialog box does show but it will not create the files. Just seems like it does nothing. Just to show I get some weird error in my settings tag saying expected comma or closing brace. Don't know if that meant it is the wrong configuration. https://image.prntscr.com/image/0KeDuMIpT4WmdkEMzC82dg.png
Thanks to your answer! Now the problem is that the configuration is malformatted.
Could you try this ?
{
"ccarc": {
"type": "stateless",
"jsExtension": "js",
"cssExtension": "css",
"includeTests": false,
"includeStories": false,
"indexFile": false,
"connected": false
}
}
Yeah, I tried that config before too. I got "unknown configuration setting" for ccarc https://image.prntscr.com/image/lbEwjfO_R1mRdl7_DzlGUw.png
Might this be a problem for running it on windows?
Could you try without configuration? There is default configuration.
ps: The warning is ok. With the warning it works fine to me.
Tried it without any configuration on the user settings but it won't create the component. I have tried using the npm version of this extensions and it works but I was hoping to get it working on vscode.
@footballdaddy I need your help to understand what happens. Could you take a screenshot of the developer tools (chrome devTools) of vscode while you are using the extension? I need more information to know what happens.
I don't know how you can open the window, on "Mac Help> Toggle Developer Tools."
Looks like this:

@CVarisco it looks like it might be a windows issue?

In extension.js I changed
function createComponent(e) { const path = e.toJSON().path;
to
function createComponent(e) { const path = e.toJSON().fsPath;
and it works. @CVarisco, if you do that, does it still work on mac?
Hi, @kedmenec ! Thank you for your help.
I tried your edit and on Mac it works 🌮 ! Would you like open a PR with this fix ? Or in this evening I can do it 👍
Hi guys!
I published a new version with the fix for windows! Could you tell me if it works ? Thanks a lot @kedmenec!