@spree/docs 0.1.34 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,10 +13,17 @@ description: Learn how to create a Spree extension.
|
|
|
13
13
|
|
|
14
14
|
Let's build a simple extension. Suppose we want the ability to mark certain products as being on sale. We'd like to be able to set a sale price on a product and show products that are on sale on a separate products page. This is a great example of how an extension can be used to build on the solid Spree foundation.
|
|
15
15
|
|
|
16
|
+
Install the Spree Extension CLI by running:
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
gem install spree_extension
|
|
21
|
+
```
|
|
22
|
+
|
|
16
23
|
Run the following command from a directory of your choice outside of our Spree application:
|
|
17
24
|
|
|
18
25
|
```bash
|
|
19
|
-
spree
|
|
26
|
+
spree-extension simple_sales
|
|
20
27
|
```
|
|
21
28
|
|
|
22
29
|
This creates a `spree_simple_sales` directory with several additional files and directories. After generating the extension make sure you change to its directory:
|