Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Improve lookup of stuff #1

Description

@jstcki

Currently packup can be run in one of three ways:

  • packup (looks for an index.js in the current directory, uses that as entry file)
  • packup somedir (looks for an index.js in the somedir, uses that as entry file)
  • packup somedir/somefile.js (uses this file as entry file)

The directory of the entry file is also set as webpack resolve.root and contentBase.

Additionally, it looks for a package.json and an index.html in the directory of the entry file and uses those if available. Otherwise it supplies dummy package info (only used for populating the index.html template) and uses its own index.html template file.

The problem is, that in our current setup package.json and index.html most often are not located in the same directory as the entry file. The actual code is in another directory, most often src. So we would either need another way to resolve the locations of necessary files outside this directory (e.g. using node-resolve) or allow other configuration options for packup. I prefer the former, although we may restrict lookup to only one level above the root directory.

Edit: Not sure if node-resolve would work as I expected

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions