How to use the @parcel/logger.success function in @parcel/logger

To help you get started, we’ve selected a few @parcel/logger 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 parcel-bundler / parcel / packages / core / parcel-bundler / src / Bundler.js View on Github external
}

      logger.progress(`Packaging...`);

      // Package everything up
      this.bundleHashes = await this.mainBundle.package(
        this,
        bundlesChanged ? null : this.bundleHashes,
      );

      // Unload any orphaned assets
      this.unloadOrphanedAssets();

      let buildTime = Date.now() - startTime;
      let time = prettifyTime(buildTime);
      logger.success(`Built in ${time}.`);
      if (!this.watcher) {
        bundleReport(this.mainBundle, this.options.detailedReport);
      }

      this.emit('bundled', this.mainBundle);
      return this.mainBundle;
    } catch (err) {
      this.error = err;

      logger.error(err);

      this.emit('buildError', err);

      if (this.hmr) {
        this.hmr.emitError(err);
      }
github parcel-bundler / parcel / src / core / core / src / Bundler.js View on Github external
}

      logger.progress(`Packaging...`);

      // Package everything up
      this.bundleHashes = await this.mainBundle.package(
        this,
        this.bundleHashes
      );

      // Unload any orphaned assets
      this.unloadOrphanedAssets();

      let buildTime = Date.now() - startTime;
      let time = prettifyTime(buildTime);
      logger.success(`Built in ${time}.`);
      if (!this.watcher) {
        bundleReport(this.mainBundle, this.options.detailedReport);
      }

      this.emit('bundled', this.mainBundle);
      return this.mainBundle;
    } catch (err) {
      this.error = err;

      logger.error(err);
      this.emit('buildError', err);

      if (this.hmr) {
        this.hmr.emitError(err);
      }
github 101arrowz / pwa-manifest / packages / parcel-plugin-pwa-manifest / index.ts View on Github external
if (ind === -1) {
        const htmlInd = origHTML.search(htmlSearch);
        if (htmlInd === -1) {
          throw 'HTML file for link injection is invalid.';
        }
        origHTML = `${origHTML.slice(0, htmlInd)}<title>${
          generator.manifest.name
        }</title>${html}${origHTML.slice(htmlInd)}`;
      } else {
        origHTML = `${origHTML.slice(0, ind)}${html}${origHTML
          .slice(ind)
          .replace(oldInjectionSearch, '')}`;
      }
      writeFileSync(filename, origHTML);
    }
    logger.success('Manifest creation successful.');
    bundler.emit('pwaBuildEnd');
  };
  bundler.on('bundled', async bundle =&gt; {