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

[Proposal] A set of commands for managing add-ons #96

Closed
yosymfony opened this Issue Oct 30, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@yosymfony
Member

yosymfony commented Oct 30, 2016

Spress 2.2.0 will has a simple package manager based on Composer. Below, a list of new commands that support this proposal:

new:site command

Create a new site based on theme. This is not a new command but now has more responsabilities:

  1. Locate the theme using any Composer repository (Packagist is the most famous).
  2. Downdload the theme.
  3. Resolve its dependencies.
  4. Additional tasks to set up the theme correctly.
new:site [--force] [--prefer-source] [--prefer-lock] [--no-scripts] [--] [path[="./"]] [template[="blank"]]
  • prefer-source: Forces installation from package sources when possible, including VCS information.
  • prefer-lock: If there is a "composer.lock" file in the theme, Spress will use the exact version declared in that.
  • no-scripts: Skips the execution of all scripts defined in composer.json file.

The options --all used with the blank site has been deprecated. Now, always scaffold a complete blank site.

Below a few examples:

$ spress new:site foo-site spress-addons/clean-blog-theme

and this time using a concrete version:

$ spress new:site foo-site spress-addons/clean-blog-theme:2.0.0

In short: this is equivalent to create a blank site with a composer.js file and the theme as requirement followed by running composer install command.

new:theme command

Create a new theme that could be based on another one preexists.

new:theme [--prefer-source] [--dev] [--no-scripts] [--force] [--prefer-lock] [--] [<path>] [<package>]

e.g: creating a theme based on Spresso

$ spress new:theme mysite spress/spress-theme-spresso:2.1

Creating a blank theme:

$ spress new:theme mysite

add:plugin command

Add a new plugin or theme and resolve its dependencies. This is equivalent to run composer require.

e.g:

$ spress add:plugin spress/github-metadata-plugin

remove:plugin command

Remove a plugin.

$ spress remove:plugin spress/github-metadata-plugin

update:plugin command

Get the lastest version of the site's dependencies (plugins and themes).

To update all registered plugin and themes:

$ spress update:plugin

To update only a few plugins:

$ spress update:plugin spress/github-metadata-plugin spress/spress-theme-spresso

@yosymfony yosymfony changed the title from [Proposal] A set of command for managin add-ons to [Proposal] A set of command for managing add-ons Oct 30, 2016

@yosymfony yosymfony changed the title from [Proposal] A set of command for managing add-ons to [Proposal] A set of commands for managing add-ons Oct 30, 2016

@yosymfony yosymfony referenced this issue Oct 30, 2016

Closed

The roadmap of Spress 2.2.0 #95

12 of 12 tasks complete

@yosymfony yosymfony closed this May 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment