user1086337
user1086337

Reputation: 397

Change Cordova's working directory

How can I change Apache Cordova's working directory to something other than www? Changing <content src="src/index.html"/> in config.xml did not work.

Upvotes: 7

Views: 4297

Answers (2)

Vlad Bezden
Vlad Bezden

Reputation: 89547

Here is what documentation for ionic-cli says about Serving an alternative document root

If you'd like to test your app in the browser and you use a folder other than the default of www, you can specify this folder in your ionic.project file.

Example:

{
  "name": "SmoothRiders",
   "gulpStartupTasks": [
    "watch"
  ],
  "documentRoot": "app",
  "watchPatterns": [
    "app/js/*",
    "!app/css/**/*"
  ]
}

Upvotes: 7

Andy Hopper
Andy Hopper

Reputation: 3678

I hate to be the bearer of bad news, but I don't believe it's possible to modify the root folder through the config.xml configuration file (at least in the current version as of Jan. 2015). The source code for the various platforms were written with the assumption that 'www' will be the Web view's root content folder. I do suppose it would be possible to hand-modify the source post-prepare, but I strongly recommend against it.

Upvotes: 2

Related Questions