UNPKG

2.07 kBMarkdownView Raw
1# ember-export-application-global
2
3[![Build Status](https://travis-ci.org/ember-cli/ember-export-application-global.svg?branch=master)](https://travis-ci.org/ember-cli/ember-export-application-global)
4[![devDependency Status](https://david-dm.org/ember-cli/ember-export-application-global/dev-status.svg)](https://david-dm.org/ember-cli/ember-export-application-global#info=devDependencies)
5[![npm version](https://badge.fury.io/js/ember-export-application-global.svg)](http://badge.fury.io/js/ember-export-application-global)
6
7Sets `window.MyAppName` up as the application instance upon boot.
8
9By default this is only done when not running in production mode, but you can fully
10control when it is executed by including `exportApplicationGlobal` in your `config/environment.js`
11with `true` if you want the global exported, or `false` if you do not.
12
13## Example Configuration
14
15```javascript
16// config/environment.js
17
18module.exports = function(environment) {
19 var ENV = {
20 // other configuration
21 exportApplicationGlobal: ['staging', 'production'].indexOf(environment) === -1
22 }
23};
24```
25
26## Installation
27
28```sh
29ember install ember-export-application-global
30# or for ember-cli < 0.1.5
31npm install --save-dev ember-export-application-global
32```
33
34## Available Configuration
35
36* `exportApplicationGlobal` - Specify if you want the global to be exported.
37 A `true` will export global as the application name, but a string will export
38 is as that string.
39
40## Contributing
41
42This README outlines the details of collaborating on this Ember addon.
43
44### Installation
45
46* `git clone <repository-url>` this repository
47* `cd ember-export-application-global`
48* `npm install`
49* `bower install`
50
51## Running
52
53* `ember serve`
54* Visit your app at [http://localhost:4200](http://localhost:4200).
55
56## Running Tests
57
58* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
59* `ember test`
60* `ember test --server`
61
62## Building
63
64* `ember build`
65
66For more information on using ember-cli, visit [http://ember-cli.com/](http://ember-cli.com/).
67
68## License
69
70MIT