Added package.js support for themes (and plugins)#2156
Added package.js support for themes (and plugins)#2156ErisDS merged 1 commit intoTryGhost:masterfrom javorszky:iss2081
Conversation
core/server/require-tree.js
Outdated
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
Do not merge this in, as I'd like to have eyes on this first. :) |
core/server/require-tree.js
Outdated
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
As far as I can tell, this is ready to be merged. |
|
Sorry, I've not had much time to look at this yet (I'm prepping for a conference this week). One thing I did notice is that if you add a badly formatted When it needs to be a nicely formatted red-white-green error similar to what I get if I try to activate a non existent app: |
|
@ErisDS, updated with pretty error / warning messages. ^_^ And rebased. |
|
Wee, so... juggled code around. This is the most sane solution I can come up with with how all the module dependencies are laid out.
Also, hat tip to @hswolff! |
Closes #2081 * Amended require-tree to populate availableThemes and availablePlugins to use full file names (`basename.ext`) as keys instead of just basename. This way `image.jpg`, `image.png`, `image.gif` won't overwrite the `image` key. * Amended require-tree to allow package.json file parsing to return the contents of the file as json on the `package.json` key. * settings api populates theme data `package` if it exists. Otherwise it assigns `false` to it * `general.hbs` (salute) was reworked to if there is the package key on the theme is not false, it will use the `name` and `version` keys of that. You can break it by not having a `name` or `version` in the package.json file. * Added error and warning messages for package.json file parse errors and misses
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
This is lookin gooood! |
Added package.js support for themes (and plugins)
refs TryGhost#2179, TryGhost#2156 - Replace extend with _.extend


Closes #2081
package.jsonkey.package.jsonif it exists. Otherwise it assignsfalseto itgeneral.hbs(salute) was reworked to if there is thepackage.jsonkey on the theme is not false, it will use thenameandversionkeys of that. You can break it by not having anameorversionin the package.json file.