[WIL]package.json 이란 무엇인가?

Calvin Park·2022년 7월 31일
0

많은 블로그들이 그냥 퍼오고 틀려도 그냥 저 블로그에 있으니깐 퍼오고 하는데... 사실 그게 얼마나 안좋은 방식인가. 그래서 그냥 직접 영어를 번역해겠다고 생각했다.
물론 난 프로 번역가가 아니라서 잘 못 번역한 구간도 있을꺼다 그래도 구글 번역기 보다는 좋다고 생각한다.
what is the file package.json?
All npm packages contain a file, usualluy in the project root, called package.json.
This file holds various metadata relevant to the project.
This file is used to give information to npm that allows it to identify the project as well as handle the project's dependencies.
It can also contain other metadata such as a project description, the version of the project in a particular distribution, license information, even configuration data - all of which can be vital to both npm and to the end users of the package.
The package.json file is normally located at the root directory of a Node.js project.

package json은 무엇인가?
모든 npm package에 들어있는 파일들을 package.json이라고한다. 보통 프로젝트 root파일에 있다.
이 파일은 많은 메타데이터(대량의 데이터를 구조화한 데이터)가 프로젝트에 상관이 있다.
이파일은 npm에 제공하는데에 있어 프로젝트를 식별하고 프로젝트의 종속성을 처리할 수 있다.
이것은 다른 메타데이터를 포함할 수 있다, 프로젝트의 설명, 특정 버전의 프로젝트, 라이센스 정보가 있다. 이 모든것은 npm and 사용자한테 필수적이다.
내가 보통 사용하는 것이다.
package.json은 일반적으로 Node.js 프로젝트의 root 디렉토리에 위치되어져 있다.

{
  "name": "expresscss",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon app.js"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/CalvinParkNov/v1-expreeeBlog.git"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/CalvinParkNov/v1-expreeeBlog/issues"
  },
  "homepage": "https://github.com/CalvinParkNov/v1-expreeeBlog#readme",
  "dependencies": {
    "body-parser": "^1.20.0",
    "dotenv": "^16.0.1",
    "ejs": "^3.1.8",
    "express": "^4.18.1",
    "express-jwt": "^7.7.5",
    "express-mysql-session": "^2.1.8",
    "express-session": "^1.17.3",
    "lodash": "^4.17.21",
    "mysql": "^2.18.1",
    "nodemon": "^2.0.19"
  }
}

As you can see, there are fields for the description and keywords of your projects. This allows people who find your project understand what it is in just a few words. The author, contributors, homepage and repository fields can all be used to credit the people who contributed to the project, show how to contact the author/maintainer, and give links for additional references.

당신이 보는것과 같이, 설명 및 키워드 필드들이 있다. 이것들을 이용해 다른 사람들은 당신의 프로젝트에 무엇이 있는지 몇 단어로 바로 이해할 수 있다. 작성자, 기여자, 홈페이지 및 리포지토리 필드는 모두 프로젝트에 기여한 사람을 신용하고, 작성자/유지관리자에게 연락하는 방법을 보여주며, 추가 참조를 위해 링크를 제공하는 데 사용될 수 있습니다.

출처

nodejs.org 공식 문서에서 가져 와서 번역했습니다.

profile
Personal Velog Note

0개의 댓글