..also, your idea of "automatically look for a well known file" could be
done within the application by feature detecting that its running in a
desktop browser.  Would it be prehibitive to dynamically inject the style
on startup from the app itself?

-Michal


On Mon, Feb 3, 2014 at 6:25 PM, Michal Mocny <mmo...@chromium.org> wrote:

> Wouldn't this be better handled by Brian's dream of browser-as-a-platform?
>  I understand that this solves your immediate problem, but I'm not sure
> extending serve is really the right long term solution for this.
>
> -Michal
>
>
> On Mon, Feb 3, 2014 at 2:01 PM, Josh Soref <jso...@blackberry.com> wrote:
>
>> cordova serve is a pretty good way to test out how an application will
>> work on a device.
>>
>> We¹d like to be able to easily transparently add in some platform specific
>> things (today, that¹s fonts which exist on the platform but aren¹t
>> necessarily on the system running the browser that¹s viewing the pages
>> from cordova serve).
>>
>>
>> https://github.com/jsoref/cordova-cli/commit/4ee156f1e588c329846a7ce5610a59
>> 88a12b2eea<https://github.com/jsoref/cordova-cli/commit/4ee156f1e588c329846a7ce5610a5988a12b2eea>
>>
>> Is a way to do this (for IE and Firefox **). I¹m looking for some feedback
>> on it.
>>
>> That would be accompanied with a change to a platform¹s parser, such as:
>>
>> diff --git a/src/metadata/blackberry10_parser.js
>> b/src/metadata/blackberry10_parser.js
>> index 4ed280d..9244876 100644
>> --- a/src/metadata/blackberry10_parser.js
>> +++ b/src/metadata/blackberry10_parser.js
>> @@ -80,6 +80,15 @@ module.exports.prototype = {
>>      www_dir:function() {
>>          return path.join(this.path, 'www');
>>      },
>> +
>> +    serve_extra_style:function() {
>> +        return 'fonts.css';
>> +    },
>> +
>> +    serve_extra_style_dir:function() {
>> +        var lib_path = path.join(util.libDirectory, 'blackberry10',
>> 'cordova', require('../../platforms').blackberry10.version);
>> +        return path.join(lib_path, 'extra_www');
>> +    },
>>
>>      staging_dir: function() {
>>          return path.join(this.path, '.staging', 'www');
>>
>> And then the platform would have an extra_www/fonts.css file Š
>>
>>
>> I¹m not entirely happy with the use of the parser functionality to do this
>> ‹ does anyone have a preference?
>> I could have serve automatically look for a ³well known file² within a
>> platform, and serve it if it exists.
>>
>>
>

Reply via email to