Skip to content

Building create-pkg #404

Closed
Closed

Description

@darcyclarke

EDIT by @boneskull: This issue has been moved to pkgjs/create-pkg#9; please comment there

Recently, I was able to transfer the ownership of the create-pkg package over to the @pkgjs org on npmjs.com. The hope here is that this namespace/package can serve as tooling to scaffold new projects with whatever defaults this group wants to define & be unblocked by npm-specific defaults in npm init.

@wesleytodd @ruyadorno & I got together the other day to discuss this a bit more & here's some of the notes from that discussion:

Note: We'd love input & to have a broader discussion about how/what we could build

create-pkg

Goals:

  1. Provide a tool that promotes sane package defaults (defined by PMWG)
  2. Provide tools to extend defaults per community/team

Example Usage:

$ npm init pkg
$ npx create-pkg
const pkg = require('create-pkg')
import pkg from 'create-pkg'

Questions:

  1. What do we want the scaffold output to include?
    • package.json
      • name
      • description
      • homepage
      • author
      • license
      • funding
      • version
      • type
      • main
      • scripts
        • "prepublish": "..."* (contentious)
        • "test": "..."* (contentious)
      • exports
    • index.js
    • LICENSE
    • CONTRIBUTING.md
    • CODE_OF_CONDUCT.md
    • README.md
    • FUNDING.yml* (contentious)
    • .npmrc* (contentious)
    • .gitignore* (contentious)
      • Contents: /node_modules
    • .github/ISSUE_TEMPLATES/** (contentious)
  2. What API surface do we want to expose to both end users and folks who want to compose the base generator with their own custom opinions?
    • Interfaces: CLI w/ Interactive/Prompts & a JS API

Next Steps:

  • Get some general consensus of the approach we'd like to take building this & the defaults we'd want
  • Update @pkgjs/support to be a consumer of this tool or vice-versa

References & Prior Art:

Activity

  1. mhdawson commented on Sep 8, 2020

    @mhdawson
    Member

    In meeting was mentioned that

    CONTRIBUTORS.md

    should be

    CONTRIBUTING.md

  2. Christian24 commented on Sep 9, 2020

    @Christian24

    I hope this is the correct place to post this: Since npm v7 supports workspaces, it would be helpful to have a variant of this potentially be able to setup workspaces/monorepositories too. Maybe some inspiration can be drawn from https://github.com/lerna/lerna/tree/master/commands/init#readme. I probably cannot attend tomorrow, but since I just heard about this at the npm RFC meeting, I thought I would drop it here.

  3. wesleytodd commented on Sep 9, 2020

    @wesleytodd
    Member

    While I am not sure that would be a top priority for the first iteration, I completely agree that it should be a feature of this tool.

  4. ruyadorno commented on Sep 10, 2020

    @ruyadorno
    Member

    @wesleytodd please remember to also add me to the org 😊

  5. thescientist13 commented on Sep 10, 2020

    @thescientist13
    SponsorContributor

    Count me in to help on next steps @wesleytodd ! 👋

  6. rxmarbles commented on Sep 10, 2020

    @rxmarbles
    Contributor

    @wesleytodd ditto for me as well

  7. rodion-arr commented on Sep 10, 2020

    @rodion-arr
    Contributor

    Will be happy to help here

  8. wesleytodd commented on Oct 6, 2020

    @wesleytodd
    Member

    This one is waiting on me, I have I think all of the code on my machine, just need to run through it and push. Sorry for the delay, I will try to get to it this week.

  9. boneskull commented on Oct 15, 2020

    @boneskull
    Member

    I'm looking for some more context on this. @darcyclarke describes what the package is intended to do, but does not describe what lead the team to want to build this.

  10. boneskull commented on Oct 20, 2020

    @boneskull
    Member

    For scripts.test, I like "echo \"Error: no test specified\" && exit 1" 😄

  11. mhdawson commented on Dec 1, 2020

    @mhdawson
    Member

    @wesleytodd any chance you could just push what you have, warts and all ?

  12. wesleytodd commented on Dec 17, 2020

    @wesleytodd
    Member

    After pushing I noticed a few things wrong with what I pushed, but here is the start: https://github.com/pkgjs/create

  13. self-assigned this
    on Jan 12, 2021
  14. boneskull commented on Jan 12, 2021

    @boneskull
    Member

    @boneskull move this list into pkgjs/create repo

  15. boneskull commented on Jan 12, 2021

    @boneskull
    Member

    @wesleytodd your friendly 🙂😁😄😜 reminder to move create-package-json etc. into pkgjs org

  16. boneskull commented on Jan 12, 2021

    @boneskull
    Member

    Closing in lieu of pkgjs/create-pkg#9

    To anyone who wants to help move this forward, please see that issue/repo.

  17. boneskull commented on Jan 12, 2021

    @boneskull
    Member

    Maybe we should keep this open as a "tracking" issue for package-maintenance-agenda? IDK. It should still probably stay on the agenda... new issue?

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions