mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: implement basic devServer
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import dedent from 'ts-dedent';
|
||||
import { env } from "@nativescript/webpack";
|
||||
|
||||
// de-indents strings so multi-line string literals can be used
|
||||
function cleanup(data: any[]) {
|
||||
@@ -28,7 +29,9 @@ export function warn(...data: any): void {
|
||||
}
|
||||
|
||||
export function info(...data: any): void {
|
||||
console.log(`[@nativescript/webpack] Info: \n`, ...cleanup(data));
|
||||
if(env.verbose) {
|
||||
console.log(`[@nativescript/webpack] Info: \n`, ...cleanup(data));
|
||||
}
|
||||
}
|
||||
|
||||
// todo: refine
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { dirname, resolve } from 'path';
|
||||
|
||||
import { getPackageJson, getProjectRootPath } from './project';
|
||||
import { error } from './log';
|
||||
import { error, info } from './log';
|
||||
import { env } from '../';
|
||||
|
||||
import AndroidPlatform from '../platforms/android';
|
||||
@@ -29,7 +29,7 @@ const platforms: {
|
||||
* @param platform A platform definition of the platform specifics
|
||||
*/
|
||||
export function addPlatform(name: string, platform: INativeScriptPlatform) {
|
||||
console.log('adding platform', name, platform);
|
||||
info(`Adding platform ${name}`, platform);
|
||||
platforms[name] = platform;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user