Skip to content

Commit c24c876

Browse files
committed
[DOC release] updated docs regarding ember debug methods to bring them all in line with #13180
1 parent 56b06c4 commit c24c876

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

packages/ember-debug/lib/deprecate.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ export let missingOptionsUntilDeprecation = 'When calling `Ember.deprecate` you
9595

9696
/**
9797
Display a deprecation warning with the provided message and a stack trace
98-
(Chrome and Firefox only). Ember build tools will remove any calls to
99-
`Ember.deprecate()` when doing a production build.
98+
(Chrome and Firefox only).
99+
100+
* In a production build, this method is defined as an empty function (NOP).
101+
Uses of this method in Ember itself are stripped from the ember.prod.js build.
100102
101103
@method deprecate
102104
@param {String} message A description of the deprecation.

packages/ember-debug/lib/index.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ import { generateTestAsFunctionDeprecation } from 'ember-debug/handlers';
3030

3131

3232
/**
33-
Define an assertion that will throw an exception if the condition is not
34-
met. Ember build tools will remove any calls to `Ember.assert()` when
35-
doing an Ember.js framework production build and will make the assertion a
36-
no-op for an application production build. Example:
33+
Define an assertion that will throw an exception if the condition is not met.
34+
35+
* In a production build, this method is defined as an empty function (NOP).
36+
Uses of this method in Ember itself are stripped from the ember.prod.js build.
3737
3838
```javascript
3939
// Test for truthiness
@@ -71,8 +71,10 @@ setDebugFunction('assert', function assert(desc, test) {
7171
});
7272

7373
/**
74-
Display a debug notice. Ember build tools will remove any calls to
75-
`Ember.debug()` when doing a production build.
74+
Display a debug notice.
75+
76+
* In a production build, this method is defined as an empty function (NOP).
77+
Uses of this method in Ember itself are stripped from the ember.prod.js build.
7678
7779
```javascript
7880
Ember.debug('I\'m a debug notice!');
@@ -89,6 +91,9 @@ setDebugFunction('debug', function debug(message) {
8991
/**
9092
Display an info notice.
9193
94+
* In a production build, this method is defined as an empty function (NOP).
95+
Uses of this method in Ember itself are stripped from the ember.prod.js build.
96+
9297
@method info
9398
@private
9499
*/
@@ -102,8 +107,7 @@ setDebugFunction('info', function info() {
102107
Display a deprecation warning with the provided message and a stack trace
103108
(Chrome and Firefox only) when the assigned method is called.
104109
105-
Ember build tools will not remove calls to `Ember.deprecateFunc()`, though
106-
no warnings will be shown in production.
110+
* In a production build, this method is defined as an empty function (NOP).
107111
108112
```javascript
109113
Ember.oldMethod = Ember.deprecateFunc('Please use the new, updated method', Ember.newMethod);
@@ -134,8 +138,10 @@ setDebugFunction('deprecateFunc', function deprecateFunc(...args) {
134138

135139

136140
/**
137-
Run a function meant for debugging. Ember build tools will remove any calls to
138-
`Ember.runInDebug()` when doing a production build.
141+
Run a function meant for debugging.
142+
143+
* In a production build, this method is defined as an empty function (NOP).
144+
Uses of this method in Ember itself are stripped from the ember.prod.js build.
139145
140146
```javascript
141147
Ember.runInDebug(() => {

packages/ember-debug/lib/warn.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ export let missingOptionsIdDeprecation = 'When calling `Ember.warn` you must pro
2424
*/
2525

2626
/**
27-
Display a warning with the provided message. Ember build tools will
28-
remove any calls to `Ember.warn()` when doing a production build.
27+
Display a warning with the provided message.
28+
29+
* In a production build, this method is defined as an empty function (NOP).
30+
Uses of this method in Ember itself are stripped from the ember.prod.js build.
2931
3032
@method warn
3133
@param {String} message A warning to display.

0 commit comments

Comments
 (0)