GithubHelp home page GithubHelp logo

danger / generator-danger-plugin Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 3.0 101 KB

Yeoman generator to generate a Danger plugin

License: MIT License

JavaScript 92.39% TypeScript 7.61%
yeoman yeoman-generator danger danger-plugin danger-js

generator-danger-plugin's Introduction

generator-danger-plugin

Build Status npm version semantic-release Greenkeeper badge

Yeoman generator to generate a Danger plugin

Usage

Install yo, this generator, and semantic-release-cli:

$ npm i -g yo generator-danger-plugin semantic-release-cli

Run the generator and follow the prompts to create a Danger plugin:

$ yo danger-plugin

This will create a new directory ready for Danger plugin development with the following technologies:

Once the directory is bootstrapped and dependencies are installed (with Yarn or NPM), this generator will also globally install semantic-release-cli and kick off that setup process for you.

Changelog

See the GitHub release history.

License, Contributor's Guidelines and Code of Conduct

See CONTRIBUTING.md for more information about contributing to this project.

We try to keep as much discussion as possible in GitHub issues, but also have a pretty inactive Slack -- if you'd like an invite, ping @Orta a DM on Twitter with your email. It's mostly interesting if you want to stay on top of Danger without all the emails from GitHub.

This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs.

This project subscribes to the Moya Contributors Guidelines which TLDR: means we give out push access easily and often.

Contributors subscribe to the Contributor Code of Conduct based on the Contributor Covenant version 1.3.0.

generator-danger-plugin's People

Contributors

glensc avatar greenkeeper[bot] avatar macklinu avatar orta avatar rohit-gohri avatar toshiya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

orta seanpm2001

generator-danger-plugin's Issues

Fix creation script, update release script and upgrade dependencies

Hi, I'm trying to create a new Danger JS plugin, but when running this generator, I get this error at the end:

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: write after end
    at writeAfterEnd (_stream_writable.js:236:12)
    at Transform.Writable.write (_stream_writable.js:287:5)

Files and folders are created, but maybe something will be missing?

Might be due to something wrong in my local environment (I'm running node 8.11.2 and npm 5.10.0), but I noticed the project hasn't been updated for a long time, so maybe it's due to being a bit outdated πŸ˜…

Also, after running npm install (I've selected to build the npm version without TypeScript) I get this warnings:

npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

Finally, I've also seen that the dependencies installed are a bit outdated, so it would be nice to upgrade to the latest versions :-P

Could you look into those issues? πŸ˜‡

Many thanks,
Sogame

Add option to add keywords

Each Danger plugin has "danger" and "danger-plugin" as keywords in package.json. It would be nice to give the user an option to add more keywords.

In order to do this:

  • read the template package.json
  • use something like deep-extend or _.assignIn to concat user-supplied keywords
  • write the new package.json file to the destination path

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Publish package from dangersystems npm account

Right now, each fix or feat commit merged to master will ship a new version of this plugin (per semantic-release). The npm package is published under my name. I've added dangersystems and orta as collaborators, though.

@orta is there anything we should do to change ownership on npm? Do we just need to swap my NPM_TOKEN in the Travis build settings with dangersystems NPM_TOKEN, or is this dangerous territory?

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Illogical sentence

Pretty sure I choose the name danger-yarn which I think this interpreted to be a case of you must have "danger-plugin" in your name.

Your generator must be inside a folder named danger-plugin-danger-yarn

Add code documentation

Since this is open-sourced (and also for future me who will likely forget how things work πŸ˜… ), it would be nice to add ESDoc for files in the repo while it's still fresh in my mind.

Make semantic-release an option

This generator is pretty specific to my personal workflow, so it might be nice to make semantic-release integration an option.

As part of this option, though, it would be cool that once all dependencies are installed, the generator will cd into the newly created directory and run semantic-release-cli setup as the final step.

Add Dangerfile

  • Setup Travis with a DANGER_GITHUB_API_TOKEN used in the danger/danger-js repository
  • Create a simple Dangerfile (TypeScript preferably ❀️)
    • The Dangerfile should validate each commit message, similar to how RxJs does it
  • Update .travis.yml to include yarn run danger

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.