forked from ractivejs/ractive
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
575 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
## instance | ||
* debug | ||
* isolated | ||
|
||
## viewmodel | ||
* data | ||
* computed | ||
* adapt, adaptors | ||
* magic | ||
|
||
# view | ||
* components | ||
* template, partials | ||
|
||
### parser | ||
* parseOptions | ||
|
||
### binding | ||
* two-way, lazy | ||
|
||
### dom | ||
* el, append | ||
|
||
* events | ||
* decorators | ||
|
||
#### animation & style | ||
* transitions | ||
* easing | ||
* interpolators | ||
* css | ||
* noIntro, transitionsEnabled | ||
* noCssTransform | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
import warn from 'utils/warn'; | ||
import isArray from 'utils/isArray'; | ||
|
||
|
||
function deprecate ( options, deprecated, correct ) { | ||
|
||
if ( deprecated in options ) { | ||
|
||
if( !( correct in options ) ) { | ||
|
||
warn( getMessage( deprecated, correct ) ); | ||
|
||
options[ correct ] = options[ deprecated ]; | ||
|
||
} | ||
else { | ||
|
||
throw new Error( getMessage( deprecated, correct, true ) ); | ||
|
||
} | ||
|
||
} | ||
} | ||
|
||
function getMessage( deprecated, correct, isError ) { | ||
return 'options.' + deprecated + ' has been deprecated in favour of options.' + correct + '.' | ||
+ ( isError ? ' You cannot specify both options, please use options.' + correct + '.' : '' ); | ||
} | ||
|
||
|
||
function deprecateEventDefinitions ( options ) { | ||
|
||
deprecate( options, 'eventDefinitions', 'events' ); | ||
} | ||
|
||
function depricateAdaptors ( options ) { | ||
|
||
// Using extend with Component instead of options, | ||
// like Human.extend( Spider ) means adaptors as a registry | ||
// gets copied to options. So we have to check if actually an array | ||
if ( isArray( options.adaptors ) ) { | ||
|
||
deprecate( options, 'adaptors', 'adapt' ); | ||
|
||
} | ||
|
||
} | ||
|
||
export default function deprecateOptions ( options ) { | ||
deprecateEventDefinitions( options ); | ||
depricateAdaptors( options ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.