The compile script here lets you use npm run-script compile to 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.
Configuring Projectz
Data Files
Projectz helps you maintain the following data 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.
Each file can serve as the master meta data file, however you can also define a projectz.csonCSON file that you can use if you'd like to have the benefit of comments, optional commas, multiline strings, etc for your primary meta data file.
The special fields are as so:
{ # Project's human readable name title: "Projectz", # Project name name: "projectz", # Project's Website URL homepage: "https://github.com/bevry/projectz", # 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", # Project description description: "Stop wasting time syncing and updating your project's README and Package Files!", # Project's SPDX License # Uses https://www.npmjs.com/packages/spdx for parsing license: "MIT", # 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
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 the information from the sponsors field, as well as any funding badges
<!-- 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 -->## UsageUsage instructions go here<!-- HISTORY --><!-- CONTRIBUTE --><!-- BACKERS --><!-- LICENSE -->