I am trying to use Cordova 3.4 in conjunction with AngularJS. I followed this tutorial and at some point it asks me to alter html.source.dir and html.asset.dir in ant.properties file. However, I am not being able to find this file anywhere in my source directory.
How do I change html source directory in Cordova?
Regards,
JadeSync.
turns out ant.properties do not come bundled with new versions of Cordova. I had to alter Gruntfile.js to change these directories.
Related
I've got an idea folder in my Webstorm project. This is a node app. What do I need to share and why from this folder in source control? What settings should I share and why?
Also, how do I retain all my preferences from project to project? I find that if I create a new project (which I do by simply opening webstorm then opening the folder of code I just cloned down from a repo), I have to reset stuff like the JS version, and a bunch of other stuff in Preferences.
1) You just need to add the source folder to source control.
2) The easiest way to share Webstorm code style setting is using the .editorconfig plugin and adding the file to source control:
https://www.jetbrains.com/webstorm/help/configuring-code-style.html#d649738e184
I am trying to upload some code html and javascript code into phonegap to develop this app however when I update the files the program still runs the old code as to what was in the html file before. I have even started a new project and it will not change the old index.html image even though the code behind it is different. I'm really confused as to why this is and I was wondering what I could do to solve this. I even searched through the workspace index.html file and it is the correct file that I want in there but upon running it i am given the same your device is ready hello world. I checked the location of the files and everything is correct. It is very confusing. I am using eclipse by the way not phonegap build if that helps.
you need to build your project again.
cordova build android
But make sure you edit your files in www folder in parent folder.
Make sure you are updating the WWW file in the root Phonegap folder. Then you can run the command:
$ cordova build
or
$ phonegap build
When running Eclipse Kepler and importing an existing Maven project, Eclipse hangs during "Building Workspace (XX%)". Switching to the Progress tab reveals a "Validating nnn"; it looks like it’s validating a directory containing JavaScript files.
Kill Eclipse process.
Go to project folder and edit .project file.
Remove the following lines (it will disable failing JavaScript validator):
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
Save file.
Re-open Eclipse.
I faced the same problem when I tried to install Angular.js with bower in my project. I seems bower has lots of javascript files it downloaded automatically which caused my IDE to stuck in validation process for a long time. So, I solved this problem this way,
I first installed tern.js 0.9.0.
Then I went to the project properties, selected tern script path
included only the path I needed for validation, My project's
javascript folder. I excluded other path like placeholders,
Angular.js files, Jquery files.
I selected the Javascript from the properties again and did the same
things in include path's source.
My IDE currently working without freezing. I took help from there. Tern
I guess it can be helpful, where any IDE stuck due to lots of Javascript file.
I created an empty MVC4 application. It doesn't contain the Scripts folder or any of the javascript files.
I need some of those js files.
How do I add them to my project? I can add a new folder, and download/add each JS file individually, but there has to be a better way. I know VS has them somewhere....
Example:
<script src="#Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
~/Scripts doesn't exist. Is there anyway that I can just import the folder with the default JS files?
Use NuGet. NuGet will correctly place JavaScript dependent frameworks into the ~\Scripts directory.
Right click on References->Manage NuGet Packages.
I used NuGet in my Project to pull down jQuery 1.9.1 as a dependency into my ASP.NET MVC4 Solution.
I verified that this brought in the following into my ~\Scripts directory:
jquery-1.9.1-intellisense.js
jquery-1.9.1.js
jquery-1.9.1.min.js
jquery-1.9.1.min.map
Here is my Solution Explorer:
This is a clean way to manage your default scripts (such as jQuery, knockout, or modernizr) via VS.NET and NuGet.
What I ended up doing was creating a new Internet application and just going into the project files and copying them over to the empty project.
There has to be a better way so leaving the question open for a while.
Create non empty project (it will contain all the scripts you need), then just copy them to your empty project into "Scripts" folder and take a look into few places how to include them into the project:
Global.asax
App_Start\BundleConfig.cs
That's all you need to do. Thanks & hope this helps!
i'm new to Mosync and i'm trying to create an HTML5/Javascript project. The IDE generates a main.cpp file and an index.html file.
The main.cpp file contains a reference for the index.html file; i've already tried creating a new html file inside the same folder where the generated index.html file is and changed the reference in the main.cpp file to call the file that i've just created but it gives me an error that says the file cannot be found.
I've even tried removing all the code in the generate index.html file and running it and the results still shows all the deleted code from the index.html file.
My question would be how do i add multiple html files when creating a MoSync project?
It should work to do what you are doing, this could be a bug. Can you provide some details about which version of MoSync you are using, and which platform?
You should be able to have any html file in the folder LocalFiles in a MoSync project, and then just pass the file name to showPage in main.cpp, just as you are doing.
Perhaps the project is not rebuild properly? Try to right-click on the project in Eclipse, then select Rebuild. Are you on iOS or Android? How do you transfer the app to the device?
As Mikael mentioned also, I think it is an IDE bug, I tried refreshing/rebuilding the project and it worked fine. Sometimes eclipse does not detect file changes that come from other editors so it ignores them.