공통 JS
CommonJSCommonJS는 웹 브라우저 외부의 JavaScript 모듈 생태계에 대한 규약을 확립하는 것을 목표로 하는 프로젝트입니다.그 주된 이유는 JavaScript를 실행하는 기존 웹 브라우저(웹 서버나 네이티브 데스크톱 애플리케이션 등)와는 다른 환경에서 재사용할 수 있는 일반적인 형태의 JavaScript 모듈 유닛이 거의 없었기 때문입니다.
CommonJS의 모듈 사양은 오늘날 널리 사용되고 있으며, 특히 [1]Node.js를 사용한 서버 측 JavaScript 프로그래밍에 사용됩니다.브라우저측 JavaScript 개발에도 사용되지만 브라우저는 CommonJs를 [1]지원하지 않기 때문에 코드를 트랜스필러와 함께 패키지해야 합니다.사용되고 있는 다른 주요 모듈 사양은 ECMAScript(ES) 모듈 사양(ES6 모듈, 일명 ES2015 모듈)[2]입니다.CommonJs는 다음 명령어를 사용하여 인식할 수 있습니다.require()
기능 및module.exports
단, ES 모듈은import
그리고.export
(동일하지는 않지만) 유사한 기능에 대한 설명입니다.
역사
이 프로젝트는 2009년 1월에 Mozilla 엔지니어 Kevin Dangoor에 의해 시작되었으며, 처음에는 ServerJs로 [3]명명되었습니다.
여기서 설명하는 것은 기술적인 문제가 아닙니다.이것은 사람들이 모여서 앞으로 나아가서 더 크고 멋진 것을 함께 쌓기 시작하기로 결정하는 문제이다.
--
2009년 8월 이 프로젝트는 Common으로 이름이 변경되었습니다.JS는 API의 [4]광범위한 적용 가능성을 보여줍니다.사양은 오픈 프로세스로 작성 및 승인됩니다.사양은 여러 [5]구현에서 완료된 후에만 최종 사양으로 간주됩니다.CommonJS는 ECMAScript에 종사하는 Ecma International 그룹 TC39에 소속되어 있지 않지만 TC39의 일부 멤버가 [6]프로젝트에 참여하고 있습니다.
사양
사양 목록에는 다음이 포함됩니다.[7]
현재의
- 모듈/1.0(모듈/1.1로 대체)
- 모듈/1.1
- 모듈/1.1.1
- 패키지/1.0
- 시스템/1.0
제안.
그 제안들은 모듈보다 훨씬 더 많은 것을 포함한다.이들은 생태계 내에서 상호 운용성을 제공하기 위해 표준화된 패키지 이름을 사용하여 웹 이외의 JavaScript 구현에 유용한 API 세트를 정의하려고 합니다.이 목표는 TC39의 목표와 중복되는 경우가 있으며 Promise와 같은 부품은 ECMAScript 자체로도 구현되었습니다.
슬래시 뒤에 있는 부분이 버전입니다.제안이 경합하는 경우 각 제안(같은 작성자의 순차적 수정사항 포함)에 새 문자가 할당됩니다.주 방향을 알면 숫자 버전이 할당되기 시작합니다.
- 이진수/B,f
- 콘솔(Web에서 포트)
- 인코딩/A,C
- 인코딩/A
- HTTP 클라이언트/B
- IO/A
- 파일 시스템/A, A/0
- 모듈/비동기/A
- 모듈/비동기 정의
- 모듈/로더 플러그인
- 모듈/리소스
- 모듈/단순 비동기
- 모듈/수송/B, C, D, E
- 모듈/포장
- 모듈/포장-명시-의존관계
- 패키지 / 1.1
- 패키지/비동기 정의
- 패키지/매핑/A,B,C,D
- 약속/B,D
- 유닛 테스트/B, 1.0, 1.0.1
실장
- 공통[8] 노드
- CommonJS 컴파일러 - 브라우저 내 사용에 적합한 공통[9] JS 모듈을 만드는 명령줄 도구
- CommonJs for PHP - 경량 공통PHP 5.3+[10]용 JS 구현
- 카우치 DB[11]
- 플러스퍼드[12]
- GPSE[13]
- 제트팩
- Joyent 스마트[14] 플랫폼
- JSBuild[15]
- MongoDB[16]
- Narwhal(JavaScript 플랫폼)[17]
- Node.js(부분, 동기)[18]
- 끈기있게[19]
- PINF JavaScript[20] 로더
- 링고JS
- 실크 JS
- 스프라우트코어[23]
- TeaJS[24]
- 와칸다[25]
- XUL젯[26]
- 그만두다
「 」를 참조해 주세요.
- 비동기 모듈 정의(AMD), 다른 JavaScript 모듈 아키텍처
- 서버측 JavaScript 솔루션 비교
- Document Object Model(DOM; 문서 객체 모델), JavaScript에서 일반적으로 사용 가능한 웹 브라우저 클라이언트 측 API
- JSGI
레퍼런스
- ^ a b Eric Elliott (26 June 2014). Programming JavaScript Applications: Robust Web Architecture with Node, HTML5, and Modern JS Libraries. "O'Reilly Media, Inc.". pp. 87–. ISBN 978-1-4919-5027-2.
- ^ Mario Casciaro; Luciano Mammino (29 July 2020). Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques, 3rd Edition. Packt Publishing. p. 62. ISBN 978-1-83921-044-0.
- ^ a b "What Server Side JavaScript needs ·". www.blueskyonmars.com. Retrieved 2021-08-05.
- ^ "CommonJS: JavaScript Standard Library". www.commonjs.org. Retrieved 2021-08-05.
- ^ "ProposalProcess - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ "CommonJS: the First Year ·". www.blueskyonmars.com. Retrieved 2021-08-05.
- ^ "JavaScript Standard Library". CommonJS. Archived from the original on 2014-05-28. Retrieved 2014-05-28.
{{cite web}}
: CS1 유지보수: 부적합한 URL(링크) - ^ "olegp/common-node @ GitHub". olegp.github.io. Retrieved 2021-08-05.
- ^ "CommonJS Compiler - makes your Common JS modules suitable for in-browser use". dsheiko.github.io. Retrieved 2021-08-05.
- ^ "GitHub - DrBenton/CommonJSForPHP: A simple CommonJS spec implementation for PHP 5.3+". GitHub. Retrieved 2021-08-05.
- ^ "Implementations/CouchDB - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ "Flusspferd - CommonJS platform Javascript bindings for C".
- ^ "Implementations/GPSEE - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ "Implementations/Smart - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ "Homepage - JSBuild". Archived from the original on January 4, 2011.
- ^ "The most popular database for modern apps". MongoDB. Retrieved 2021-08-05.
- ^ "Implementations/Narwhal - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ "Implementations/node.js - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ "Implementations/Persevere - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ "GitHub - pinf/loader-js: EARLY STALLED EXPLORATION". GitHub. Retrieved 2021-08-05.
- ^ "Implementations/RingoJS - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ "SilkJS WWW Site". Archived from the original on 2017-09-12. Retrieved 2012-10-19.
- ^ "Implementations/SproutCore - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ "Implementations/TeaJS - CommonJS Spec Wiki". wiki.commonjs.org. Retrieved 2021-08-05.
- ^ SAS, Wakanda. "Wakanda FullStack JavaScript Platform". Wakanda FullStack JavaScript Platform. Retrieved 2021-08-05.
- ^ "Google Code Archive - Long-term storage for Google Code Project Hosting". code.google.com. Retrieved 2021-08-05.