Package json:
|
Attribute
|
Description
|
Example
|
name
|
name of the package
|
"name": "umg-open-day"
|
version
|
current package version
|
"version": "1.0.1"
|
description
|
package description
|
"description": "Project for umg open day 2020"
|
main
|
exported babeled file
|
"main": "index.js"
|
author
|
author of the package
|
"author": "Tomasz Muchowski, Jakub Przybylski, Albert Zawadzki"
|
license
|
type of license which allows to use this package
|
"license": "BeerWare"
|
repository
|
repository with packages code
|
"repository": {
"type": "git",
"url": "https://github.com/AlbertZawadzki/umg-open-day"
}
|
keywords
|
helps package to be easier to find
|
"keywords": [
"umg",
"gdynia",
"maritime",
"university",
"project"
]
|
homepage
|
homepage of the package
|
"homepage": "https://github.com/AlbertZawadzki/umg-open-day"
|
bugs
|
link to report packages vulnerabity
|
"bugs": {
"url": "https://github.com/AlbertZawadzki/umg-open-day/issues"
}
|
scripts
|
you can add there tests, dev mode commands.
The most important command is build - it compiles your code from ES6+ to clear ES5. Instead folderWithComponents put your folder with ready components.
|
"scripts": {
"build": "./node_modules/.bin/babel folderWithComponents --out-file index.js"
}
|