All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.kelvindev15.npm.PackageJsonSpec.kt Maven / Gradle / Ivy

package io.github.kelvindev15.npm

import com.uchuhimo.konf.ConfigSpec

/**
 * The specification of the package.json file.
 *
 * [name] The name of the package.
 * [version] The version of the package.
 * [description] The description of the package.
 * [keywords] The keywords of the package.
 * [homepage] The homepage of the package.
 * [bugs] The link where to report bugs from the package.
 * [license] The license of the package.
 * [author] The author of the package.
 * [main] The main file of the package.
 * [repository] The repository of the package.
 * [scripts] The scripts of the package.
 * [dependencies] The dependencies of the package.
 * [devDependencies] The dev dependencies of the package.
 * [private] Whether the package is private.
 * [type] The type of the package.
 */
object PackageJsonSpec : ConfigSpec("") {
    val name by optional(null)
    val version by optional(null)
    val description by optional(null)
    val keywords by optional?>(emptyList())
    val homepage by optional(null)
    val bugs by optional(null)
    val license by optional(null)
    val author by optional(null)
    val main by optional(null)
    val repository by optional(null)
    val scripts by optional?>(null)
    val dependencies by optional?>(null)
    val devDependencies by optional?>(null)
    val private by optional(null)
    val type by optional("module")
}

/**
 * The specification of the package.json's bugs option.
 *
 * [url] The link where to report bugs from the package.
 */
data class Bugs(
    val url: String,
)

/**
 * The specification of the package.json's repository option.
 *
 * [type] The type of the repository.
 * [url] The URL of the repository.
 */
data class Repository(
    val type: String,
    val url: String,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy