-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fix(analytics): documentation et correctif version standalone [DS-3…
…746] (#895) - Apporte des éléments correctifs à l'issue #880 - correctifs dans la version standalone : - configuration appliquée au logging (verbose, production) - retrait de dépendances non requises - ajout de documentation sur la version standalone - installation - fonctionnalités disponibles - Extraction de Modes du fichier de la class Options pour réduire les dépendances
- Loading branch information
Showing
10 changed files
with
73 additions
and
33 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
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
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 |
---|---|---|
@@ -1,14 +1,28 @@ | ||
import api from '../api.js'; | ||
import ns from '../../core/script/api/utilities/namespace'; | ||
import { completeAssign } from '../../core/script/api/utilities/property/complete-assign'; | ||
import { Modes } from '../../core/script/api/options/options.js'; | ||
import { Modes } from '../../core/script/api/options/modes.js'; | ||
import config from '../../core/config'; | ||
|
||
api.inspector = completeAssign(console, {}); | ||
const api = {}; | ||
|
||
const hasLoggingLevel = (level) => api.internals.configuration.production !== true && (level > 1 || api.internals.configuration.verbose); | ||
|
||
api.inspector = { | ||
log: (...msg) => hasLoggingLevel(0) ? console.log.apply(console, msg) : null, | ||
debug: (...msg) => hasLoggingLevel(1) ? console.debug.apply(console, msg) : null, | ||
info: (...msg) => hasLoggingLevel(2) ? console.info.apply(console, msg) : null, | ||
warn: (...msg) => hasLoggingLevel(3) ? console.warn.apply(console, msg) : null, | ||
error: (...msg) => hasLoggingLevel(4) ? console.error.apply(console, msg) : null | ||
}; | ||
|
||
const configuration = window[config.namespace]; | ||
|
||
api.internals = { | ||
ns: ns | ||
ns: ns, | ||
configuration: configuration | ||
}; | ||
|
||
api.Modes = Modes; | ||
api.mode = configuration.mode || Modes.AUTO; | ||
|
||
window[config.namespace] = api; | ||
export default api; |
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
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,9 @@ | ||
export const Modes = { | ||
AUTO: 'auto', | ||
MANUAL: 'manual', | ||
RUNTIME: 'runtime', | ||
LOADED: 'loaded', | ||
VUE: 'vue', | ||
ANGULAR: 'angular', | ||
REACT: 'react' | ||
}; |
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