Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

node.js externs for use with Closure Compiler.

License

NotificationsYou must be signed in to change notification settings

dcodeIO/node.js-closure-compiler-externs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node.js Closure Compiler externs

A collection of node.js externs for use withClosure Compiler/ClosureCompiler.js.

See:Advanced Compilation and Externs for details

Naming convention

  • Externs for core components are all lower case
  • Externs fornon-core components begin with an upper case character

Node.js specific annotation

If an extern file refers to a module that's usually loaded throughvar modulename = require("modulename"), a commentis added on top of the file. For example for the fs module:

/** BEGIN_NODE_INCLUDE var fs = require('fs'); END_NODE_INCLUDE */

NOTE: This comment on its own does nothing. But if you stick to the template, that is including the fs module exactlythe same way naming it also "fs", the compiler will know how to handle the module and its subcomponents. For example:

// This is bad:varEventEmitter=require("events").EventEmitter;// This is good:varevents=require("events");varEventEmitter=events.EventEmitter;

If a file requires a dependency, it is named in the@fileoverview declaration. You should then include the dependencyin your compile step, too.

TestingBuild Status

Externs are automatically syntax-validated through aClosureCompiler.jstest run. This does not imply that the extern is complete or does actually represent the underlying API (but it should).

Usage with ClosureCompiler.js

ClosureCompiler.js depends on an npm distribution of this repository.As a result, specifiying--externs=node automatically includes all node.js specific externs in your compile step. Ifyou are using non-core modules, you may still needadditional externsfor these.

Downloads

License

Apache License, Version 2.0 -http://www.apache.org/licenses/LICENSE-2.0.html

This repository is not officially supported by Google, Joyent or individual module authors. If the closure compilerlicense header is used in a file, it is just there so signal that it is ok to include it in official closure channels.All rights belong to their respective owners.

About

node.js externs for use with Closure Compiler.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors6


[8]ページ先頭

©2009-2025 Movatter.jp