How to use the @swim/codec.OutputStyle.redBold 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-js / swim-core-js / @swim / build / main / Build.ts View on Github external
if (targetId) { // :
            const target = project.targets[targetId];
            if (target) {
              target.selected = true;
              targets = target.transitiveDeps(targets);
            }
          } else { // (:?)
            for (let j = 0; j < project.targetList.length; j += 1) {
              const target = project.targetList[j];
              target.selected = true;
              targets = target.transitiveDeps(targets);
            }
          }
        } else {
          const output = Unicode.stringOutput(OutputSettings.styled());
          OutputStyle.redBold(output);
          output.write("unknown project");
          OutputStyle.reset(output);
          output.write(" ");
          OutputStyle.yellow(output);
          output.write(projectId);
          OutputStyle.reset(output);
          console.log(output.bind());
        }
      } else if (targetId) { // :
        for (let j = 0; j < this.projectList.length; j += 1) {
          const target = this.projectList[j].targets[targetId];
          if (target) {
            target.selected = true;
            targets = target.transitiveDeps(targets);
          }
        }
github swimos / swim / swim-js / swim-core-js / @swim / build / main / Build.ts View on Github external
specifiers = Object.keys(this.projects);
    } else if (typeof specifiers === "string") {
      specifiers = specifiers.split(",");
    }
    if (i < specifiers.length) {
      const specifier = specifiers[i];
      const [projectId] = specifier.split(":");
      const project = this.projects[projectId];
      if (project) {
        const result = callback(project);
        if (result) {
          return result.then(this.forEachProject.bind(this, specifiers, callback, i + 1));
        }
      } else {
        const output = Unicode.stringOutput(OutputSettings.styled());
        OutputStyle.redBold(output);
        output.write("unknown project");
        OutputStyle.reset(output);
        output.write(" ");
        OutputStyle.yellow(output);
        output.write(projectId);
        OutputStyle.reset(output);
        console.log(output.bind());
      }
      return Promise.resolve(void 0).then(this.forEachProject.bind(this, specifiers, callback, i + 1));
    } else {
      return Promise.resolve(void 0);
    }
  }
github swimos / swim / swim-system-js / swim-core-js / @swim / build / main / Target.ts View on Github external
protected onCompileFailure() {
    this.compileStart = 0;
    const output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.redBold(output);
    output.write("failed to compile");
    OutputStyle.reset(output);
    output.write(" ");
    OutputStyle.yellow(output);
    output.write(this.uid);
    OutputStyle.reset(output);
    console.log(output.bind());
    console.log();
  }
github swimos / swim / swim-system-js / swim-core-js / @swim / build / main / Target.ts View on Github external
protected onMinifyError(error: Error): void {
    const output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.redBold(output);
    output.write("error:");
    OutputStyle.reset(output);
    output.write(" ");
    output.write(error.message);
    console.log(output.bind());
    console.log();
  }
github swimos / swim / swim-js / swim-core-js / @swim / build / main / Target.ts View on Github external
protected onBundleError(error: Error): void {
    let output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.redBold(output);
    output.write("error:");
    OutputStyle.reset(output);
    output.write(" ");
    output.write(error.message);
    console.log(output.bind());
    console.log();

    output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.redBold(output);
    output.write("failed to bundle");
    OutputStyle.reset(output);
    output.write(" ");
    OutputStyle.yellow(output);
    output.write(this.uid);
    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 onBundleError(error: Error): void {
    let output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.redBold(output);
    output.write("error:");
    OutputStyle.reset(output);
    output.write(" ");
    output.write(error.message);
    console.log(output.bind());
    console.log();

    output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.redBold(output);
    output.write("failed to bundle");
    OutputStyle.reset(output);
    output.write(" ");
    OutputStyle.yellow(output);
    output.write(this.uid);
    OutputStyle.reset(output);
    console.log(output.bind());
  }
github swimos / swim / swim-js / swim-core-js / @swim / build / main / Target.ts View on Github external
protected onBundleError(error: Error): void {
    let output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.redBold(output);
    output.write("error:");
    OutputStyle.reset(output);
    output.write(" ");
    output.write(error.message);
    console.log(output.bind());
    console.log();

    output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.redBold(output);
    output.write("failed to bundle");
    OutputStyle.reset(output);
    output.write(" ");
    OutputStyle.yellow(output);
    output.write(this.uid);
    OutputStyle.reset(output);
    console.log(output.bind());
github swimos / swim / swim-js / swim-core-js / @swim / build / main / Target.ts View on Github external
protected onCompileFailure() {
    this.compileStart = 0;
    const output = Unicode.stringOutput(OutputSettings.styled());
    OutputStyle.redBold(output);
    output.write("failed to compile");
    OutputStyle.reset(output);
    output.write(" ");
    OutputStyle.yellow(output);
    output.write(this.uid);
    OutputStyle.reset(output);
    console.log(output.bind());
    console.log();
  }