You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A plugin is an addon that can be executed as a part of the Ember CLI Deploy pipeline. A plugin will implement one or more of the Ember CLI Deploy's pipeline hooks.
@@ -25,17 +24,38 @@ For more information on what plugins are and how they work, please refer to the
25
24
26
25
## Setup
27
26
28
-
- Requirements
27
+
### Requirements
28
+
29
+
You'll first have to install and configure :
29
30
30
-
You'll first have to [setup `ember-cli-deploy-s3-index`](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index#quick-start).
ember install ember-cli-deploy-s3-index // ↶ requires:
43
+
ember install ember-cli-deploy-s3
44
+
ember install ember-cli-deploy-build
45
+
ember install ember-cli-deploy-revision-data
46
+
ember install ember-cli-deploy-display-revisions
47
+
```
48
+
49
+
### Install this plugin
33
50
34
51
```bash
35
52
$ ember install ember-cli-deploy-index-json
36
53
```
37
54
38
-
- Configuration
55
+
### Configuration
56
+
57
+
When `ember install ember-cli-deploy` was run, it should have
58
+
generated a a file at `your-app/config/deploy.js`.
39
59
40
60
Edit `config/deploy.js` so that your configuration looks like the snippet below.
41
61
@@ -49,7 +69,61 @@ s3: {},
49
69
}
50
70
```
51
71
52
-
*In depth:* The idea is that `revision-data`, `s3-index` and `index-json` have the same `filePattern` value. `index-json` is not present in this example because we're using its default `filePattern` value.
72
+
*In depth:* The idea is that `revision-data`, `s3-index` and
73
+
`index-json` have the same `filePattern` value. `index-json` is not
74
+
present in this example because we're using its default `filePattern` value. More on this in the Ember CLI Deploy plugin section.
75
+
76
+
Here is a full example of this file, getting the Amazon S3 information
77
+
from unix environement variables.
78
+
79
+
```js
80
+
/* eslint-env node */
81
+
'use strict';
82
+
83
+
module.exports=function(deployTarget) {
84
+
letENV= {
85
+
s3: {},
86
+
'revision-data': {
87
+
filePattern:'index.json'
88
+
},
89
+
's3-index': {
90
+
filePattern:'index.json'
91
+
},
92
+
build: {}
93
+
};
94
+
95
+
if (deployTarget ==='development') {
96
+
ENV.build.environment='development';
97
+
// configure other plugins for development deploy target here
98
+
}
99
+
100
+
if (deployTarget ==='staging') {
101
+
ENV.build.environment='production';
102
+
// configure other plugins for staging deploy target here
103
+
}
104
+
105
+
if (deployTarget ==='production') {
106
+
ENV.build.environment='production';
107
+
// configure other plugins for production deploy target here
0 commit comments