How to use the roarr.error function in roarr

To help you get started, we’ve selected a few roarr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github s-panferov / tygen / packages / tygen-reflector / src / helpers.ts View on Github external
}
				},
				ts.sys,
				'.',
				undefined,
				packageFilePath
			)
		}
	}

	if (!config) {
		throw new Error('Nothing to compile')
	}

	if (config.errors.length > 0) {
		log.error({ errors: config.errors }, `Cannot build project, tsconfig.json has errors`)
		throw new Error(``)
	}

	log.trace({ fileNames: config.fileNames }, 'Initial project files')

	const pkg = Package.fromPath(path.join(target, 'package.js'))
	const result = compile(
		config.fileNames,
		Object.assign({}, config.options, {
			target: ts.ScriptTarget.Latest,
			allowJs: true,
			noEmit: true
		})
	)

	return {
github s-panferov / tygen / packages / tygen-reflector / src / generator.ts View on Github external
.forEach(pkg => {
				const packageInfo = {
					name: pkg.manifest.name,
					version: pkg.manifest.version,
					manifest: pkg.manifestFilePath,
					folder: pkg.folderPath
				}

				if (!pkg.manifest.name) {
					log.error(packageInfo, 'Package has no name, skipping')
					return
				}

				if (!pkg.manifest.version) {
					log.error(packageInfo, 'Package has no version, skipping')
					return
				}

				log.info(packageInfo, 'Generate package')
				pkg.generate(context)
			})
github s-panferov / tygen / packages / tygen-reflector / src / generator.ts View on Github external
.forEach(pkg => {
				const packageInfo = {
					name: pkg.manifest.name,
					version: pkg.manifest.version,
					manifest: pkg.manifestFilePath,
					folder: pkg.folderPath
				}

				if (!pkg.manifest.name) {
					log.error(packageInfo, 'Package has no name, skipping')
					return
				}

				if (!pkg.manifest.version) {
					log.error(packageInfo, 'Package has no version, skipping')
					return
				}

				log.info(packageInfo, 'Generate package')
				pkg.generate(context)
			})

roarr

JSON logger for Node.js and browser.

BSD-3-Clause
Latest version published 2 months ago

Package Health Score

80 / 100
Full package analysis