Visual Studio Browser Link + Chrome Developer Tools - less

My Visual Studio 2013 app uses LESS, which is bundled using BundleTransformer (http://bundletransformer.codeplex.com). LESS files are imported across the entire app into a single app.less. This app.less file is then bundled.
// Bundles
using BundleTransformer.Less;
...
var cssBundle = new Bundle("~/bundles/less");
cssBundle.Include("~/content/less/app.less");
With this method, Chrome (and every other browser) only sees the final app.less. When I open Chrome Developer tools and make a change to the CSS on the fly, Browser Link automatically saves the changes back to app.less. The original app.less, which looked something like the below is now the entire compiled version the browser loaded.
// app.less
#import "bootstrap/bootstrap.less";
#import "app/common/layout/header.less";
#import "app/common/layout/footer.less";
1) How do I prevent Browser Link from automatically saving? I've turned off the "Enable F12 Save Changes" option, but it doesn't care. Or disable saving of LESS files only, as I do modify Javascript in Chrome Developer tools often and wish to save.
2) If I do want to save (which I do), is there a way to configure my app, BundleTransformer, and/or my browser (Chrome) to map to the original source files (during development), instead of the compiled app.less?
I'm also using Web Essentials 2013 (1.8.5), but just for viewing LESS in VS.
Chrome is mapped to my apps workspace. https://developers.google.com/chrome-developer-tools/docs/settings#workspace

Disable VS BrowserLink
<appSettings>
<add key="vs:EnableBrowserLink" value="false"/>
</appSettings>

Related

InteliJ idea, disable auto build for java, not HTML

https://stackoverflow.com/a/43234019/11369236
I did those and now, when I remove a line of Java code, it automatically restarts debug.
But I do not want this.
When I change HTML, I have to refresh browser also (it does not restart ide, no need of course but I do not want to refresh tab). It does not refresh automatically. But this is not a big problem.
It only should restart HTML (or I can manually restart it) but not for Java or backend files. I could not see such an option.
When I disable "build automatically" (I use the latest version), I have to restart ide to see HTML changes on the browser.
I can not find a way out.

Worklight Console does not show new changes to project -- seems to use original code

I am running Eclipse Luna 4.4.1 with Worklight Studio 6.2...
I have made changes to my Worklight project. For some reason, I cannot get these changes to be seen/previewed when opening in the Worklight Console...
I have made simple changes such as adding print (console.log) statements to see if these changes are making it out to the console... I have even removed design elements to see if I can get this preview to error out...
Here is what I do:
Highlight the app folder (the folder under the "apps" folder) and right-click
Select Run As > 2 Build All Environments
Once that is complete, I highlight the project folder (the topmost folder in the project) and right-click, selecting Open Worklight Console, which opens the console in Firefox
Click the Preview as Common Resources link in the Console
The "old" code/project runs -- no changes appear
I have tried Cleaning the project, closing and re-opening Eclipse, rebooting my machine, etc. but nothing seems to shake this up. Worklight seems to use the "old" code no matter what I do in Eclipse...
Is there a setting on Worklight I may be missing?
Starting Worklight 6.2 you do not need to either build or deploy your application in order to see changes made to web resources.
The following should suffice:
Create a Project and application
Run As > Run on Worklight Development Environment
Open console, view the application (keep this tab open)
In Eclipse, change some resource (image, CSS, HTML, JavaScript)
Return to the previously opened tab and refresh it
The change should be visible to you.
Something to try:
Close Eclipse
Open your TMPDIR and delete the wlBuildResources folder
Open Eclipse, try again
You can also try adding a mobile environment to your application; there are some reports this some times, show how, helps 'refreshing' the web resources used while previewing applications
You can also make sure you are using the very latest 6.2.0.01 iFix; there were preview-related fixes in the past. You can get it from IBM Fix Central website (assuming you are an IBM customer/business partner; for evaluation purposes you should download the latest available version, from the Eclipse Marketplace - v6.3)
Note that Run As > Build all environment does not actually deploy your modified web resources to the server, it only generates the .wlapp for later consumption elsewhere, so I suggest to follow my steps at the very top of this answer, by using Run As > Run on Worklight Development Server, and later on simply save (ctrl/cmd-s) and then go to the console to verify the changes are there.

Programmatically install extensions on Safari 8 OSX 10.10

I'm trying to fix a couple of bugs for SafariDriver/Selenium.
Here is the problem:
On Safari 7 and bellow, to install a new plug in all you had to do is put the extension into ~/Library/Safari/Extensions. Next all you have to do is activate the plugin by adding it to the ~/Library/Safari/Extensions/Extensions.plist after this the Safari will have the plugin installed.
Starting with 10.10, this is no longer possible to do. The location of the extension is the same but i'm not sure how to activate the extension, since the Extensions.plist no longer exists.
My understanding is that there is some file that is controlled via "Safari Extensions List" password in the keychain under login but I have no idea which file this may apply to.
If I compile and install the extention by hand, everything works just fine but the automatic installation of the latest plugin is broken. (documentation for this https://code.google.com/p/selenium/wiki/SafariDriverInternals)
"Safari Extensions List" password is not password actually but a binary plist same as ~/Library/Safari/Extensions/Extensions.plist
Read it, modify it, write it back.
The correct thing to do is to have the user install the extension by opening it manually (double-click or command o). That's what Apple is trying to get you to do.
Apple never really wanted anybody messing about with plists for other apps.
Most preferences plists are cached in memory anyway and would require a new login session to blow them away and get new copies.
plists are updated on ending the session or the app in question.
They were never intended as a means to modify another app's behavior. That is a security risk.
In the case of Selenium, the intent is clearly to create an automated test environment. Setting up a nice installer pre-empts that to some degree.
The right thing to do is to file a bug with Apple letting them know what kind of functionality you need in Safari.

AIR how to prevent application descriptor file from reverting or updating on launch

I have a desktop application using NativeProcess and I need the follwoing in the descriptor file.
<supportedProfiles>extendedDesktop desktop</supportedProfiles>
Unfortunately the file keeps reverting to (desktop first)
<supportedProfiles>desktop extendedDesktop </supportedProfiles>
How do I prevent this?
I'm using Flash Builder to launch though compiling using the Flash IDE.
Flash CS is rewriting the list based on the order of the checkboxes in the AIR Settings window. Changing the order of the profiles in the Descriptor.3.x.xsd file won't help. You could set the app.xml file to read-only, as long you don't have to make any other changes. Not a great solution...

IDE for Firefox Add-ons Development

I have been working on firefox add-ons for quite a long time and its been a real headache to use notpad++ for development. Is there any suitable IDE or plug-in for eclipse available.And just like we do **Run on Server" for dynamic web-projects,Is there any way that, I do a change in any of the sorce file and it automatically creates the .xpi file and installs in firefox?
There are a lot of editors or IDEs that could be easily integrated with the SDK to perform basic tasks like running cfx run or cfx xpi. Here's the system that I use:
I have Wladimir Palant's 'Extension Auto Installer' installed in Firefox
I have a script like this in the add-on's root directory:
#!/bin/bash
/path/to/cfx xpi && wget --post-file=filename.xpi http://127.0.0.1:8888/
Every time I want to test the add-on, I just run the script and the xpi is built and installed into Firefox. Most editors will have some capability to bind a shel command like this to a keybinding.
You don't really need IDE to create XPI every time you make a change.
Create a folder with your addon's source code (e.g.
C://addons/myaddon/).
Put a file containing this path to the folder
containing your Firefox addons and call it the same as your addon ID
(e.g. myaddon#domain.com).
In your install.rdf file, add this line: <em:unpack>true</em:unpack>
This way you can just restart the Firefox whenever you want to see the changes. I recommend this addon, it adds a keyboard shortcut Ctrl+Alt+R for quick restart of Firefox (be sure to get the 0.6b2 version, previous versions don't support the keyboard shortcut):
https://addons.mozilla.org/firefox/downloads/file/121516/restart_firefox-0.6b2-fx.xpi?src=dp-btn-devchannel
Also, you will not loose your source code in case you uninstall your addon while testing (this happens when you develop directly in your Firefox addons folder).
As of IDE, for me personally any editor with syntax highlight for XML and JS works just fine. My personal favorites are Aptana (Eclipse based IDE) and Intype (lightweight and extremely fast).