Giter VIP home page Giter VIP logo

credits-generator's Introduction

credits-generator

Takes in package.json and outputs a CREDITS.md file attributing the authors of your dependencies

Usage

  1. npx @opengovsg/credits-generator from your node project
  2. CREDITS.md generated!

An example is in this project's own package.json and CREDITS.md.

Motivation

Use of open-source software is often governed by the terms of their licenses. Such terms often include the obligation to provide some form of acknowledgement of use, along with the full text of the license. This practice is strongly recommended at several organisations, including the Government Technology Agency of Singapore.

This tool was hence created to make it convenient to attribute authors of dependencies in the node.js projects that we publish. As beneficiaries of open-source software, we want to provide due recognition to those authors, and hope that others would do so too.

More information on this topic can be found in this excellent article found at nexB

Limitations

Currently, this tool is only capable of retrieving LICENSE files from GitHub repositories. This may be problematic for dependencies hosted elsewhere, or license files with non-standard names.

Contributing

We welcome contributions to code open-sourced by the Government Technology Agency of Singapore. All contributors will be asked to sign a Contributor License Agreement (CLA) in order to ensure that everybody is free to use their contributions.

credits-generator's People

Contributors

dependabot[bot] avatar leonardloo avatar liangyuanruo avatar lonerifle avatar rjchow avatar sebastianwzq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

credits-generator's Issues

Known issue: Temporary fix

Describe the bug
A clear and concise description of what the bug is.

  • e404 calls once you run npx @opengovsg/credits-generator (screenshot below)

image

Temporary fix (first suggested by Jie Hao)
first run npm logout --scope=@opengovsg --registry=https://npm.pkg.github.com/
then run npx @opengovsg/credits-generator

fail to generate CREDITS.md due to missing raw-url

Describe the bug
A clear and concise description of what the bug is.
I believe github has updated their site to not have an element with id=raw-url and thus extracting the raw link to the license file is throwing an exception

failure at: https://github.com/opengovsg/credits-generator/blob/master/index.js#L84C8-L84C80

To Reproduce
Steps to reproduce the behavior:

  1. run npm run start

Expected behavior
A clear and concise description of what you expected to happen.
CREDITS.md should be generated successfully

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

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.