-
Notifications
You must be signed in to change notification settings - Fork 25
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
Recommended process to deploy unpacked Static Resource contents #48
Comments
Hello @chexxor, Are you having problems working with unpacked zipped content and deploying it with all Current version of Does this make sense? |
My understanding agrees with your explanation, which is good. My issue with this is that I only want to deploy one static resource, rather than everything in my project. AIUI, I checked the docs for the |
both The only difference between the two is that If you are using vim plugin for a day-to-day development (in Sandbox or Dev Org) then I would expect you to use
Does this help? Or your workflow mandates you to save a single file at a time for some reason? |
Ah, that's interesting. I'll double-check the docs and perhaps propose a change to clarify. I'd like to organize and summarize the commands in the README file - what do you think? Would you prefer that be done in the vim doc file instead? Due to how it's presented on the project's site, the README is the first place I look to get an overview of how to use it. Then, to get detailed info, I would look in the vim doc. |
Any help with the documentation is always very welcome. I think current version of README is too long and may benefit from some reduction/re-wording. Actual documentation should be in vim doc file as for all other vim plugins. |
I've been busy with personal stuff for the last few weeks. I still intend to spend time on this. |
@neowit - What do you think about putting the "resources_unpacked" directory name behind a variable, perhaps named "g:apex_resources_unpacked_dir_name"? We can use the "resources_unpacked" string as a default value if it isn't defined. If like this, I can use vim-force.com to edit my MavensMate projects, which use "resource-bundles" as that directory's name. |
Hello @chexxor With regards to the use case you mentioned - I do not know how MavensMate tracks changed files, but if you edit and deploy same project from two different tools then you most certainly will get all sorts of weird conflicts. |
At work, we're using MavensMate, which is not too uncommon, I believe. Occasionally, I want to open up that project in Vim and make edits, because MM has problems sometimes, or I just want to practice Vim. MM unpacks the resource bundles into a "resource-bundles" directory. It's the same as vim-force.com does, but the directory name is different. If vim-force.com can't be configured to use that directory, then I can't work on my employer's JS projects with it. :-/ MM is a SublimeText plugin, and it seems like SublimeText will auto-reload the editor's buffer immediately after the underlying file changes. I don't know how that works. I believe Vim can be configured to do something similar. I've been playing, and the following changes seems to work and is close to what I'm looking for. Like you said, though, the order of variable definition is a source of problems. I am still working on this. - au! BufRead,BufNewFile */resources_unpacked/*.js set filetype=apexcode.javascript | set syntax=javascript
+ execute "au! BufRead,BufNewFile */" . g:apex_resources_dir . "/*.js set filetype=apexcode.javascript | set syntax=javascript" and my
Update: Yeah, I see what you mean now. All plugin files are loaded before the .vimrc file is loaded, so we don't know any user-configurations until that time. It seems the only time is to have the user's .vimrc source one of this plugin's files after this configuration is done. It looks like you instruct this in the installation instructions: |
If the changes you made work for your current config then great, there should be no harm in using those. Inclusion of this type of change in the main plugin may not work well for many users. So we will have to come up with a better idea or park it for now. |
I'm trying to figure out the workflow of editing and deploying the contents of a static resource. The zipped-resources doc says:
ApexDeploy
commandI am having problems with step 3. I open the "$PROJECT_DIR/resources-unpacked/MyResource.resource/app.js" file in a buffer in vim, then run the
:ApexDeployOne deploy
command, which tries to deploy that exact file. This gives me an error:no valid files in C:\Users\Alex\AppData\Local\Temp\VIFE452.tmp-fileList.txt
(it contains "resources-unpacked/MyResource/app.js").I'm guessing I'm doing this wrong. I'm guessing I need to deploy the "src/staticresources/MyResource.resource" file. Yeah?
It looks like the only way to do that is to manually type that path into the
:ApexStage
command, then do:ApexDeployStaged deploy
, right? This seems more complicated than it should be. :3What do you think about this proposed change? - Change the
:ApexDeployOne
command to check if the current file is in the "resources-unpacked" directory, and map deploy requests to those files to their corresponding "src/staticresources/*" file? For example: I tell it to deploy "resources-unpacked/MyResource.resource/app.js", but it actually generates a command to deploy the "src/staticresources/MyResource.resource" file.The text was updated successfully, but these errors were encountered: