Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package.json support for Themes #2081

Closed
ErisDS opened this issue Jan 30, 2014 · 1 comment · Fixed by #2156
Closed

Add package.json support for Themes #2081

ErisDS opened this issue Jan 30, 2014 · 1 comment · Fixed by #2156
Assignees
Milestone

Comments

@ErisDS
Copy link
Member

ErisDS commented Jan 30, 2014

Require tree already reads all of the contents of a theme directory, but we want to add support for reading the contents of a package.json file.

On the settings page, if a theme does have a package.json file, we should read the name and version number and use these in the dropdown like:

themes

If there is no package.json file, we should use the directory name as before.

Also if a theme does not have a package.json file output a warning on the console explaining that themes should have package.json files, and a link to a page explaining what's going on. The URL for that page is TBD.

It is worth considering how and where we load the data from the package.json file probably at the same time as doing the requireTree - and also when to output the warning - at start when the directory is loaded? When the theme is activated? I'd recommend both.

Note: This is a temporary improvement to introduce package.json files. Long term we will add support for more information via a much better UI.

Also note: When implementing this, consider that apps, which are not currently used in the UI anywhere, will also need to have package.json files which are loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants