Returns the targets of this project, or the default targets if not present. @public @property targets @return {Object} Targets object
()
| 267 | @return {Object} Targets object |
| 268 | */ |
| 269 | get targets() { |
| 270 | if (this._targets) { |
| 271 | return this._targets; |
| 272 | } |
| 273 | let configPath = 'config'; |
| 274 | |
| 275 | if (this.pkg['ember-addon'] && this.pkg['ember-addon']['configPath']) { |
| 276 | configPath = this.pkg['ember-addon']['configPath']; |
| 277 | } |
| 278 | |
| 279 | let targetsPath = path.join(this.root, configPath, 'targets'); |
| 280 | |
| 281 | if (fs.existsSync(`${targetsPath}.js`)) { |
| 282 | this._targets = this.require(targetsPath); |
| 283 | } else { |
| 284 | this._targets = { browsers: ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'] }; |
| 285 | } |
| 286 | return this._targets; |
| 287 | } |
| 288 | |
| 289 | /** |
| 290 | Returns the addons configuration. |