Giter Club home page Giter Club logo

new-repo-instructions's Introduction

Instructions for creating a new repo

What is this?

https://medium.com/@joeldenning/an-esm-bundle-for-any-npm-package-5f850db0e04d

Okay how do I do it

You need to install pnpm.

  1. Create a github issue, following the template
  2. Make sure you know the name of the Github repo that you will create. This should be exactly the same as the package name on npm. If the package has an npm scope (@), use the syntax used by DefinitelyTyped (__) to name the package. Do not put @ in the repo name.
  3. An esm-bundle maintainer will create a new repository for your package, by using the Github template repository https://github.com/esm-bundle/autopublish-template. This is done by going there and clicking on "Use this template." Make sure to create the new repo under the esm-bundle organization instead of your personal Github
  4. Fork the repo. Clone your fork.
  5. Ensure you are using node@>=13.2.0. You can check by doing node --version. If you use nvm, you can switch to the correct version of node via nvm use
  6. pnpm install
  7. pnpm uninstall autopublish-template
  8. pnpm install --dev name-of-your-repo
  9. Find and replace all instances of autopublish-template with name-of-your-repo
  10. Find and replace all instances of index.js with the desired name of the output file
    • It is encouraged to match the upstream package's output and naming convention for its UMD bundles
  11. Modify the Readme to point to the correct "upstream repo"
  12. Modify the version in the package.json to 0.0.0-unpublished.0 in order to trigger release-it plugin on first merge
  13. Modify description in package.json
  14. Modify rollup config however is needed. Run pnpm run build to test that the build works
  15. Modify tests until pnpm run test:unit and pnpm run test:browser both work
  16. If you are publishing multiple files, link to them in the readme
  17. Add a github branch protection rule for the master branch. This is required by Kodiak. You should protect the master branch by requiring a pull request approval and successful CI before merges. See picture below for what that configuration looks like.
  18. Push a branch to your fork. Create a pull request. Tag @joeldenning or another maintainer of esm-bundle, to ensure they get a notification to review the pull request. They will merge the PR which will cause the first version to be published. From then on, new versions will be automatically published.

Protecting the main branch

image

new-repo-instructions's People

Contributors

joeldenning avatar filoxo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.