日期:2014-05-16  浏览次数:20307 次

CommonJS Contract 原文

STATUS: SUPERSEDED BY?1.1

Implementations
Flusspferd,?GLUEscript,?GPSEE,?JSBuild,?Narwhal?(0.1),?Persevere,?RingoJS,?SproutCore 1.1/Tiki,?node.js,?TeaJS (formerly v8cgi),?CouchDB,?Smart Platform,?Yabble,Wakanda,?XULJet

This specification addresses how modules should be written in order to be interoperable among a class of module systems that can be both client and server side, secure or insecure, implemented today or supported by future systems with syntax extensions. These modules are offered privacy of their top scope, facility for importing singleton objects from other modules, and exporting their own API. By implication, this specification defines the minimum features that a module system must provide in order to support interoperable modules.

Contents

?[hide]?
  • 1?Contract
    • 1.1?Module Context
    • 1.2?Module Identifiers
    • 1.3?Unspecified
  • 2?Unit Tests
  • 3?Sample Code
  • 4?Notes
  • 5?Amendment Proposals
  • 6?Implementations
  • 7?Related Documents

Contract

Module Context