How to use the code-red.print function in code-red

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

github sveltejs / svelte / src / compiler / compile / Component.ts View on Github external
imported_helpers,
				referenced_globals,
				this.imports,
				this.vars
					.filter(variable => variable.module && variable.export_name)
					.map(variable => ({
						name: variable.name,
						as: variable.export_name,
					}))
			);

			css = compile_options.customElement
				? { code: null, map: null }
				: result.css;

			js = print(program, {
				sourceMapSource: compile_options.filename
			});

			js.map.sources = [
				compile_options.filename ? get_relative_path(compile_options.outputFilename || '', compile_options.filename) : null
			];

			js.map.sourcesContent = [
				this.source
			];
		}

		return {
			js,
			css,
			ast: this.original_ast,

code-red

code-red

MIT
Latest version published 8 months ago

Package Health Score

59 / 100
Full package analysis

Popular code-red functions