nek4life / sfcc-studio

Salesforce Commerce Cloud (SFCC) Studio Plugin for Jetbrains IDEs
MIT License
33 stars 7 forks source link

create a wiki #5

Closed z1haze closed 5 years ago

z1haze commented 5 years ago

Could you create a wiki for this plugin? You've put a lot of effort into creating this plugin, but the features are not really documented and will probably not be noticed/used. For example I cant even figure out how to sync the cartridges. I see this commerce cloud tab added to webstorm, but I don't see anywhere to enter my credentials or setup a sever connection.

Thanks for the updated plugin, good work!

AVATOR commented 5 years ago

I have created PR https://github.com/nek4life/sfcc-studio/pull/3

z1haze commented 5 years ago

nice work!

z1haze commented 5 years ago

@AVATOR

did you figure out the following?

Sandbox filesystem sync
Sandbox filesystem clean
Remote sync console log with links to synced files
nek4life commented 5 years ago

Hey @z1haze I was going to update the readme file with information on how to use the plugin. It's on my list. I'll also look into Wiki feature. I've never used it before on Github.

Please see issue #1 for an explanation of how to setup the cartridges to sync. It's in the project preferences. Search for commerce and they should show up. You need to enter your server information and mark all the cartridge roots you'd like to sync.

z1haze commented 5 years ago

Yeah, I actually found that useful to an extent. I added my sandbox credentials , and then i added all of the cartridges t othe cartrirdges section, but then it seems that nothing really happens. The commerce cloud log is blank. I was looking for an 'upload cartridges' link but did not find. I did find the clean cartridges button, and ran that, but not sure what it did.

nek4life commented 5 years ago

Could you try restarting the IDE after adding your settings? I've noticed my sync stops sometimes and I'm not entirely sure why as there is no error. I've found restarting fixes it, but something I definitely need to dig into a bit more.

nek4life commented 5 years ago

The cartridge root should look something like...

repo/cartridges/app_my_cartridge and after adding it you should see the full filesystem path.

Also make sure auto upload is checked.

z1haze commented 5 years ago

@nek4life I am seeing files in the commerce cloud log now when I make changes. I havent yet been able to figure out how to get it to recognize webpack's compiled changed files though. I'm not sure really why the watcher built into your plugin wouldnt notice the changed files in static/js but it doesn't appear to be working. Any thoughts?

nek4life commented 5 years ago

There are no file exclusions at all so they should be uploading. What does your directory structure look like? We use gulp and webpack and all my files are picked up fine.

The file uploads are lazy so you do need to have the IDE window active in order for the changes to be picked up. I'm not aware of anyway to change the behavior of the bulk file listener in order to have it listen to files no matter what.

If you clone this repo and open a new project in intellij ultimate or community you can run the gradle runIde lifecycle method with the debugger and then it will spawn a new IDE with the debugger attached. Then you can recreate your project and see what exactly is happening when those files change.

The bulk file listener can be found here.

https://github.com/nek4life/sfcc-studio/blob/master/src/main/java/com/binarysushi/studio/webdav/StudioBulkFileListener.java

z1haze commented 5 years ago

My file structure is just as follows: app_core/cartridge/js/some-file.js would be the input app_core/cartridge/static/js/some-file.js would be the output result

It appears to me watching and uploading changes to the input, but the output isnt getting picked up. I don't know if maybe I have an issue on my end but we currently have our own watcher and it works. I'll keep toying with it

z1haze commented 5 years ago

So I have something to report back now.. I at least have some more info on what's happening. If my webpack water executes and builds the code, etc.. nothing gets picked up by the commerce cloud tab in webstorm except the input file change.. BUT.. if i click out of the webstorm app, and then back into webstorm, the background processes to upload files kicks off.. very strange and not ideal.

nek4life commented 5 years ago

I guess I never paid too much attention to this because our gulp build uploads are built files so it's never really had an impact on me. I'm using the BulkFileListener to listen for virtual file changes. You can read more about the virtual file system here.

http://www.jetbrains.org/intellij/sdk/docs/basics/virtual_file_system.html

There may be a setting in order to have it update without switching away, but I'm not away of any at the moment. I have a feeling the virtual file system works this way for performance reasons, but I'll ask on the plugin forum to see if there is anything I can do.

nek4life commented 5 years ago

I created a wiki. It's empty, but I'll work on adding some content when I have some time. I'm going to close this ticket. The other file syncing issue with external processes should probably go into a new ticket.