Code Monkey home page Code Monkey logo

projectz's Introduction

Projectz

Status of the GitHub Workflow: bevry NPM version NPM downloads
GitHub Sponsors donate button ThanksDev donate button Patreon donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button
Discord server badge Twitch community badge

Stop wasting time syncing and updating your project's README and Package Files!

This far, projectz is used directly by 1062 repositories and 421 packages, and indirectly by 2989 repositories and 349 packages.

Watch the talk.

Here's some of the things it can do:

Running Projectz

Directly

Once installed locally, you can compile your project using projectz by running the following in your terminal:

npx projectz

Automatically

To make projectz more automatic, we recommended adding the direct command above to your build tool.

If you don't use a build tool, but do use npm, then you can add the following to your project's package.json file:

{
    "scripts": {
        "compile": "projectz",
        "posttest": "projectz"
    }
}

The compile script here is runnable via the command npm run-script compile and will compile your project with projectz.

The posttest script here automatically compiles your project with projectz after your tests have successfully completed, providing you use npm test to run your tests. This is a great place to put projectz as projectz only updates meta documents so won't affect your test, and will always run before a publish.

GitHub Rate Limiting

If you get a rate limit warning, you will need to add GITHUB_ACCESS_TOKEN (or a GITHUB_CLIENT_ID AND GITHUB_CLIENT_SECRET combination) to your environment. To do this:

  1. Create a personal access token for your computer at: https://github.com/settings/tokens
  2. Projectz needs the readonly/access permissions for repos and users
  3. Generate the token and copy it
  4. Inside your dotfile profile (.bashrc, .zshrc) add export GITHUB_ACCESS_TOKEN="the token value"
  5. Open a new shell, or run export GITHUB_ACCESS_TOKEN="the token value" in your current shell
  6. Run projectz again

Configuring Projectz

Package Files

Projectz helps you maintain the following package files:

  • package.json
  • bower.json
  • component.json
  • jquery.json

It does this by reading them, combining their data in memory, and then outputting the appropriate fields and over-rides for each file.

If you are making use of multiple package files, you may find defining a projectz.json package file will help, as it can serve as a central location for the configuration of all the other files. However, if you only require one package file, then you can ignore this ability.

Projectz takes notes of these meta data fields:

{
    // Specify your project's human readable name
    "title": "Projectz",

    // Specify your project name
    "name": "projectz",

    // Specify your project's Website URL
    "homepage": "https://github.com/bevry/projectz",

    // Specify your project's demo URL
    // If this is missing, and `homepage` is set, we set it to the `homepage` value
    "demo": "https://github.com/bevry/projectz",

    // Specify your project description
    "description": "Stop wasting time syncing and updating your project's README and Package Files!",

    // Specify your project's SPDX License
    // Uses https://www.npmjs.com/packages/spdx for parsing
    "license": "MIT",

    // Specify your whether the project can run on the client-side in web browsers
    // If this is missing, and the component or bower package files exist, then this becomes `true`
    "browsers": true,

    // Specify your project's author details
    // Can be an array or CSV string
    "author": "2013+ Bevry Pty Ltd <[email protected]> (http://bevry.me)",

    // Specify your maintainers
    "maintainers": [
        "Benjamin Lupton ([email protected]) (http://balupton.com)"
    ],

    // Specify your sponsors
    "sponsors": [
        "Benjamin Lupton ([email protected]) (http://balupton.com)"
    ],

    // Specify your contributors
    // This is automatically combined with the contributors from the GitHub Repository API
    "contributors": [
        "Benjamin Lupton ([email protected]) (http://balupton.com)"
    ],

    // Specify your project's repository details
    // If this is missing, and `homepage` is a GitHub URL, this determined automatically
    "repository": {
        "type": "git",
        "url": "https://github.com/bevry/projectz.git"
    },

    // Specify your project's issue tracker
    // If this is missing, and `repository` is a GitHub repository, this determined automatically
    "bugs": {
        "url": "https://github.com/bevry/projectz/issues"
    },

    // Specify your project's badges for use in the readme files
    // Projectz renders badges by sending the `badges` field to the `badges` package.
    // Below is some sample projectz configuration for this field to render our most common badges.
    // Even more badge types and configurations are available than just those included below.
    // Complete details of what is available can be found over at the badges package:
    // https://github.com/bevry/badges
    "badges": {
        "list": [
            "travisci",
            "npmversion",
            "npmdownloads",
            "daviddm",
            "daviddmdev",
            "---",
            "slackin",
            "patreon",
            "gratipay",
            "flattr",
            "paypal",
            "bitcoin",
            "wishlist"
        ],
        "config": {
            "patreonUsername": "bevry",
            "gratipayUsername": "bevry",
            "flattrUsername": "balupton",
            "paypalURL": "https://bevry.me/paypal",
            "bitcoinURL": "https://bevry.me/bitcoin",
            "wishlistURL": "https://bevry.me/wishlist",
            "slackinURL": "https://slack.bevry.me"
        }
    },

  // If you are using the projectz meta file, you can also define this field
  // it allows you to set the configuration for other package systems
  "packages": {
    "bower": {},
    "component": {},
    "jquery": {}
  }
}

Readme Files

Projectz helps you maintain the following readme files:

  • README.md
  • CONTRIBUTING.md
  • LICENSE.md
  • BACKERS.md
  • HISTORY.md

It does this by reading them, and replacing comment tags with the appropriate data.

The following comment tags are supported:

  • <!-- TITLE --> — outputs the package's title field
  • <!-- BADGES --> — outputs the badges you have enabled from your package's badges field
  • <!-- DESCRIPTION --> — outputs the package's description field
  • <!-- INSTALL --> — outputs the package's installation instructions
  • <!-- HISTORY --> — outputs a link to the HISTORY file if it exists, otherwise if it is a Github repository, outputs a link to the releases page
  • <!-- CONTRIBUTE --> — outputs a link to the CONTRIBUTE file if it exists
  • <!-- BACKERS --> — outputs who the backers are for the project, including maintainers, sponsors, funding badges, and contributors
  • <!-- LICENSE --> — outputs a summary of the license information

As well as these comment tags for updating entire files:

  • <!-- LICENSEFILE --> — outputs the complete license information
  • <!-- BACKERSFILE --> — same as <!-- BACKERS --> but made for an individual file instead

As an example, here is a a basic README.md file:

<!-- TITLE -->
<!-- BADGES -->
<!-- DESCRIPTION -->
<!-- INSTALL -->

## Usage

Complete API Documentation.

Usage instructions go here

<!-- HISTORY -->
<!-- CONTRIBUTE -->
<!-- BACKERS -->
<!-- LICENSE -->

This README is also, expectedly, built with projectz. View its source.

Install

Install Globally

  • Install: npm install --global projectz
  • Executable: projectz

Install Locally

  • Install: npm install --save projectz
  • Executable: npx projectz
  • Import: import * as pkg from ('projectz')
  • Require: const pkg = require('projectz')

This package is published with the following editions:

History

Discover the release history by heading on over to the HISTORY.md file.

Backers

Code

Discover how to contribute via the CONTRIBUTING.md file.

Authors

Maintainers

Contributors

Finances

GitHub Sponsors donate button ThanksDev donate button Patreon donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button

Sponsors

  • Andrew Nesbitt — Software engineer and researcher
  • Balsa — We're Balsa, and we're building tools for builders.
  • Codecov — Empower developers with tools to improve code quality and testing.
  • Poonacha Medappa
  • Rob Morris
  • Sentry — Real-time crash reporting for your web apps, mobile apps, and games.
  • Syntax — Syntax Podcast

Donors

License

Unless stated otherwise all works are:

and licensed under:

projectz's People

Contributors

balupton avatar dependabot-preview[bot] avatar dependabot[bot] avatar github-actions[bot] avatar jamesgeorge007 avatar mightyiam avatar oliverlorenz avatar peterkc avatar pflannery avatar robloach avatar vsopvsop avatar zlatanvasovic avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

projectz's Issues

Error at CSON's CoffeScript on compile

➜  mingimingi git:(master) ✗  node node_modules/projectz/bin/projectz compile
info: Initialising project
info: Initialised project
info: Loading changes
error: TypeError: undefined is not a function
  at Object.exports.eval (/home/shahar/src/mingimingi/node_modules/projectz/node_modules/cson/node_modules/coffee-script/lib/coffee-script/coffee-script.js:133:47)
  at CSON.parseSync (/home/shahar/src/mingimingi/node_modules/projectz/node_modules/cson/out/lib/cson.js:105:34)
  at ambi (/home/shahar/src/mingimingi/node_modules/projectz/node_modules/cson/node_modules/ambi/out/lib/ambi.js:57:27)
  at [object Object]._onTimeout (/home/shahar/src/mingimingi/node_modules/projectz/node_modules/cson/out/lib/cson.js:89:18)
  at Timer.listOnTimeout (timers.js:133:15)

➜  mingimingi git:(master) ✗

Malformed CSON file?

{
    title: "MingiMingi"
    name: "mingimingi"
    repo: "mightyiam/mingimingi"
    description: "Another document editor for browsers."
    keywords: [
        "document",
        "editor",
        "browser"
    ]
    author: "2014+ Shahar Or" +
        " <[email protected]>" +
        " (https://github.com/mightyiam)"
    license: "GPLv3"
    browsers: true
    badges:
        gittip: "mightyiam"
}

updating to 0.5.0 outputs {#type} in to license

Seems now projectz 0.5.0 will now only allow two license types.
Previous versions allowed us to put our own preferred license type.

Can we keep it so that we can have custom license types in the README?

Custom badges

Would be nice to be able to add custom badges like:

badges: 
  custom:
    analytics:
      text: 'Analytics'
      image: 'https://ga-beacon.appspot.com/some-ga-code/some-repo/readme'
      url: 'https://github.com/some-org-auth/some-repo'
      tooltip: 'hello'

something like the following code put into misc badges to parse these custom badges

custom = (opts) ->
  if opts == null
    opts = {}
  if !opts.badges.custom or !opts.name
    return ''
  else
    results = ''
    for key of opts.badges.custom
      customInfo = opts.badges.custom[key]
      tooltipFmtd = if customInfo.tooltip then ' "' + customInfo.tooltip + '"' else ''
      results += '[![' + customInfo.text + '](' + customInfo.image + ')](' + customInfo.url + tooltipFmtd + ')'

  results

I'll be happy to pull on this

Add interpolation

Would be cool if we could inject data properties into the readme files, something like:

<!-- #name -->

Perhaps?

The issue here is how to avoid unintended replacements.

The other issue, is who would actually use this?

Update badges for latest shields.io api

http://shields.io/ has come a long way, we should update accordingly

[npm-image]: https://img.shields.io/npm/v/serve-index.svg?style=flat
[npm-url]: https://npmjs.org/package/serve-index
[travis-image]: https://img.shields.io/travis/expressjs/serve-index.svg?style=flat
[travis-url]: https://travis-ci.org/expressjs/serve-index
[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-index.svg?style=flat
[coveralls-url]: https://coveralls.io/r/expressjs/serve-index?branch=master
[downloads-image]: https://img.shields.io/npm/dm/serve-index.svg?style=flat
[downloads-url]: https://npmjs.org/package/serve-index
[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
[gratipay-url]: https://www.gratipay.com/dougwilson/

Add EXAMPLE, SOURCE, and CODE blocks

<!-- EXAMPLE[./example.js] --> will output the file in a syntax code block, and replaces require('./') with require('the-package-name') - useful for including example code files

<!-- CODE[./input.js] --> will output the file in a syntax highlighted code block - useful for including code files

<!-- SOURCE[./output.md] --> will output the file as is, no code block wrapper - useful for including markdown and HTML files

backers: add gittip support

After a conversation with @whit537 it seems that for the backers functionality one day we could add gittip support. So that backers who have made themselves known can be listed within the backers listings of your repo.

Depends on the following from gittip (not sure what their issue #s are):

  • API for accessing backers
  • Public backers rather than anonymous

Add wzrd.in installation support

Would be great to have this listed as a direct install option

Something like:

### Direct

- Install: `//wzrd.in/bundle/[email protected]`
- Use: `require('taskgroup')`

http://requirebin.com/ could also come in handy here, as it allows you to do things like

// require something
alert(JSON.stringify(require('taskgroup/package.json')))

Maintain HISTORY.md

Automatically build and maintain HISTORY.md.

This is a tricky one, as a commit message is not a deliverable feature/bug fix. Whether or not it actually makes sense is a question yet to be ansered. What are your thoughts?

Hi Ben!

Miss yoooouuuuuu!

Watched your talk on web components. Was pretty awesome.

Rewrite in Chainy

The current infrastructure is pretty much all over the place. It's more just a proof of concept.

I'm wondering what such an architecture would look like if we rewrite it in ChainyJS.

I also wonder if this could allow plugins to extend it.

0.3.8 and 0.3.9 missing!

I must have forgotten to push them to github! Oops.

We will need to either convert the rendered javascript from the npm package back to coffeescript to figure out the changes... or hope that my laptop comes back with the hdd data intact..

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.