How to use the @swim/codec.OutputStyle.greenBold function in @swim/codec

To help you get started, we’ve selected a few @swim/codec 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 swimos / swim / swim-system-js / swim-core-js / @swim / build / main / Target.ts View on Github external
protected onCompileResult(status: ts.Diagnostic) {
    if (this.canCompile()) {
      if (status.code === 6031) {
        // watching
        this.failed = false;
        this.compileStart = Date.now();
      } else if (status.code === 6032) {
        // change detected
        this.failed = false;
        this.compileStart = Date.now();
        const output = Unicode.stringOutput(OutputSettings.styled());
        OutputStyle.greenBold(output);
        output.write("recompiling");
        OutputStyle.reset(output);
        output.write(" ");
        OutputStyle.yellow(output);
        output.write(this.uid);
        OutputStyle.reset(output);
        console.log(output.bind());
      } else if (status.code === 6194) {
        // complete
        if (!this.failed) {
          this.lint();
        }
        this.emittedSourceFiles.length = 0;
        if (!this.failed) {
          this.onCompileSuccess();
          if (this.selected) {
github swimos / swim / swim-js / swim-core-js / @swim / build / main / Project.ts View on Github external
clean(): void {
    for (let i = 0; i < this.cleanDirs.length; i += 1) {
      const cleanDir = path.resolve(this.baseDir, this.cleanDirs[i]);
      const output = Unicode.stringOutput(OutputSettings.styled());
      OutputStyle.greenBold(output);
      output.write("deleting");
      OutputStyle.reset(output);
      output.write(" ");
      output.write(cleanDir);
      console.log(output.bind());
      Project.rmdir(cleanDir);
    }
  }
github swimos / swim / swim-system-js / swim-core-js / @swim / build / main / Project.ts View on Github external
clean(): void {
    this.cleanTargets();
    for (let i = 0; i < this.cleanDirs.length; i += 1) {
      const cleanDir = path.resolve(this.baseDir, this.cleanDirs[i]);
      const output = Unicode.stringOutput(OutputSettings.styled());
      OutputStyle.greenBold(output);
      output.write("deleting");
      OutputStyle.reset(output);
      output.write(" ");
      output.write(cleanDir);
      console.log(output.bind());
      Project.rmdir(cleanDir);
    }
  }
github swimos / swim / swim-system-js / swim-core-js / @swim / build / main / Target.ts View on Github external
}

    const docTarget = doc.converter.getComponent("doc-target");
    if (docTarget instanceof DocTarget) {
      docTarget.target = this;
      docTarget.fileTargetMap = fileTargetMap;
    }

    const t0 = Date.now();
    const project = doc.convert(fileNames);
    if (project) {
      doc.generateDocs(project, outDir);
      const dt = Date.now() - t0;

      output = Unicode.stringOutput(OutputSettings.styled());
      OutputStyle.greenBold(output);
      output.write("documented");
      OutputStyle.reset(output);
      output.write(" ");
      OutputStyle.yellow(output);
      output.write(this.uid);
      OutputStyle.reset(output);
      output.write(" in ");
      output.debug(dt);
      output.write("ms");
      console.log(output.bind());
      console.log();
      return Promise.resolve();
    } else {
      const output = Unicode.stringOutput(OutputSettings.styled());
      OutputStyle.redBold(output);
      output.write("failed to document");
github swimos / swim / swim-js / swim-core-js / @swim / build / main / Target.ts View on Github external
bundle(): Promise {
    this.cancelBundle();
    this.bundleTimer = -1;

    const output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.greenBold(output);
    output.write("bundling");
    OutputStyle.reset(output);
    output.write(" ");
    OutputStyle.yellow(output);
    output.write(this.uid);
    OutputStyle.reset(output);
    console.log(output.bind());

    const bundleConfig = this.project.bundleConfig[this.id] as rollup.RollupOptions | undefined;
    if (bundleConfig) {
      const t0 = Date.now();
      const cwd = process.cwd();
      process.chdir(this.project.baseDir);
      return rollup.rollup(bundleConfig)
        .then((build: rollup.RollupBuild): Promise => {
          process.chdir(cwd);
github swimos / swim / swim-js / swim-core-js / @swim / build / main / Target.ts View on Github external
OutputStyle.redBold(output);
            output.write("failed to test");
            OutputStyle.reset(output);
            output.write(" ");
            OutputStyle.yellow(output);
            output.write(this.uid);
            OutputStyle.reset(output);
            console.log(output.bind());
            console.log();
          }
          resolve(0);
        });
      });
    } else {
      const output = Unicode.stringOutput(OutputSettings.styled());
      OutputStyle.greenBold(output);
      output.write("untested");
      OutputStyle.reset(output);
      output.write(" ");
      OutputStyle.yellow(output);
      output.write(this.uid);
      OutputStyle.reset(output);
      console.log(output.bind());
      console.log();
      return Promise.resolve(0);
    }
  }
github swimos / swim / swim-system-js / swim-core-js / @swim / build / main / Target.ts View on Github external
compile(): Promise {
    if (this.canCompile()) {
      const output = Unicode.stringOutput(OutputSettings.styled());
      OutputStyle.greenBold(output);
      output.write("compiling");
      OutputStyle.reset(output);
      output.write(" ");
      OutputStyle.yellow(output);
      output.write(this.uid);
      OutputStyle.reset(output);
      console.log(output.bind());

      const configPath = ts.findConfigFile(this.baseDir, ts.sys.fileExists, "tsconfig.json");
      const commandLine = ts.getParsedCommandLineOfConfigFile(configPath!, this.compilerOptions, ts.sys as any)!;
      const projectReferences = this.injectProjectReferences(commandLine.projectReferences, commandLine.options);
      this.injectCompilerOptions(commandLine.options);

      const incrementalProgram = ts.createIncrementalProgram({
        rootNames: commandLine.fileNames,
        options: commandLine.options,
github swimos / swim / swim-system-js / swim-core-js / @swim / build / main / Build.ts View on Github external
printProjects(): void {
    const output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.greenBold(output);
    output.write("projects");
    OutputStyle.reset(output);
    console.log(output.bind());
    for (let i = 0; i < this.projectList.length; i += 1) {
      const project = this.projectList[i];
      const output = Unicode.stringOutput(OutputSettings.styled());
      output.write(" - ");
      OutputStyle.yellow(output);
      output.write(project.id);
      OutputStyle.reset(output);
      console.log(output.bind());
    }
  }
github swimos / swim / swim-system-js / swim-core-js / @swim / build / main / Target.ts View on Github external
protected onCompileSuccess() {
    const dt = Date.now() - this.compileStart;
    this.compileStart = 0;
    const output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.greenBold(output);
    output.write("compiled");
    OutputStyle.reset(output);
    output.write(" ");
    OutputStyle.yellow(output);
    output.write(this.uid);
    OutputStyle.reset(output);
    output.write(" in ");
    output.debug(dt);
    output.write("ms");
    console.log(output.bind());
    console.log();
  }
github swimos / swim / swim-js / swim-core-js / @swim / build / main / Target.ts View on Github external
}

    const docTarget = doc.converter.getComponent("doc-target");
    if (docTarget instanceof DocTarget) {
      docTarget.target = this;
      docTarget.fileTargetMap = fileTargetMap;
    }

    const t0 = Date.now();
    const project = doc.convert(fileNames);
    if (project) {
      doc.generateDocs(project, outDir);
      const dt = Date.now() - t0;

      output = Unicode.stringOutput(OutputSettings.styled());
      OutputStyle.greenBold(output);
      output.write("documented");
      OutputStyle.reset(output);
      output.write(" ");
      OutputStyle.yellow(output);
      output.write(this.uid);
      OutputStyle.reset(output);
      output.write(" in ");
      output.debug(dt);
      output.write("ms");
      console.log(output.bind());
      console.log();
      return Promise.resolve();
    } else {
      const output = Unicode.stringOutput(OutputSettings.styled());
      OutputStyle.redBold(output);
      output.write("failed to document");