NativeScript / NativeScript/NativeScript

Support for Custom Resource Paths

Open
#2,609 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
25.7k
Forks
1.7k
Avg merge
1d 5h
Merged PRs (30d)
35

Description

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Yes

Tell us about the problem

We are not able to specify custom App_Resources and fonts paths when initializing the application, thus polluting our custom folder structure. This also causes plugin authors to follow this habit.

The proposed solution is providing a new parameter paths to application.start like so:

require("nativescript-i18n"); // preloaded plugin

var application = require("application");
application.paths.fonts = "resources/fonts";
application.paths.i18n = "resources/i18n"; // automatically set by preloaded plugin

application.start({ main: "..." }); // from this point on, paths are loaded

If paths or the a key isn't specified it will use the default, so it's non-breaking.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the application module and the application.start entry point. Trace how App_Resources and fonts are currently located, then compare that behavior with the proposed application.paths.fonts and application.paths.i18n settings. Done means custom paths are honored while unspecified keys retain their defaults.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.