vs-component-app icon indicating copy to clipboard operation
vs-component-app copied to clipboard

Correct config for vscode user prefrences

Open footballdaddy opened this issue 8 years ago • 11 comments

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

footballdaddy avatar Jul 16 '17 08:07 footballdaddy

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.

CVarisco avatar Jul 16 '17 10:07 CVarisco

@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

CVarisco avatar Jul 16 '17 12:07 CVarisco

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

footballdaddy avatar Jul 16 '17 17:07 footballdaddy

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
    }
}

CVarisco avatar Jul 16 '17 18:07 CVarisco

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?

footballdaddy avatar Jul 16 '17 18:07 footballdaddy

Could you try without configuration? There is default configuration.

ps: The warning is ok. With the warning it works fine to me.

CVarisco avatar Jul 16 '17 19:07 CVarisco

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 avatar Jul 16 '17 20:07 footballdaddy

@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: screen shot 2017-07-17 at 09 41 36

CVarisco avatar Jul 17 '17 07:07 CVarisco

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

image

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?

kedmenec avatar Jul 17 '17 23:07 kedmenec

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 👍

CVarisco avatar Jul 18 '17 11:07 CVarisco

Hi guys!

I published a new version with the fix for windows! Could you tell me if it works ? Thanks a lot @kedmenec!

CVarisco avatar Jul 18 '17 20:07 CVarisco