docs: async function getPkgInfo(pkgName) {
    if (typeof pkgName === 'object') {
      const info = {
        name: pkgName.name,
        basicName: pkgName.name,
        assets: {},
      };
      if (pkgName.scss) {
        info.assets.style = pkgName.scss;
        info.dir = path.dirname(pkgName.scss);
        ensureFileExists(pkgName.scss);
      }
      if (pkgName.js) {
        info.assets.main = pkgName.js;
        // yeah I know we're overwriting `dir`... got to have something though... and it's only used by PL to watch Twig
        info.dir = path.dirname(pkgName.js);
        ensureFileExists(pkgName.js);
      }
      return info;
    }
  
    if (pkgName.endsWith('.scss') || pkgName.endsWith('.js')) {
      const pathInfo = path.parse(pkgName);
      const name = pathInfo.name + pathInfo.ext.replace('.', '-');
      const info = {
        name,
        basicName: name,
        dir: path.dirname(pkgName),
        assets: {},
      };
      if (pkgName.endsWith('.scss')) {
        info.assets.style = pkgName;
      }
      if (pkgName.endsWith('.js')) {
        info.assets.main = pkgName;
      }
      ensureFileExists(pkgName);
      return info;
    } else {
      // package name
      const pkgJsonPath = require.resolve(`${pkgName}/package.json`);
      const dir = path.dirname(pkgJsonPath);
      const pkg = require(pkgJsonPath);
  
      const info = {
        name: pkg.name,
        basicName: pkg.name.replace('@bolt/', 'bolt-'),
        dir,
        assets: {},
        deps: [],
      };
  
      if (pkg.peerDependencies) {
        for (dependencyPackageName in pkg.peerDependencies) {
          if (dependencyPackageName.includes('bolt')) {
            info.deps.push(dependencyPackageName);
          }
        }
      }
  
      if (pkg.dependencies) {
        for (dependencyPackageName in pkg.dependencies) {
          if (dependencyPackageName.includes('bolt')) {
            info.deps.push(dependencyPackageName);
          }
        }
      }
  
      info.twigNamespace = `@${info.basicName}`;
      if (pkg.style) {
        info.assets.style = path.join(dir, pkg.style);
        ensureFileExists(info.assets.style);
      }
      if (pkg.main) {
        info.assets.main = path.join(dir, pkg.main);
        ensureFileExists(info.assets.main);
      }
      if (pkg.schema) {
        if (typeof pkg.schema === 'object') {
          if (info.schema === undefined) {
            info.schema = [];
          }
  
          const schemas = pkg.schema;
  
          for (const schemaPath of schemas) {
            const schemaFilePath = path.join(dir, schemaPath);
            // eslint-disable-next-line
            const schema = await getDataFile(schemaFilePath);
            validateSchemaSchema(
              schema,
              `Schema not valid for: ${schemaFilePath}`,
            );
            const schemaMachineName = schema.title
              .replace(/ /g, '-')
              .toLowerCase();
  
            info.schema[schemaMachineName] = schema;
          }
        } else {
          const schemaFilePath = path.join(dir, pkg.schema);
          const schema = await getDataFile(schemaFilePath);
          validateSchemaSchema(schema, `Schema not valid for: ${schemaFilePath}`);
          info.schema = schema;
        }
      }
      // @todo Allow verbosity settings
      // console.log(assets);
      return info;
    }
  }