feat(core): nativescript.config and webpack updates (#8801)

This commit is contained in:
Nathan Walker
2020-09-01 15:53:37 -07:00
committed by GitHub
parent 757a2ffdf7
commit 54cce4f20c
1093 changed files with 332 additions and 316 deletions

View File

@@ -0,0 +1,36 @@
export var test_DummyTestForSnippetOnly0 = function () {
// >> console-log
console.log('Hello, world!');
console.info('I am NativeScript');
console.warn('Low memory');
console.error('Uncaught Application Exception');
// << console-log
};
export var test_DummyTestForSnippetOnly1 = function () {
// >> console-time
console.time('LoadTime');
// << console-time
// >> console-timeend
console.timeEnd('LoadTime');
// << console-timeend
};
export var test_DummyTestForSnippetOnly2 = function () {
// >> console-assert
console.assert(2 === 2, '2 equals 2');
// << console-assert
};
export var test_DummyTestForSnippetOnly3 = function () {
// >> console-dir
var obj = { name: 'John', age: 34 };
console.dir(obj);
// << console-dir
};
export var test_DummyTestForSnippetOnly5 = function () {
// >> console-trace
console.trace();
// << console-trace
};

View File

@@ -0,0 +1,31 @@
---
nav-title: "console How-To"
title: "console"
environment: nativescript
description: "Examples for using console"
previous_url: /ApiReference/console/HOW-TO
---
# Console
### Logging
Logging to the console does not require the "console" module since the console variable is global. It can be used anywhere within your code.
You can log your message in several different categories.
{%snippet console-log%}
### Time
Begins counting a time span for a given name (key).
{%snippet console-time%}
Ends a previously started time span through the time method.
{%snippet console-timeend%}
### Assert
Asserts a boolean condition and prints a message in case the assert fails.
{%snippet console-assert%}
### Dir
Prints the state of the specified object to the console.
{%snippet console-dir%}
### Trace
Prints the current stack trace in the console.
{%snippet console-trace%}