Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ardatan/bob-the-bundle

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ardatan/bob-the-bundle

Bob The Bundler!

  • 1.2.6
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Bob (The Bundler)

There's no documentation yet but you can check GraphQL Code Generator repository to see how to use Bob.

Requirements

  • Supports only scoped packages (same scope)
  • Yarn Workspaces
  • TypeScript with Paths
  • It's so strict you shouldn't use it!

Configuration

Bob only accepts bob.config.js in root directory:

module.exports = {
  scope: "@graphql-codegen", // Scope of organization
  ignore: ["@graphql-codegen/website", "@graphql-codegen/live-demo"], // ignored packages
  track: [
    // files in root that mark the entire workspace as dirty
    "bob.config.js", // we could include it in Bob itself but we decided to turn your life into hell :)
    "jest.config.js",
    "jest-project.js",
    "package.json",
    "tsconfig.json",
    // files in packages that mark the package as dirty
    "<project>/src/**",
    "<project>/jest.config.js",
    "<project>/package.json",
    "<project>/tsconfig.json",
  ],
  base: "origin/master", // we need to compare against something
  commands: {
    test: {
      track: ["<project>/tests/**"],
      run(affected) {
        // {
        //   paths: string[] <- ['packages/core', 'packages/cli']
        //   names: string[] <- ['@foo/core', '@foo/cli']
        // }

        // why such a weird syntax? We use spawn, so you have too
        return [`yarn`, ["test", ...affected.paths]];
      },
    },
    build: {
      run() {
        return [`yarn`, ["build"]];
      },
    },
  },
};

Build Options

In your <project>/package.json:

{
  "buildOptions": {
    "external": ["simple-git/promise"], // Marks nested imports as external
    "bin": {
      "cli": {
        "input": "src/cli.ts" // Entry point for `cli` command
      }
    }
  }
}

Support for Node ES Modules

In your <project>/package.json, just add "exports" like this:

{
  "main": "dist/index.cjs.js",
  "exports": {
    "require": "dist/index.cjs.js", // should match "main"
    "default": "dist/index.mjs" // should ends with ".mjs" extension
  }
}

Usage


$ bob affected test
$ bob affected build

$ bob build
$ bob prepack

FAQs

Package last updated on 08 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc