├── .gitignore ├── .idea ├── jsLibraryMappings.xml └── uiDesigner.xml ├── .project ├── Pro-JavaScript-Design-Patterns ├── Chapter01-Expressive-JavaScript │ ├── 1.01 - The flexibility of JavaScript.js │ ├── 1.02 - Functions as first-class objects.js │ └── 1.03 - The mutability of objects.js ├── Chapter02-Interfaces │ ├── 2.01 - Describing interfaces with comments.js │ ├── 2.02 - Emulating interfaces with attribute checking.js │ ├── 2.03 - Emulating interfaces with duck typing.js │ ├── 2.04 - The interface implementation for this book.js │ ├── 2.05 - The Interface class.js │ ├── 2.06 - When to use the Interface class.js │ └── 2.07 - An example illustrating the use of the Interface class.js ├── Chapter03-Encapsulation-and-Information-Hiding │ ├── 3.01 - Book example class.js │ ├── 3.02 - Fully exposed object.js │ ├── 3.03 - Private methods with underscores.js │ ├── 3.04 - Scope, nested functions, and closures.js │ ├── 3.05 - Private methods with closures.js │ ├── 3.06 - Static members.js │ └── 3.07 - Constants.js ├── Chapter04-Inheritance │ ├── 4.01 - Classical inheritance.js │ ├── 4.02 - The prototype chain.js │ ├── 4.03 - The extend function.js │ ├── 4.04 - Prototypal inheritance.js │ ├── 4.05 - Asymmetrical reading and writing.js │ ├── 4.06 - The clone function.js │ ├── 4.07 - Mixin classes.js │ ├── 4.08 - The augment function.js │ ├── 4.09 - Edit-in-place example, classical.js │ ├── 4.10 - Edit-in-place example, prototypal.js │ └── 4.11 - Edit-in-place example, mixin.js ├── Chapter05-The-Singleton-Pattern │ ├── 5.01 - Basic structure of the singleton.js │ ├── 5.02 - Namespacing.js │ ├── 5.03 - Wrappers for page specific code.js │ ├── 5.04 - Private methods with underscores.js │ ├── 5.05 - Private methods with closures.js │ ├── 5.06 - Comparing the two techniques.js │ ├── 5.07 - Lazy instantiation.js │ ├── 5.08 - Branching.js │ └── 5.09 - Creating XHR objects with branching.js ├── Chapter06-Chaining │ ├── 6.01 - Introduction to chaining.js │ ├── 6.02 - The structure of the chain.js │ ├── 6.03 - Building a chainable JavaScript library.js │ └── 6.04 - Using callbacks.js ├── Chapter07-The-Factory-Pattern │ ├── 7.01 - The simple factory.js │ ├── 7.02 - The factory pattern.js │ ├── 7.03 - XHR factory example.js │ ├── 7.04 - Specialized connection objects.js │ ├── 7.05 - Choosing connection objects at run-time.js │ └── 7.06 - RSS reader example.js ├── Chapter08-The-Bridge-Pattern │ ├── 8.01 - Event listener example.js │ ├── 8.02 - Other examples of bridges.js │ ├── 8.03 - Bridging multiple classes together.js │ ├── 8.04 - Building an XHR connection queue.js │ ├── 8.05 - XHR connection queue example page.html │ └── 8.06 - Where have bridges been used_.js ├── Chapter09-The-Composite-Pattern │ ├── 9.01 - Form validation.js │ ├── 9.02 - Adding operations to FormItem.js │ ├── 9.03 - Adding classes to the hierarchy.js │ └── 9.04 - Image gallery example.js ├── Chapter10-The-Facade-Pattern │ ├── 10.01 - Some facades you probably already know about.js │ ├── 10.02 - Facades as convenience methods.js │ ├── 10.03 - Setting styles on HTML elements.js │ └── 10.04 - Creating an event utility.js ├── Chapter11-The-Adapter-Pattern │ ├── 11.01 - Characteristics of an adapter.js │ ├── 11.02 - Adapting one library to another.js │ ├── 11.03 - Adapting an email API.html │ └── 11.04 - More on adapting an email API.js ├── Chapter12-The-Decorator-Pattern │ ├── 12.01 - Structure of the decorator.js │ ├── 12.02 - In what ways can a decorator modify its component.js │ ├── 12.03 - The role of the factory.js │ ├── 12.04 - Function decorators.js │ └── 12.05 - Method profiler.js └── README.md ├── README.md ├── angularjs ├── chapter02_data_binding │ ├── 02_01_hello-world.html │ ├── 02_02_simple-data-binding.html │ ├── 02_03_best-data-binding-practice.html │ ├── chapter02_data_binding │ │ ├── 02_01_hello-world.html │ │ ├── 02_02_simple-data-binding.html │ │ ├── 02_03_best-data-binding-practice.html │ │ └── js │ │ │ ├── 02_02_simple-data-binding.js │ │ │ └── 02_03_best-data-binding-practice.js │ └── js │ │ ├── 02_02_simple-data-binding.js │ │ └── 02_03_best-data-binding-practice.js ├── chapter03_module │ └── README.md ├── chapter04_scope │ ├── 04_01_view-and-$scope.html │ └── README.md ├── chapter05_controller │ ├── 05_01_controller-nesting.html │ ├── README.md │ └── js │ │ └── 05_01_controller-nesting.js ├── chapter06_expression │ ├── 06_01_parseFun.html │ ├── 06_02_interpolate.html │ ├── README.md │ └── js │ │ ├── 06_01_parseFun.js │ │ └── 06_02_interpolate.js ├── chapter07_filter │ └── README.md ├── chapter08_directive │ ├── 08_01_myDirective.html │ ├── 08_02_two_way_binding.html │ ├── README.md │ └── js │ │ └── 08_01_myDirective.js ├── chapter09_builtInDirective │ ├── 09_01_ng-attribute.html │ └── README.md ├── chapter10_directiveInDetail │ └── README.md ├── chapter11_loadModule │ └── README.md └── chapter12_multipleViewsAndRouting │ └── README.md ├── html-template └── 20141212-wap-320width.html ├── jQuery-lib.zip ├── jQuery-lib ├── README.md ├── fancybox │ ├── example │ │ ├── 1_b.jpg │ │ ├── 1_s.jpg │ │ ├── 2_b.jpg │ │ ├── 2_s.jpg │ │ ├── 3_b.jpg │ │ ├── 3_s.jpg │ │ ├── 4_b.jpg │ │ ├── 4_s.jpg │ │ └── index.html │ └── jquery.fancybox │ │ ├── fancy_closebox.png │ │ ├── fancy_left.png │ │ ├── fancy_progress.png │ │ ├── fancy_right.png │ │ ├── fancy_shadow_e.png │ │ ├── fancy_shadow_n.png │ │ ├── fancy_shadow_ne.png │ │ ├── fancy_shadow_nw.png │ │ ├── fancy_shadow_s.png │ │ ├── fancy_shadow_se.png │ │ ├── fancy_shadow_sw.png │ │ ├── fancy_shadow_w.png │ │ ├── fancy_title_left.png │ │ ├── fancy_title_main.png │ │ ├── fancy_title_right.png │ │ ├── jquery-1.3.2.min.js │ │ ├── jquery.easing.1.3.js │ │ ├── jquery.fancybox-1.2.1.js │ │ ├── jquery.fancybox-1.2.1.pack.js │ │ └── jquery.fancybox.css ├── imgUploadToolBar │ ├── imgUploadToolBar.js │ └── test.html ├── js │ └── jquery-1.11.0.js └── toJsonParam │ ├── test.html │ └── toJsonParam.js ├── js-features ├── README.md └── datatype │ ├── float.js │ └── test.html ├── reactjs └── live-demo │ ├── .babelrc │ ├── .eslintrc │ ├── app │ ├── Components │ │ ├── Button.html │ │ ├── Button.js │ │ ├── Button.scss │ │ ├── Header.html │ │ ├── Header.js │ │ └── Header.scss │ ├── index1.js │ ├── index2.js │ ├── index2.react.jsx │ ├── styles1.scss │ ├── styles2.scss │ └── template.ejs │ ├── favicon.ico │ ├── img │ └── puppy.jpg │ ├── index1.html │ ├── index2.html │ ├── package.json │ ├── stats.json │ └── webpack.config.js └── seajs ├── app ├── first-module-test.html ├── hello.html ├── index.html ├── now.html └── test.html ├── assets └── scripts │ ├── application │ ├── application.js │ └── util.js │ └── seajs │ ├── .gitignore │ ├── .npmignore │ ├── .spmignore │ ├── .travis.yml │ ├── runtime-debug.js │ ├── runtime.js │ ├── sea-debug.js │ ├── sea.js │ ├── standalone-debug.js │ └── standalone.js ├── sea-modules ├── angular │ └── angularjs │ │ └── 1.1.5 │ │ ├── angular-debug.js │ │ └── angular.js ├── examples │ └── hello │ │ └── 1.0.0 │ │ ├── main-debug.js │ │ ├── main.js │ │ ├── style-debug.css │ │ └── style.css ├── gallery │ ├── backbone │ │ └── 1.0.0 │ │ │ ├── backbone-debug.js │ │ │ ├── backbone.js │ │ │ └── package.json │ ├── store │ │ └── 1.3.7 │ │ │ ├── package.json │ │ │ ├── store-debug.js │ │ │ └── store.js │ └── underscore │ │ └── 1.4.4 │ │ ├── package.json │ │ ├── underscore-debug.js │ │ └── underscore.js ├── jquery │ ├── easing │ │ └── 1.3.0 │ │ │ ├── easing-debug.js │ │ │ ├── easing.js │ │ │ └── package.json │ └── jquery │ │ └── 1.10.1 │ │ ├── jquery-debug.js │ │ ├── jquery.js │ │ └── package.json ├── moment │ └── 2.9.0 │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ender.js │ │ ├── locale │ │ ├── af.js │ │ ├── ar-ma.js │ │ ├── ar-sa.js │ │ ├── ar-tn.js │ │ ├── ar.js │ │ ├── az.js │ │ ├── be.js │ │ ├── bg.js │ │ ├── bn.js │ │ ├── bo.js │ │ ├── br.js │ │ ├── bs.js │ │ ├── ca.js │ │ ├── cs.js │ │ ├── cv.js │ │ ├── cy.js │ │ ├── da.js │ │ ├── de-at.js │ │ ├── de.js │ │ ├── el.js │ │ ├── en-au.js │ │ ├── en-ca.js │ │ ├── en-gb.js │ │ ├── eo.js │ │ ├── es.js │ │ ├── et.js │ │ ├── eu.js │ │ ├── fa.js │ │ ├── fi.js │ │ ├── fo.js │ │ ├── fr-ca.js │ │ ├── fr.js │ │ ├── fy.js │ │ ├── gl.js │ │ ├── he.js │ │ ├── hi.js │ │ ├── hr.js │ │ ├── hu.js │ │ ├── hy-am.js │ │ ├── id.js │ │ ├── is.js │ │ ├── it.js │ │ ├── ja.js │ │ ├── ka.js │ │ ├── km.js │ │ ├── ko.js │ │ ├── lb.js │ │ ├── lt.js │ │ ├── lv.js │ │ ├── mk.js │ │ ├── ml.js │ │ ├── mr.js │ │ ├── ms-my.js │ │ ├── my.js │ │ ├── nb.js │ │ ├── ne.js │ │ ├── nl.js │ │ ├── nn.js │ │ ├── pl.js │ │ ├── pt-br.js │ │ ├── pt.js │ │ ├── ro.js │ │ ├── ru.js │ │ ├── sk.js │ │ ├── sl.js │ │ ├── sq.js │ │ ├── sr-cyrl.js │ │ ├── sr.js │ │ ├── sv.js │ │ ├── ta.js │ │ ├── th.js │ │ ├── tl-ph.js │ │ ├── tr.js │ │ ├── tzm-latn.js │ │ ├── tzm.js │ │ ├── uk.js │ │ ├── uz.js │ │ ├── vi.js │ │ ├── zh-cn.js │ │ └── zh-tw.js │ │ ├── min │ │ ├── locales.js │ │ ├── locales.min.js │ │ ├── moment-with-locales.js │ │ ├── moment-with-locales.min.js │ │ └── moment.min.js │ │ ├── moment.js │ │ ├── package.js │ │ └── package.json ├── now │ ├── index-debug.js │ └── index.js └── seajs │ ├── 2.3.0 │ ├── .gitignore │ ├── .npmignore │ ├── .spmignore │ ├── .travis.yml │ ├── CONTRIBUTING.md │ ├── LICENSE.md │ ├── Makefile │ ├── README.md │ ├── bower.json │ ├── component.json │ ├── dist │ │ ├── sea-debug.js │ │ └── sea.js │ ├── index.html │ └── package.json │ └── seajs │ ├── 2.1.0 │ ├── package.json │ ├── sea-debug.js │ ├── sea.js │ └── sea.js.map │ ├── 2.1.1 │ ├── package.json │ ├── sea-debug.js │ ├── sea.js │ └── sea.js.map │ └── 2.2.0 │ ├── package.json │ ├── sea-debug.js │ └── sea.js └── static ├── first-module ├── .gitignore ├── .spmignore ├── .travis.yml ├── HISTORY.md ├── README.md ├── examples │ └── index.md ├── index.js ├── package.json ├── src │ └── index.js └── tests │ └── index-spec.js ├── hello ├── Makefile ├── dist │ ├── main-debug.js │ ├── main.js │ ├── style-debug.css │ └── style.css ├── package.json └── src │ ├── application.css │ ├── application.js │ ├── main.js │ ├── spinning.js │ ├── style.css │ └── util.js ├── node_modules ├── .bin │ ├── spm-init │ └── spm-init.cmd └── spm-init │ ├── .npmignore │ ├── .travis.yml │ ├── HISTORY.md │ ├── README-zh.md │ ├── README.md │ ├── bin │ └── spm-init │ ├── lib │ └── helper.js │ ├── node_modules │ ├── .bin │ │ ├── grunt-init │ │ ├── grunt-init.cmd │ │ ├── win-spawn │ │ └── win-spawn.cmd │ ├── colorful │ │ ├── .cache │ │ │ ├── files.json │ │ │ ├── pages.json │ │ │ └── runtime.json │ │ ├── .jshintrc │ │ ├── .npmignore │ │ ├── .travis.yml │ │ ├── Makefile │ │ ├── README.md │ │ ├── index.js │ │ ├── lib │ │ │ └── ansi.js │ │ ├── nico.json │ │ └── package.json │ ├── commander │ │ ├── History.md │ │ ├── Readme.md │ │ ├── index.js │ │ └── package.json │ ├── grunt-init │ │ ├── .jshintrc │ │ ├── .npmignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── Gruntfile.js │ │ ├── LICENSE-MIT │ │ ├── README.md │ │ ├── bin │ │ │ └── grunt-init │ │ ├── dev │ │ │ └── generate.exp │ │ ├── node_modules │ │ │ ├── .bin │ │ │ │ ├── semver │ │ │ │ └── semver.cmd │ │ │ ├── colors │ │ │ │ ├── MIT-LICENSE.txt │ │ │ │ ├── ReadMe.md │ │ │ │ ├── colors.js │ │ │ │ ├── example.html │ │ │ │ ├── example.js │ │ │ │ ├── package.json │ │ │ │ ├── test.js │ │ │ │ └── themes │ │ │ │ │ ├── winston-dark.js │ │ │ │ │ └── winston-light.js │ │ │ ├── hooker │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── README.md │ │ │ │ ├── child.js │ │ │ │ ├── dist │ │ │ │ │ ├── ba-hooker.js │ │ │ │ │ └── ba-hooker.min.js │ │ │ │ ├── grunt.js │ │ │ │ ├── lib │ │ │ │ │ └── hooker.js │ │ │ │ ├── package.json │ │ │ │ ├── parent.js │ │ │ │ └── test │ │ │ │ │ └── hooker_test.js │ │ │ ├── prompt │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── docs │ │ │ │ │ ├── docco.css │ │ │ │ │ └── prompt.html │ │ │ │ ├── examples │ │ │ │ │ ├── add-properties.js │ │ │ │ │ ├── existing-properties.js │ │ │ │ │ ├── history.js │ │ │ │ │ ├── password.js │ │ │ │ │ ├── property-prompt.js │ │ │ │ │ └── simple-prompt.js │ │ │ │ ├── lib │ │ │ │ │ └── prompt.js │ │ │ │ ├── node_modules │ │ │ │ │ ├── async │ │ │ │ │ │ ├── .gitmodules │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ └── async.js │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── pkginfo │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── docs │ │ │ │ │ │ │ ├── docco.css │ │ │ │ │ │ │ └── pkginfo.html │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ ├── all-properties.js │ │ │ │ │ │ │ ├── array-argument.js │ │ │ │ │ │ │ ├── multiple-properties.js │ │ │ │ │ │ │ ├── object-argument.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── single-property.js │ │ │ │ │ │ │ ├── subdir │ │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ │ └── target-dir.js │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ └── pkginfo.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test │ │ │ │ │ │ │ └── pkginfo-test.js │ │ │ │ │ └── winston │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── docs │ │ │ │ │ │ ├── docco.css │ │ │ │ │ │ ├── winston.html │ │ │ │ │ │ └── winston │ │ │ │ │ │ │ ├── common.html │ │ │ │ │ │ │ ├── config.html │ │ │ │ │ │ │ ├── config │ │ │ │ │ │ │ ├── cli-config.html │ │ │ │ │ │ │ ├── npm-config.html │ │ │ │ │ │ │ └── syslog-config.html │ │ │ │ │ │ │ ├── exception.html │ │ │ │ │ │ │ ├── logger.html │ │ │ │ │ │ │ ├── transports.html │ │ │ │ │ │ │ └── transports │ │ │ │ │ │ │ ├── console.html │ │ │ │ │ │ │ ├── couchdb.html │ │ │ │ │ │ │ ├── file.html │ │ │ │ │ │ │ ├── loggly.html │ │ │ │ │ │ │ ├── transport.html │ │ │ │ │ │ │ └── webhook.html │ │ │ │ │ │ ├── examples │ │ │ │ │ │ ├── couchdb.js │ │ │ │ │ │ ├── raw-mode.js │ │ │ │ │ │ └── webhook-post.js │ │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── winston.js │ │ │ │ │ │ └── winston │ │ │ │ │ │ │ ├── common.js │ │ │ │ │ │ │ ├── config.js │ │ │ │ │ │ │ ├── config │ │ │ │ │ │ │ ├── cli-config.js │ │ │ │ │ │ │ ├── npm-config.js │ │ │ │ │ │ │ └── syslog-config.js │ │ │ │ │ │ │ ├── container.js │ │ │ │ │ │ │ ├── exception.js │ │ │ │ │ │ │ ├── logger.js │ │ │ │ │ │ │ ├── transports.js │ │ │ │ │ │ │ └── transports │ │ │ │ │ │ │ ├── console.js │ │ │ │ │ │ │ ├── couchdb.js │ │ │ │ │ │ │ ├── file.js │ │ │ │ │ │ │ ├── loggly.js │ │ │ │ │ │ │ ├── transport.js │ │ │ │ │ │ │ └── webhook.js │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ ├── eyes │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ └── eyes.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ └── eyes-test.js │ │ │ │ │ │ ├── loggly │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── docs │ │ │ │ │ │ │ │ ├── docco.css │ │ │ │ │ │ │ │ ├── loggly.html │ │ │ │ │ │ │ │ └── loggly │ │ │ │ │ │ │ │ │ ├── common.html │ │ │ │ │ │ │ │ │ ├── config.html │ │ │ │ │ │ │ │ │ ├── core.html │ │ │ │ │ │ │ │ │ ├── device.html │ │ │ │ │ │ │ │ │ ├── facet.html │ │ │ │ │ │ │ │ │ ├── input.html │ │ │ │ │ │ │ │ │ └── search.html │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ ├── loggly.js │ │ │ │ │ │ │ │ └── loggly │ │ │ │ │ │ │ │ │ ├── common.js │ │ │ │ │ │ │ │ │ ├── config.js │ │ │ │ │ │ │ │ │ ├── core.js │ │ │ │ │ │ │ │ │ ├── device.js │ │ │ │ │ │ │ │ │ ├── facet.js │ │ │ │ │ │ │ │ │ ├── input.js │ │ │ │ │ │ │ │ │ └── search.js │ │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ │ ├── request │ │ │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ │ ├── aws.js │ │ │ │ │ │ │ │ │ ├── aws2.js │ │ │ │ │ │ │ │ │ ├── forever.js │ │ │ │ │ │ │ │ │ ├── main.js │ │ │ │ │ │ │ │ │ ├── mimetypes.js │ │ │ │ │ │ │ │ │ ├── oauth.js │ │ │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ │ │ ├── tests │ │ │ │ │ │ │ │ │ │ ├── googledoodle.png │ │ │ │ │ │ │ │ │ │ ├── run.js │ │ │ │ │ │ │ │ │ │ ├── server.js │ │ │ │ │ │ │ │ │ │ ├── squid.conf │ │ │ │ │ │ │ │ │ │ ├── ssl │ │ │ │ │ │ │ │ │ │ │ ├── ca │ │ │ │ │ │ │ │ │ │ │ │ ├── ca.cnf │ │ │ │ │ │ │ │ │ │ │ │ ├── ca.crl │ │ │ │ │ │ │ │ │ │ │ │ ├── ca.crt │ │ │ │ │ │ │ │ │ │ │ │ ├── ca.csr │ │ │ │ │ │ │ │ │ │ │ │ ├── ca.key │ │ │ │ │ │ │ │ │ │ │ │ ├── ca.srl │ │ │ │ │ │ │ │ │ │ │ │ ├── server.cnf │ │ │ │ │ │ │ │ │ │ │ │ ├── server.crt │ │ │ │ │ │ │ │ │ │ │ │ ├── server.csr │ │ │ │ │ │ │ │ │ │ │ │ ├── server.js │ │ │ │ │ │ │ │ │ │ │ │ └── server.key │ │ │ │ │ │ │ │ │ │ │ ├── npm-ca.crt │ │ │ │ │ │ │ │ │ │ │ ├── test.crt │ │ │ │ │ │ │ │ │ │ │ └── test.key │ │ │ │ │ │ │ │ │ │ ├── test-body.js │ │ │ │ │ │ │ │ │ │ ├── test-cookie.js │ │ │ │ │ │ │ │ │ │ ├── test-cookiejar.js │ │ │ │ │ │ │ │ │ │ ├── test-defaults.js │ │ │ │ │ │ │ │ │ │ ├── test-errors.js │ │ │ │ │ │ │ │ │ │ ├── test-headers.js │ │ │ │ │ │ │ │ │ │ ├── test-httpModule.js │ │ │ │ │ │ │ │ │ │ ├── test-https-strict.js │ │ │ │ │ │ │ │ │ │ ├── test-https.js │ │ │ │ │ │ │ │ │ │ ├── test-oauth.js │ │ │ │ │ │ │ │ │ │ ├── test-params.js │ │ │ │ │ │ │ │ │ │ ├── test-pipes.js │ │ │ │ │ │ │ │ │ │ ├── test-pool.js │ │ │ │ │ │ │ │ │ │ ├── test-proxy.js │ │ │ │ │ │ │ │ │ │ ├── test-qs.js │ │ │ │ │ │ │ │ │ │ ├── test-redirect.js │ │ │ │ │ │ │ │ │ │ ├── test-s3.js │ │ │ │ │ │ │ │ │ │ ├── test-timeout.js │ │ │ │ │ │ │ │ │ │ ├── test-toJSON.js │ │ │ │ │ │ │ │ │ │ └── test-tunnel.js │ │ │ │ │ │ │ │ │ ├── tunnel.js │ │ │ │ │ │ │ │ │ ├── uuid.js │ │ │ │ │ │ │ │ │ └── vendor │ │ │ │ │ │ │ │ │ │ └── cookie │ │ │ │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ │ │ │ └── jar.js │ │ │ │ │ │ │ │ └── timespan │ │ │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ │ ├── browser │ │ │ │ │ │ │ │ │ ├── TimeSpan-1.2.js │ │ │ │ │ │ │ │ │ └── TimeSpan-1.2.min.js │ │ │ │ │ │ │ │ │ ├── docs │ │ │ │ │ │ │ │ │ ├── docco.css │ │ │ │ │ │ │ │ │ └── time-span.html │ │ │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ │ └── time-span.js │ │ │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ │ ├── date-parser-test.js │ │ │ │ │ │ │ │ │ ├── helpers.js │ │ │ │ │ │ │ │ │ └── time-span-test.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ ├── common-test.js │ │ │ │ │ │ │ │ ├── device-test.js │ │ │ │ │ │ │ │ ├── helpers.js │ │ │ │ │ │ │ │ ├── input-test.js │ │ │ │ │ │ │ │ ├── log-test.js │ │ │ │ │ │ │ │ └── search-test.js │ │ │ │ │ │ ├── pkginfo │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── docs │ │ │ │ │ │ │ │ ├── docco.css │ │ │ │ │ │ │ │ └── pkginfo.html │ │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ │ ├── all-properties.js │ │ │ │ │ │ │ │ ├── array-argument.js │ │ │ │ │ │ │ │ ├── multiple-properties.js │ │ │ │ │ │ │ │ ├── object-argument.js │ │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ │ └── single-property.js │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ └── pkginfo.js │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ └── pkginfo-test.js │ │ │ │ │ │ └── stack-trace │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── License │ │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ │ ├── Readme.md │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ └── stack-trace.js │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test │ │ │ │ │ │ ├── cli-test.js │ │ │ │ │ │ ├── container-test.js │ │ │ │ │ │ ├── custom-timestamp-test.js │ │ │ │ │ │ ├── exception-test.js │ │ │ │ │ │ ├── fixtures │ │ │ │ │ │ ├── .gitkeep │ │ │ │ │ │ ├── keys │ │ │ │ │ │ │ ├── agent2-cert.pem │ │ │ │ │ │ │ └── agent2-key.pem │ │ │ │ │ │ ├── logs │ │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ │ └── scripts │ │ │ │ │ │ │ ├── default-exceptions.js │ │ │ │ │ │ │ ├── exit-on-error.js │ │ │ │ │ │ │ ├── log-exceptions.js │ │ │ │ │ │ │ └── unhandle-exceptions.js │ │ │ │ │ │ ├── helpers.js │ │ │ │ │ │ ├── log-exception-test.js │ │ │ │ │ │ ├── log-rewriter-test.js │ │ │ │ │ │ ├── logger-test.js │ │ │ │ │ │ ├── transports │ │ │ │ │ │ ├── console-test.js │ │ │ │ │ │ ├── couchdb-test.js │ │ │ │ │ │ ├── file-maxfiles-test.js │ │ │ │ │ │ ├── file-maxsize-test.js │ │ │ │ │ │ ├── file-test.js │ │ │ │ │ │ ├── loggly-test.js │ │ │ │ │ │ └── webhook-test.js │ │ │ │ │ │ └── winston-test.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── helpers.js │ │ │ │ │ ├── interactive-prompt-test.js │ │ │ │ │ └── prompt-test.js │ │ │ └── semver │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── bin │ │ │ │ └── semver │ │ │ │ ├── package.json │ │ │ │ ├── semver.js │ │ │ │ └── test.js │ │ ├── package.json │ │ ├── tasks │ │ │ ├── init.js │ │ │ └── lib │ │ │ │ ├── git.js │ │ │ │ ├── helpers.js │ │ │ │ └── prompt.js │ │ ├── templates │ │ │ ├── licenses │ │ │ │ ├── LICENSE-Apache-2.0 │ │ │ │ ├── LICENSE-GPL-2.0 │ │ │ │ ├── LICENSE-MIT │ │ │ │ └── LICENSE-MPL-2.0 │ │ │ └── misc │ │ │ │ └── placeholder │ │ └── test │ │ │ └── git_test.js │ ├── grunt │ │ ├── .npmignore │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE-MIT │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── internal-tasks │ │ │ ├── bump.js │ │ │ └── subgrunt.js │ │ ├── lib │ │ │ ├── grunt.js │ │ │ ├── grunt │ │ │ │ ├── cli.js │ │ │ │ ├── config.js │ │ │ │ ├── event.js │ │ │ │ ├── fail.js │ │ │ │ ├── file.js │ │ │ │ ├── help.js │ │ │ │ ├── option.js │ │ │ │ ├── task.js │ │ │ │ └── template.js │ │ │ └── util │ │ │ │ └── task.js │ │ ├── node_modules │ │ │ ├── .bin │ │ │ │ ├── cake │ │ │ │ ├── cake.cmd │ │ │ │ ├── coffee │ │ │ │ ├── coffee.cmd │ │ │ │ ├── js-yaml │ │ │ │ ├── js-yaml.cmd │ │ │ │ ├── nopt │ │ │ │ ├── nopt.cmd │ │ │ │ ├── rimraf │ │ │ │ ├── rimraf.cmd │ │ │ │ ├── which │ │ │ │ └── which.cmd │ │ │ ├── async │ │ │ │ ├── .gitmodules │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── lib │ │ │ │ │ └── async.js │ │ │ │ └── package.json │ │ │ ├── coffee-script │ │ │ │ ├── .npmignore │ │ │ │ ├── CNAME │ │ │ │ ├── LICENSE │ │ │ │ ├── README │ │ │ │ ├── Rakefile │ │ │ │ ├── bin │ │ │ │ │ ├── cake │ │ │ │ │ └── coffee │ │ │ │ ├── extras │ │ │ │ │ └── jsl.conf │ │ │ │ ├── lib │ │ │ │ │ └── coffee-script │ │ │ │ │ │ ├── browser.js │ │ │ │ │ │ ├── cake.js │ │ │ │ │ │ ├── coffee-script.js │ │ │ │ │ │ ├── command.js │ │ │ │ │ │ ├── grammar.js │ │ │ │ │ │ ├── helpers.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── lexer.js │ │ │ │ │ │ ├── nodes.js │ │ │ │ │ │ ├── optparse.js │ │ │ │ │ │ ├── parser.js │ │ │ │ │ │ ├── repl.js │ │ │ │ │ │ ├── rewriter.js │ │ │ │ │ │ └── scope.js │ │ │ │ └── package.json │ │ │ ├── colors │ │ │ │ ├── MIT-LICENSE.txt │ │ │ │ ├── ReadMe.md │ │ │ │ ├── colors.js │ │ │ │ ├── example.html │ │ │ │ ├── example.js │ │ │ │ ├── package.json │ │ │ │ ├── test.js │ │ │ │ └── themes │ │ │ │ │ ├── winston-dark.js │ │ │ │ │ └── winston-light.js │ │ │ ├── dateformat │ │ │ │ ├── Readme.md │ │ │ │ ├── lib │ │ │ │ │ └── dateformat.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── test_weekofyear.js │ │ │ │ │ └── test_weekofyear.sh │ │ │ ├── eventemitter2 │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── lib │ │ │ │ │ └── eventemitter2.js │ │ │ │ └── package.json │ │ │ ├── exit │ │ │ │ ├── .jshintrc │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── Gruntfile.js │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── README.md │ │ │ │ ├── lib │ │ │ │ │ └── exit.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── exit_test.js │ │ │ │ │ └── fixtures │ │ │ │ │ ├── 10-stderr.txt │ │ │ │ │ ├── 10-stdout-stderr.txt │ │ │ │ │ ├── 10-stdout.txt │ │ │ │ │ ├── 100-stderr.txt │ │ │ │ │ ├── 100-stdout-stderr.txt │ │ │ │ │ ├── 100-stdout.txt │ │ │ │ │ ├── 1000-stderr.txt │ │ │ │ │ ├── 1000-stdout-stderr.txt │ │ │ │ │ ├── 1000-stdout.txt │ │ │ │ │ ├── create-files.sh │ │ │ │ │ ├── log-broken.js │ │ │ │ │ └── log.js │ │ │ ├── findup-sync │ │ │ │ ├── .jshintrc │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── Gruntfile.js │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── README.md │ │ │ │ ├── lib │ │ │ │ │ └── findup-sync.js │ │ │ │ ├── node_modules │ │ │ │ │ ├── glob │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ ├── g.js │ │ │ │ │ │ │ └── usr-local.js │ │ │ │ │ │ ├── glob.js │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ ├── inherits │ │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ ├── inherits.js │ │ │ │ │ │ │ │ ├── inherits_browser.js │ │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ │ └── test.js │ │ │ │ │ │ │ └── minimatch │ │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ ├── minimatch.js │ │ │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ │ ├── lru-cache │ │ │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ │ │ ├── CONTRIBUTORS │ │ │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ │ │ └── lru-cache.js │ │ │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ │ │ ├── basic.js │ │ │ │ │ │ │ │ │ │ ├── foreach.js │ │ │ │ │ │ │ │ │ │ └── memory-leak.js │ │ │ │ │ │ │ │ └── sigmund │ │ │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ │ ├── bench.js │ │ │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ │ │ ├── sigmund.js │ │ │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ │ └── basic.js │ │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ │ └── test │ │ │ │ │ │ │ │ ├── basic.js │ │ │ │ │ │ │ │ ├── brace-expand.js │ │ │ │ │ │ │ │ ├── caching.js │ │ │ │ │ │ │ │ ├── defaults.js │ │ │ │ │ │ │ │ └── extglob-ending-with-state-char.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test │ │ │ │ │ │ │ ├── 00-setup.js │ │ │ │ │ │ │ ├── bash-comparison.js │ │ │ │ │ │ │ ├── bash-results.json │ │ │ │ │ │ │ ├── cwd-test.js │ │ │ │ │ │ │ ├── globstar-match.js │ │ │ │ │ │ │ ├── mark.js │ │ │ │ │ │ │ ├── new-glob-optional-options.js │ │ │ │ │ │ │ ├── nocase-nomagic.js │ │ │ │ │ │ │ ├── pause-resume.js │ │ │ │ │ │ │ ├── readme-issue.js │ │ │ │ │ │ │ ├── root-nomount.js │ │ │ │ │ │ │ ├── root.js │ │ │ │ │ │ │ ├── stat.js │ │ │ │ │ │ │ └── zz-cleanup.js │ │ │ │ │ └── lodash │ │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── dist │ │ │ │ │ │ ├── lodash.compat.js │ │ │ │ │ │ ├── lodash.compat.min.js │ │ │ │ │ │ ├── lodash.js │ │ │ │ │ │ ├── lodash.min.js │ │ │ │ │ │ ├── lodash.underscore.js │ │ │ │ │ │ └── lodash.underscore.min.js │ │ │ │ │ │ ├── lodash.js │ │ │ │ │ │ └── package.json │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── findup-sync_test.js │ │ │ │ │ └── fixtures │ │ │ │ │ ├── a.txt │ │ │ │ │ ├── a │ │ │ │ │ ├── b │ │ │ │ │ │ └── bar.txt │ │ │ │ │ └── foo.txt │ │ │ │ │ └── aaa.txt │ │ │ ├── getobject │ │ │ │ ├── .jshintrc │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── Gruntfile.js │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── README.md │ │ │ │ ├── lib │ │ │ │ │ └── getobject.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ └── namespace_test.js │ │ │ ├── glob │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── examples │ │ │ │ │ ├── g.js │ │ │ │ │ └── usr-local.js │ │ │ │ ├── glob.js │ │ │ │ ├── node_modules │ │ │ │ │ ├── graceful-fs │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── graceful-fs.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test │ │ │ │ │ │ │ ├── open.js │ │ │ │ │ │ │ └── ulimit.js │ │ │ │ │ └── inherits │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── inherits.js │ │ │ │ │ │ └── package.json │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── 00-setup.js │ │ │ │ │ ├── bash-comparison.js │ │ │ │ │ ├── bash-results.json │ │ │ │ │ ├── cwd-test.js │ │ │ │ │ ├── mark.js │ │ │ │ │ ├── nocase-nomagic.js │ │ │ │ │ ├── pause-resume.js │ │ │ │ │ ├── root-nomount.js │ │ │ │ │ ├── root.js │ │ │ │ │ └── zz-cleanup.js │ │ │ ├── grunt-legacy-log │ │ │ │ ├── .jshintrc │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── Gruntfile.js │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── README.md │ │ │ │ ├── examples.js │ │ │ │ ├── index.js │ │ │ │ ├── node_modules │ │ │ │ │ ├── lodash │ │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── dist │ │ │ │ │ │ │ ├── lodash.compat.js │ │ │ │ │ │ │ ├── lodash.compat.min.js │ │ │ │ │ │ │ ├── lodash.js │ │ │ │ │ │ │ ├── lodash.min.js │ │ │ │ │ │ │ ├── lodash.underscore.js │ │ │ │ │ │ │ └── lodash.underscore.min.js │ │ │ │ │ │ ├── lodash.js │ │ │ │ │ │ └── package.json │ │ │ │ │ └── underscore.string │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── Gemfile │ │ │ │ │ │ ├── Gemfile.lock │ │ │ │ │ │ ├── README.markdown │ │ │ │ │ │ ├── Rakefile │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ ├── dist │ │ │ │ │ │ └── underscore.string.min.js │ │ │ │ │ │ ├── lib │ │ │ │ │ │ └── underscore.string.js │ │ │ │ │ │ ├── libpeerconnection.log │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test │ │ │ │ │ │ ├── run-qunit.js │ │ │ │ │ │ ├── speed.js │ │ │ │ │ │ ├── strings.js │ │ │ │ │ │ ├── strings_standalone.js │ │ │ │ │ │ ├── test.html │ │ │ │ │ │ ├── test_standalone.html │ │ │ │ │ │ ├── test_underscore │ │ │ │ │ │ ├── arrays.js │ │ │ │ │ │ ├── chaining.js │ │ │ │ │ │ ├── collections.js │ │ │ │ │ │ ├── functions.js │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ ├── objects.js │ │ │ │ │ │ ├── speed.js │ │ │ │ │ │ ├── utility.js │ │ │ │ │ │ └── vendor │ │ │ │ │ │ │ ├── jquery.js │ │ │ │ │ │ │ ├── jslitmus.js │ │ │ │ │ │ │ ├── qunit.css │ │ │ │ │ │ │ └── qunit.js │ │ │ │ │ │ └── underscore.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ └── index.js │ │ │ ├── grunt-legacy-util │ │ │ │ ├── .jshintrc │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── Gruntfile.js │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── README.md │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── fixtures │ │ │ │ │ ├── Gruntfile-execArgv-child.js │ │ │ │ │ ├── Gruntfile-execArgv.js │ │ │ │ │ ├── Gruntfile-print-text.js │ │ │ │ │ ├── exec.cmd │ │ │ │ │ ├── exec.sh │ │ │ │ │ ├── spawn-multibyte.js │ │ │ │ │ └── spawn.js │ │ │ │ │ └── index.js │ │ │ ├── hooker │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── README.md │ │ │ │ ├── child.js │ │ │ │ ├── dist │ │ │ │ │ ├── ba-hooker.js │ │ │ │ │ └── ba-hooker.min.js │ │ │ │ ├── grunt.js │ │ │ │ ├── lib │ │ │ │ │ └── hooker.js │ │ │ │ ├── package.json │ │ │ │ ├── parent.js │ │ │ │ └── test │ │ │ │ │ └── hooker_test.js │ │ │ ├── iconv-lite │ │ │ │ ├── .npmignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── README.md~ │ │ │ │ ├── encodings │ │ │ │ │ ├── big5.js │ │ │ │ │ ├── gbk.js │ │ │ │ │ ├── singlebyte.js │ │ │ │ │ └── table │ │ │ │ │ │ ├── big5.js │ │ │ │ │ │ └── gbk.js │ │ │ │ ├── generation │ │ │ │ │ ├── generate-big5-table.js │ │ │ │ │ └── generate-singlebyte.js │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── big5-test.js │ │ │ │ │ ├── big5File.txt │ │ │ │ │ ├── cyrillic-test.js │ │ │ │ │ ├── gbk-test.js │ │ │ │ │ ├── gbkFile.txt │ │ │ │ │ ├── greek-test.js │ │ │ │ │ ├── main-test.js │ │ │ │ │ ├── performance.js │ │ │ │ │ └── turkish-test.js │ │ │ ├── js-yaml │ │ │ │ ├── HISTORY.md │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── bin │ │ │ │ │ └── js-yaml.js │ │ │ │ ├── examples │ │ │ │ │ ├── custom_types.js │ │ │ │ │ ├── custom_types.yaml │ │ │ │ │ ├── dumper.js │ │ │ │ │ ├── dumper.json │ │ │ │ │ ├── sample_document.js │ │ │ │ │ └── sample_document.yaml │ │ │ │ ├── index.js │ │ │ │ ├── lib │ │ │ │ │ ├── js-yaml.js │ │ │ │ │ └── js-yaml │ │ │ │ │ │ ├── common.js │ │ │ │ │ │ ├── dumper.js │ │ │ │ │ │ ├── exception.js │ │ │ │ │ │ ├── loader.js │ │ │ │ │ │ ├── mark.js │ │ │ │ │ │ ├── require.js │ │ │ │ │ │ ├── schema.js │ │ │ │ │ │ ├── schema │ │ │ │ │ │ ├── default.js │ │ │ │ │ │ ├── minimal.js │ │ │ │ │ │ └── safe.js │ │ │ │ │ │ ├── type.js │ │ │ │ │ │ └── type │ │ │ │ │ │ ├── binary.js │ │ │ │ │ │ ├── bool.js │ │ │ │ │ │ ├── float.js │ │ │ │ │ │ ├── int.js │ │ │ │ │ │ ├── js │ │ │ │ │ │ ├── function.js │ │ │ │ │ │ ├── regexp.js │ │ │ │ │ │ └── undefined.js │ │ │ │ │ │ ├── map.js │ │ │ │ │ │ ├── merge.js │ │ │ │ │ │ ├── null.js │ │ │ │ │ │ ├── omap.js │ │ │ │ │ │ ├── pairs.js │ │ │ │ │ │ ├── seq.js │ │ │ │ │ │ ├── set.js │ │ │ │ │ │ ├── str.js │ │ │ │ │ │ └── timestamp.js │ │ │ │ ├── node_modules │ │ │ │ │ ├── .bin │ │ │ │ │ │ ├── esparse │ │ │ │ │ │ ├── esparse.cmd │ │ │ │ │ │ ├── esvalidate │ │ │ │ │ │ └── esvalidate.cmd │ │ │ │ │ ├── argparse │ │ │ │ │ │ ├── HISTORY.md │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ ├── arguments.js │ │ │ │ │ │ │ ├── choice.js │ │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ │ ├── help.js │ │ │ │ │ │ │ ├── nargs.js │ │ │ │ │ │ │ ├── parents.js │ │ │ │ │ │ │ ├── prefix_chars.js │ │ │ │ │ │ │ ├── sub_commands.js │ │ │ │ │ │ │ ├── sum.js │ │ │ │ │ │ │ └── testformatters.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ ├── action.js │ │ │ │ │ │ │ ├── action │ │ │ │ │ │ │ │ ├── append.js │ │ │ │ │ │ │ │ ├── append │ │ │ │ │ │ │ │ │ └── constant.js │ │ │ │ │ │ │ │ ├── count.js │ │ │ │ │ │ │ │ ├── help.js │ │ │ │ │ │ │ │ ├── store.js │ │ │ │ │ │ │ │ ├── store │ │ │ │ │ │ │ │ │ ├── constant.js │ │ │ │ │ │ │ │ │ ├── false.js │ │ │ │ │ │ │ │ │ └── true.js │ │ │ │ │ │ │ │ ├── subparsers.js │ │ │ │ │ │ │ │ └── version.js │ │ │ │ │ │ │ ├── action_container.js │ │ │ │ │ │ │ ├── argparse.js │ │ │ │ │ │ │ ├── argument │ │ │ │ │ │ │ │ ├── error.js │ │ │ │ │ │ │ │ ├── exclusive.js │ │ │ │ │ │ │ │ └── group.js │ │ │ │ │ │ │ ├── argument_parser.js │ │ │ │ │ │ │ ├── const.js │ │ │ │ │ │ │ ├── help │ │ │ │ │ │ │ │ ├── added_formatters.js │ │ │ │ │ │ │ │ └── formatter.js │ │ │ │ │ │ │ └── namespace.js │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ ├── underscore.string │ │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ │ ├── README.markdown │ │ │ │ │ │ │ │ ├── bower.json │ │ │ │ │ │ │ │ ├── component.json │ │ │ │ │ │ │ │ ├── foo.js │ │ │ │ │ │ │ │ ├── gulpfile.js │ │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ │ └── underscore.string.js │ │ │ │ │ │ │ │ ├── libpeerconnection.log │ │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ │ └── underscore │ │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ │ ├── underscore-min.js │ │ │ │ │ │ │ │ └── underscore.js │ │ │ │ │ │ └── package.json │ │ │ │ │ └── esprima │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── bin │ │ │ │ │ │ ├── esparse.js │ │ │ │ │ │ └── esvalidate.js │ │ │ │ │ │ ├── esprima.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test │ │ │ │ │ │ ├── compat.js │ │ │ │ │ │ ├── reflect.js │ │ │ │ │ │ ├── run.js │ │ │ │ │ │ ├── runner.js │ │ │ │ │ │ └── test.js │ │ │ │ └── package.json │ │ │ ├── lodash │ │ │ │ ├── README.md │ │ │ │ ├── lodash.js │ │ │ │ ├── lodash.min.js │ │ │ │ ├── lodash.underscore.js │ │ │ │ ├── lodash.underscore.min.js │ │ │ │ └── package.json │ │ │ ├── minimatch │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── minimatch.js │ │ │ │ ├── node_modules │ │ │ │ │ ├── lru-cache │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ ├── CONTRIBUTORS │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ └── lru-cache.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test │ │ │ │ │ │ │ ├── basic.js │ │ │ │ │ │ │ ├── foreach.js │ │ │ │ │ │ │ └── memory-leak.js │ │ │ │ │ └── sigmund │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── bench.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── sigmund.js │ │ │ │ │ │ └── test │ │ │ │ │ │ └── basic.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── basic.js │ │ │ │ │ ├── brace-expand.js │ │ │ │ │ ├── caching.js │ │ │ │ │ ├── defaults.js │ │ │ │ │ └── extglob-ending-with-state-char.js │ │ │ ├── nopt │ │ │ │ ├── .npmignore │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── bin │ │ │ │ │ └── nopt.js │ │ │ │ ├── examples │ │ │ │ │ └── my-program.js │ │ │ │ ├── lib │ │ │ │ │ └── nopt.js │ │ │ │ ├── node_modules │ │ │ │ │ └── abbrev │ │ │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── abbrev.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── test.js │ │ │ │ └── package.json │ │ │ ├── rimraf │ │ │ │ ├── AUTHORS │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── bin.js │ │ │ │ ├── package.json │ │ │ │ ├── rimraf.js │ │ │ │ └── test │ │ │ │ │ ├── run.sh │ │ │ │ │ ├── setup.sh │ │ │ │ │ ├── test-async.js │ │ │ │ │ └── test-sync.js │ │ │ ├── underscore.string │ │ │ │ ├── .travis.yml │ │ │ │ ├── Gemfile │ │ │ │ ├── Gemfile.lock │ │ │ │ ├── README.markdown │ │ │ │ ├── Rakefile │ │ │ │ ├── dist │ │ │ │ │ └── underscore.string.min.js │ │ │ │ ├── lib │ │ │ │ │ └── underscore.string.js │ │ │ │ ├── package.json │ │ │ │ └── test │ │ │ │ │ ├── run-qunit.js │ │ │ │ │ ├── speed.js │ │ │ │ │ ├── strings.js │ │ │ │ │ ├── strings_standalone.js │ │ │ │ │ ├── test.html │ │ │ │ │ ├── test_standalone.html │ │ │ │ │ ├── test_underscore │ │ │ │ │ ├── arrays.js │ │ │ │ │ ├── chaining.js │ │ │ │ │ ├── collections.js │ │ │ │ │ ├── functions.js │ │ │ │ │ ├── objects.js │ │ │ │ │ ├── speed.js │ │ │ │ │ ├── temp.js │ │ │ │ │ ├── temp_tests.html │ │ │ │ │ ├── test.html │ │ │ │ │ ├── utility.js │ │ │ │ │ └── vendor │ │ │ │ │ │ ├── jquery.js │ │ │ │ │ │ ├── jslitmus.js │ │ │ │ │ │ ├── qunit.css │ │ │ │ │ │ └── qunit.js │ │ │ │ │ └── underscore.js │ │ │ └── which │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── bin │ │ │ │ └── which │ │ │ │ ├── package.json │ │ │ │ └── which.js │ │ └── package.json │ ├── spmrc │ │ ├── .npmignore │ │ ├── .travis.yml │ │ ├── README.md │ │ ├── index.js │ │ ├── package.json │ │ └── test │ │ │ └── spmrc.test.js │ └── win-spawn │ │ ├── .npmignore │ │ ├── README.md │ │ ├── bin │ │ └── win-spawn │ │ ├── index.js │ │ └── package.json │ ├── package.json │ └── scripts │ ├── post-install.js │ └── uninstall.js ├── now ├── .gitignore ├── .spmignore ├── .travis.yml ├── HISTORY.md ├── README.md ├── examples │ └── index.md ├── index.js ├── package.json └── tests │ └── index-spec.js └── test ├── .gitignore ├── .spmignore ├── .travis.yml ├── HISTORY.md ├── README.md ├── examples └── index.md ├── index.js ├── math.js ├── package.json └── tests └── index-spec.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | reactjs/webapp 3 | reactjs/live-demo/node_modules 4 | reactjs/live-demo/builds 5 | reactjs/react-0.13.0 6 | reactjs/react-tutorial 7 | reactjs/webpack_react 8 | .idea/ 9 | *.iml -------------------------------------------------------------------------------- /.idea/jsLibraryMappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Source Code 4 | 5 | 6 | 7 | 8 | 9 | com.aptana.ide.core.unifiedBuilder 10 | 11 | 12 | 13 | 14 | 15 | com.aptana.projects.webnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter01-Expressive-JavaScript/1.02 - Functions as first-class objects.js: -------------------------------------------------------------------------------- 1 | /* An anonymous function, executed immediately. */ 2 | 3 | (function() { 4 | var foo = 10; 5 | var bar = 2; 6 | alert(foo * bar); 7 | })(); 8 | 9 | 10 | /* An anonymous function with arguments. */ 11 | 12 | (function(foo, bar) { 13 | alert(foo * bar); 14 | })(10, 2); 15 | 16 | 17 | /* An anonymous function that returns a value. */ 18 | 19 | var baz = (function(foo, bar) { 20 | return foo * bar; 21 | })(10, 2); 22 | 23 | // baz will equal 20. 24 | 25 | 26 | /* An anonymous function used as a closure. */ 27 | 28 | var baz; 29 | 30 | (function() { 31 | var foo = 10; 32 | var bar = 2; 33 | baz = function() { 34 | return foo * bar; 35 | }; 36 | })(); 37 | 38 | baz(); // baz can access foo and bar, even though is it executed outside of the 39 | // anonymous function. 40 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter01-Expressive-JavaScript/1.03 - The mutability of objects.js: -------------------------------------------------------------------------------- 1 | function displayError(message) { 2 | displayError.numTimesExecuted++; 3 | alert(message); 4 | }; 5 | displayError.numTimesExecuted = 0; 6 | 7 | 8 | /* Class Person. */ 9 | 10 | function Person(name, age) { 11 | this.name = name; 12 | this.age = age; 13 | } 14 | Person.prototype = { 15 | getName: function() { 16 | return this.name; 17 | }, 18 | getAge: function() { 19 | return this.age; 20 | } 21 | } 22 | 23 | /* Instantiate the class. */ 24 | 25 | var alice = new Person('Alice', 93); 26 | var bill = new Person('Bill', 30); 27 | 28 | /* Modify the class. */ 29 | 30 | Person.prototype.getGreeting = function() { 31 | return 'Hi ' + this.getName() + '!'; 32 | }; 33 | 34 | /* Modify a specific instance. */ 35 | 36 | alice.displayGreeting = function() { 37 | alert(this.getGreeting()); 38 | } 39 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter02-Interfaces/2.01 - Describing interfaces with comments.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | interface Composite { 4 | function add(child); 5 | function remove(child); 6 | function getChild(index); 7 | } 8 | 9 | interface FormItem { 10 | function save(); 11 | } 12 | 13 | */ 14 | 15 | var CompositeForm = function(id, method, action) { // implements Composite, FormItem 16 | ... 17 | }; 18 | 19 | // Implement the Composite interface. 20 | 21 | CompositeForm.prototype.add = function(child) { 22 | ... 23 | }; 24 | CompositeForm.prototype.remove = function(child) { 25 | ... 26 | }; 27 | CompositeForm.prototype.getChild = function(index) { 28 | ... 29 | }; 30 | 31 | // Implement the FormItem interface. 32 | 33 | CompositeForm.prototype.save = function() { 34 | ... 35 | }; 36 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter02-Interfaces/2.03 - Emulating interfaces with duck typing.js: -------------------------------------------------------------------------------- 1 | // Interfaces. 2 | 3 | var Composite = new Interface('Composite', ['add', 'remove', 'getChild']); 4 | var FormItem = new Interface('FormItem', ['save']); 5 | 6 | // CompositeForm class 7 | 8 | var CompositeForm = function(id, method, action) { 9 | ... 10 | }; 11 | 12 | ... 13 | 14 | function addForm(formInstance) { 15 | ensureImplements(formInstance, Composite, FormItem); 16 | // This function will throw an error if a required method is not implemented. 17 | ... 18 | } 19 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter02-Interfaces/2.04 - The interface implementation for this book.js: -------------------------------------------------------------------------------- 1 | // Interfaces. 2 | 3 | var Composite = new Interface('Composite', ['add', 'remove', 'getChild']); 4 | var FormItem = new Interface('FormItem', ['save']); 5 | 6 | // CompositeForm class 7 | 8 | var CompositeForm = function(id, method, action) { // implements Composite, FormItem 9 | ... 10 | }; 11 | 12 | ... 13 | 14 | function addForm(formInstance) { 15 | Interface.ensureImplements(formInstance, Composite, FormItem); 16 | // This function will throw an error if a required method is not implemented, 17 | // halting execution of the function. 18 | // All code beneath this line will be executed only if the checks pass. 19 | ... 20 | } 21 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter02-Interfaces/2.06 - When to use the Interface class.js: -------------------------------------------------------------------------------- 1 | var DynamicMap = new Interface('DynamicMap', ['centerOnPoint', 'zoom', 'draw']); 2 | 3 | function displayRoute(mapInstance) { 4 | Interface.ensureImplements(mapInstace, DynamicMap); 5 | mapInstance.centerOnPoint(12, 34); 6 | mapInstance.zoom(5); 7 | mapInstance.draw(); 8 | ... 9 | } 10 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter03-Encapsulation-and-Information-Hiding/3.01 - Book example class.js: -------------------------------------------------------------------------------- 1 | // Book(isbn, title, author) 2 | var theHobbit = new Book('0-395-07122-4', 'The Hobbit', 'J. R. R. Tolkein'); 3 | theHobbit.display(); // Outputs the data by creating and populating an HTML element. 4 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter03-Encapsulation-and-Information-Hiding/3.04 - Scope, nested functions, and closures.js: -------------------------------------------------------------------------------- 1 | function foo() { 2 | var a = 10; 3 | 4 | function bar() { 5 | a *= 2; 6 | } 7 | 8 | bar(); 9 | return a; 10 | } 11 | 12 | 13 | 14 | 15 | function foo() { 16 | var a = 10; 17 | 18 | function bar() { 19 | a *= 2; 20 | return a; 21 | } 22 | 23 | return bar; 24 | } 25 | 26 | var baz = foo(); // baz is now a reference to function bar. 27 | baz(); // returns 20. 28 | baz(); // returns 40. 29 | baz(); // returns 80. 30 | 31 | var blat = foo(); // blat is another reference to bar. 32 | blat(); // returns 20, because a new copy of a is being used. 33 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter04-Inheritance/4.01 - Classical inheritance.js: -------------------------------------------------------------------------------- 1 | /* Class Person. */ 2 | 3 | function Person(name) { 4 | this.name = name; 5 | } 6 | 7 | Person.prototype.getName = function() { 8 | return this.name; 9 | } 10 | 11 | var reader = new Person('John Smith'); 12 | reader.getName(); 13 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter04-Inheritance/4.02 - The prototype chain.js: -------------------------------------------------------------------------------- 1 | /* Class Author. */ 2 | 3 | function Author(name, books) { 4 | Person.call(this, name); // Call the superclass' constructor in the scope of this. 5 | this.books = books; // Add an attribute to Author. 6 | } 7 | 8 | Author.prototype = new Person(); // Set up the prototype chain. 9 | Author.prototype.constructor = Author; // Set the constructor attribute to Author. 10 | Author.prototype.getBooks = function() { // Add a method to Author. 11 | return this.books; 12 | }; 13 | 14 | var author = []; 15 | author[0] = new Author('Dustin Diaz', ['JavaScript Design Patterns']); 16 | author[1] = new Author('Ross Harmes', ['JavaScript Design Patterns']); 17 | 18 | author[1].getName(); 19 | author[1].getBooks(); 20 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter04-Inheritance/4.06 - The clone function.js: -------------------------------------------------------------------------------- 1 | /* Clone function. */ 2 | 3 | function clone(object) { 4 | function F() {} 5 | F.prototype = object; 6 | return new F; 7 | } 8 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter04-Inheritance/4.07 - Mixin classes.js: -------------------------------------------------------------------------------- 1 | /* Mixin class. */ 2 | 3 | var Mixin = function() {}; 4 | Mixin.prototype = { 5 | serialize: function() { 6 | var output = []; 7 | for(key in this) { 8 | output.push(key + ': ' + this[key]); 9 | } 10 | return output.join(', '); 11 | } 12 | }; 13 | 14 | augment(Author, Mixin); 15 | 16 | var author = new Author('Ross Harmes', ['JavaScript Design Patterns']); 17 | var serializedString = author.serialize(); 18 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter05-The-Singleton-Pattern/5.01 - Basic structure of the singleton.js: -------------------------------------------------------------------------------- 1 | /* Basic Singleton. */ 2 | 3 | var Singleton = { 4 | attribute1: true, 5 | attribute2: 10, 6 | 7 | method1: function() { 8 | 9 | }, 10 | method2: function(arg) { 11 | 12 | } 13 | }; 14 | 15 | Singleton.attribute1 = false; 16 | var total = Singleton.attribute2 + 5; 17 | var result = Singleton.method1(); 18 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter05-The-Singleton-Pattern/5.04 - Private methods with underscores.js: -------------------------------------------------------------------------------- 1 | /* DataParser singleton, converts character delimited strings into arrays. */ 2 | 3 | GiantCorp.DataParser = { 4 | // Private methods. 5 | _stripWhitespace: function(str) { 6 | return str.replace(/\s+/, ''); 7 | }, 8 | _stringSplit: function(str, delimiter) { 9 | return str.split(delimiter); 10 | }, 11 | 12 | // Public method. 13 | stringToArray: function(str, delimiter, stripWS) { 14 | if(stripWS) { 15 | str = this._stripWhitespace(str); // 在单例模式中,推荐使用 GiantCorp.DataParser._stripWhitespace() 这种调用方式,防止弄错了this作用域 16 | } 17 | var outputArray = this._stringSplit(str, delimiter); 18 | return outputArray; 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter05-The-Singleton-Pattern/5.08 - Branching.js: -------------------------------------------------------------------------------- 1 | /* Branching Singleton (skeleton). */ 2 | 3 | MyNamespace.Singleton = (function() { 4 | var objectA = { 5 | method1: function() { 6 | ... 7 | }, 8 | method2: function() { 9 | ... 10 | } 11 | }; 12 | var objectB = { 13 | method1: function() { 14 | ... 15 | }, 16 | method2: function() { 17 | ... 18 | } 19 | }; 20 | 21 | return (someCondition) ? objectA : objectB; 22 | })(); 23 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter06-Chaining/6.01 - Introduction to chaining.js: -------------------------------------------------------------------------------- 1 | // Without chaining: 2 | addEvent($('example'), 'click', function() { 3 | setStyle(this, 'color', 'green'); 4 | show(this); 5 | }); 6 | 7 | // With chaining: 8 | $('example').addEvent('click', function() { 9 | $(this).setStyle('color', 'green').show(); 10 | }); 11 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter08-The-Bridge-Pattern/8.01 - Event listener example.js: -------------------------------------------------------------------------------- 1 | addEvent(element, 'click', getBeerById); 2 | function getBeerById(e) { 3 | var id = this.id; 4 | asyncRequest('GET', 'beer.uri?id=' + id, function(resp) { 5 | // Callback response. 6 | console.log('Requested Beer: ' + resp.responseText); 7 | }); 8 | } 9 | 10 | // 把事件处理的语句封装到回调函数中,现在我们通过接口而不是实现进行编程 11 | // getBeerById并没有和事件对象捆绑在一起。 12 | function getBeerById(id, callback) { 13 | // Make request for beer by ID, then return the beer data. 14 | asyncRequest('GET', 'beer.uri?id=' + id, function(resp) { 15 | // callback response 16 | callback(resp.responseText); 17 | }); 18 | } 19 | // 桥接器的使用:事件监听器回调函数 20 | addEvent(element, 'click', getBeerByIdBridge); 21 | function getBeerByIdBridge (e) { 22 | getBeerById(this.id, function(beer) { 23 | console.log('Requested Beer: '+beer); 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter08-The-Bridge-Pattern/8.02 - Other examples of bridges.js: -------------------------------------------------------------------------------- 1 | // 使用桥接模式收集某些私用性的信息,用特权方法作为桥梁以便访问私用变量空间 。 2 | var Public = function() { 3 | var secret = 3; 4 | this.privilegedGetter = function() { 5 | return secret; 6 | }; 7 | }; 8 | 9 | var o = new Public; 10 | var data = o.privilegedGetter(); 11 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter08-The-Bridge-Pattern/8.03 - Bridging multiple classes together.js: -------------------------------------------------------------------------------- 1 | var Class1 = function(a, b, c) { 2 | this.a = a; 3 | this.b = b; 4 | this.c = c; 5 | } 6 | var Class2 = function(d) { 7 | this.d = d; 8 | }; 9 | 10 | var BridgeClass = function(a, b, c, d) { 11 | this.one = new Class1(a, b, c); 12 | this.two = new Class2(d); 13 | }; 14 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter08-The-Bridge-Pattern/8.06 - Where have bridges been used_.js: -------------------------------------------------------------------------------- 1 | // Original function. 2 | 3 | var addRequest = function(request) { 4 | var data = request.split('-')[1]; 5 | // etc... 6 | }; 7 | 8 | // Function de-coupled. 9 | 10 | var addRequest = function(data) { 11 | // etc... 12 | }; 13 | 14 | // Bridge 15 | 16 | var addRequestFromClick = function(request) { 17 | addRequest(request.split(‘-‘)[0]); 18 | }; 19 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter09-The-Composite-Pattern/9.02 - Adding operations to FormItem.js: -------------------------------------------------------------------------------- 1 | // 向FormItem添加操作 2 | var FormItem = new Interface('FormItem', ['save', 'restore']); 3 | // 在超类Field中添加实现,以供其所有子类直接继承使用 4 | Field.prototype.restore = function() { 5 | this.element.value = getCookie(this.id); 6 | }; 7 | // 为组合表单添加同样的操作 8 | CompositeForm.prototype.restore = function() { 9 | for(var i = 0, len = this.formComponents.length; i < len; i++) { 10 | this.formComponents[i].restore(); 11 | } 12 | }; 13 | 14 | addEvent(window, 'load', contactForm.restore); 15 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter10-The-Facade-Pattern/10.01 - Some facades you probably already know about.js: -------------------------------------------------------------------------------- 1 | function addEvent(el, type, fn) { 2 | if (window.addEventListener) { 3 | el.addEventListener(type, fn, false); 4 | } 5 | else if (window.attachEvent) { 6 | el.attachEvent('on' + type, fn); 7 | } 8 | else { 9 | el['on' + type] = fn; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter11-The-Adapter-Pattern/11.01 - Characteristics of an adapter.js: -------------------------------------------------------------------------------- 1 | var clientObject = { 2 | string1: 'foo', 3 | string2: 'bar', 4 | string3: 'baz' 5 | }; 6 | function interfaceMethod(str1, str2, str3) { 7 | ... 8 | } 9 | 10 | function clientToInterfaceAdapter(o) { 11 | interfaceMethod(o.string1, o.string2, o.string3); 12 | } 13 | 14 | /* Usage. */ 15 | 16 | clientToInterfaceAdapter(clientObject); 17 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/Chapter12-The-Decorator-Pattern/12.04 - Function decorators.js: -------------------------------------------------------------------------------- 1 | // 一个简单的函数装饰者的例子 2 | function upperCaseDecorator(func) { 3 | return function() { 4 | return func.apply(this, arguments).toUpperCase(); 5 | } 6 | } 7 | // 这个装饰者可以用来创建新函数 8 | // 如下,先定义一个普通函数,然后将其装饰为一个新函数 9 | function getDate() { 10 | return (new Date()).toString(); 11 | } 12 | getDateCaps = upperCaseDecorator(getDate); 13 | 14 | alert(getDate()); // Returns Wed Sep 26 2007 20:11:02 GMT-0700 (PDT) 15 | alert(getDateCaps()); // Returns WED SEP 26 2007 20:11:02 GMT-0700 (PDT) 16 | 17 | BellDecorator.prototype.ringBellLoudly = 18 | upperCaseDecorator(BellDecorator.prototype.ringBell); 19 | 20 | var myBicycle = new AcmeComfortCruiser(); 21 | myBicycle = new BellDecorator(myBicycle); 22 | 23 | alert(myBicycle.ringBell()); // Returns 'Bell rung.' 24 | alert(myBicycle.ringBellLoudly()); // Returns 'BELL RUNG.' 25 | -------------------------------------------------------------------------------- /Pro-JavaScript-Design-Patterns/README.md: -------------------------------------------------------------------------------- 1 | ##JavaScript设计模式 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Javascript 2 | ========== 3 | 4 | JavaScript相关代码 5 | -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/02_01_hello-world.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Simple app 6 | 7 | 8 | 9 | 10 |

Hello {{ name | number:2 }}

11 | 12 | -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/02_02_simple-data-binding.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |

Hello {{ clock }}!

10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/02_03_best-data-binding-practice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 11 |

Hello {{ clock.now }}!

12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/chapter02_data_binding/02_01_hello-world.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Simple app 6 | 7 | 8 | 9 | 10 |

Hello {{ name }}

11 | 12 | -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/chapter02_data_binding/02_02_simple-data-binding.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |

Hello {{ clock }}!

10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/chapter02_data_binding/02_03_best-data-binding-practice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 11 |

Hello {{ clock.now }}!

12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/chapter02_data_binding/js/02_02_simple-data-binding.js: -------------------------------------------------------------------------------- 1 | function MyController($scope, $timeout) { 2 | var updateClock = function() { 3 | $scope.clock = new Date(); 4 | $timeout(function() { 5 | updateClock(); 6 | }, 1000); 7 | }; 8 | updateClock(); 9 | }; -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/chapter02_data_binding/js/02_03_best-data-binding-practice.js: -------------------------------------------------------------------------------- 1 | function MyController($scope) { 2 | $scope.clock = { 3 | now: new Date() 4 | }; 5 | var updateClock = function() { 6 | $scope.clock.now = new Date() 7 | }; 8 | setInterval(function() { 9 | $scope.$apply(updateClock); 10 | }, 1000); 11 | updateClock(); 12 | }; -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/js/02_02_simple-data-binding.js: -------------------------------------------------------------------------------- 1 | function MyController($scope, $timeout) { 2 | var updateClock = function() { 3 | $scope.clock = new Date(); 4 | $timeout(function() { 5 | updateClock(); 6 | }, 1000); 7 | }; 8 | updateClock(); 9 | }; -------------------------------------------------------------------------------- /angularjs/chapter02_data_binding/js/02_03_best-data-binding-practice.js: -------------------------------------------------------------------------------- 1 | function MyController($scope) { 2 | $scope.clock = { 3 | now: new Date() 4 | }; 5 | var updateClock = function() { 6 | $scope.clock.now = new Date() 7 | }; 8 | setInterval(function() { 9 | $scope.$apply(updateClock); 10 | }, 1000); 11 | updateClock(); 12 | }; -------------------------------------------------------------------------------- /angularjs/chapter03_module/README.md: -------------------------------------------------------------------------------- 1 | > AngularJS允许我们使用angular.module()方法来声明模块,这个方法能够接受两个参数,第一个是模块的名称,第二个是依赖列表,也就是可以被注入到模块中的对象列表。 2 | 3 | ```javascript 4 | // 这个方法相当于AngularJS模块的setter方法,是用来定义模块的。 5 | angular.module('myApp', []); 6 | 7 | // 这个方法用于获取应用,相当于AngularJS模块的getter方法 8 | angular.module('myApp') 9 | 10 | ``` 11 | 12 | > https://www.ng-book.com/media/toc.pdf 13 | -------------------------------------------------------------------------------- /angularjs/chapter04_scope/04_01_view-and-$scope.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /angularjs/chapter05_controller/05_01_controller-nesting.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 |
13 |
14 | Say hello 15 |
16 | {{ person }} 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /angularjs/chapter05_controller/js/05_01_controller-nesting.js: -------------------------------------------------------------------------------- 1 | var app = angular.module("myApp", []); 2 | app.controller('ParentController', function($scope) { 3 | $scope.person = {greeted: false}; 4 | }); 5 | app.controller('ChildController', function($scope) { 6 | $scope.sayHello = function() { 7 | $scope.person.name = 'Ari Lerner'; 8 | }; 9 | }); -------------------------------------------------------------------------------- /angularjs/chapter06_expression/06_01_parseFun.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Parse Expression Example 5 | 6 | 7 | 8 | 9 |
10 | 13 |
{{ parsedExpr }}
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /angularjs/chapter06_expression/06_02_interpolate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 |
{{ previewText }}
13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /angularjs/chapter06_expression/README.md: -------------------------------------------------------------------------------- 1 | 表达式和eval(javascript)非常相似,但是由于表达式由AngularJS来处理,它们有以下显著不同的特性: 2 | * 所有的表达式都在其所属的作用域内部执行,并有访问本地$scope的权限; 3 | * 如果表达式发生了TypeError和ReferenceError并不会抛出异常; 4 | * 不允许使用任何流程控制功能(条件控制,例如if/eles); 5 | * 可以接受过滤器和过滤器链。 6 | 7 | ##6.1、解析AngularJS表达式 8 | `$parse`: AngularJS通过`$parse`这个内部服务来进行表达式的运算,这个服务能够访问当前所处的作用域。 9 | 10 | [$parse/$eval和$observe/$watch如何区分](http://www.ngnice.com/posts/2314014da4eea8 "$parse/$eval和$observe/$watch如何区分") 11 | 12 | ##6.2、插值表达式 13 | `$interpolate服务`: 插值允许基于作用域上的某个条件实时更新文本字符串,可接收三个参数: 14 | * text(字符串):一个包含`字符插值标记`的字符串。 15 | * mustHaveExpression(布尔型):如果将这个参数设为true,当传入的字符串中不含有表达式时会返回null。 16 | * trustedContext(字符串):AngularJS会对已经进行过字符插值操作的字符串通过$sec.getTrusted()方法进行严格的上下文转义。 17 | 18 | -------------------------------------------------------------------------------- /angularjs/chapter06_expression/js/06_01_parseFun.js: -------------------------------------------------------------------------------- 1 | // open this example and type person.name into the test field 2 | angular.module('myApp', []) 3 | .controller('MyController', 4 | ['$scope', '$parse', function($scope, $parse) { 5 | 6 | $scope.person = { 7 | name: "Ari Lerner" 8 | }; 9 | 10 | $scope.$watch('expr', function(newVal, oldVal, scope) { 11 | if (newVal !== oldVal) { 12 | // Let's set up our parseFun with the expression 13 | var parseFun = $parse(newVal); 14 | // Get the value of the parsed expression, set it on the scope for output 15 | console.log(parseFun(scope)); 16 | console.log(parseFun()); 17 | scope.parsedExpr = parseFun(scope); 18 | console.log(scope); 19 | } 20 | }); 21 | }]); -------------------------------------------------------------------------------- /angularjs/chapter08_directive/08_01_myDirective.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /angularjs/chapter08_directive/js/08_01_myDirective.js: -------------------------------------------------------------------------------- 1 | angular.module('myApp',[]) 2 | .directive('myDirective', function() { 3 | return { 4 | restrict: 'E', 5 | template: 'Click me to go to Google' 6 | }; 7 | }); 8 | 9 | -------------------------------------------------------------------------------- /angularjs/chapter09_builtInDirective/09_01_ng-attribute.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | I'm feeling 404 9 | 10 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /html-template/20141212-wap-320width.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/html-template/20141212-wap-320width.html -------------------------------------------------------------------------------- /jQuery-lib.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib.zip -------------------------------------------------------------------------------- /jQuery-lib/README.md: -------------------------------------------------------------------------------- 1 | ##jQuery扩展插件 -------------------------------------------------------------------------------- /jQuery-lib/fancybox/example/1_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/example/1_b.jpg -------------------------------------------------------------------------------- /jQuery-lib/fancybox/example/1_s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/example/1_s.jpg -------------------------------------------------------------------------------- /jQuery-lib/fancybox/example/2_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/example/2_b.jpg -------------------------------------------------------------------------------- /jQuery-lib/fancybox/example/2_s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/example/2_s.jpg -------------------------------------------------------------------------------- /jQuery-lib/fancybox/example/3_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/example/3_b.jpg -------------------------------------------------------------------------------- /jQuery-lib/fancybox/example/3_s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/example/3_s.jpg -------------------------------------------------------------------------------- /jQuery-lib/fancybox/example/4_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/example/4_b.jpg -------------------------------------------------------------------------------- /jQuery-lib/fancybox/example/4_s.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/example/4_s.jpg -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_closebox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_closebox.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_left.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_progress.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_right.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_e.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_n.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_ne.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_nw.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_s.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_se.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_sw.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_shadow_w.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_title_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_title_left.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_title_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_title_main.png -------------------------------------------------------------------------------- /jQuery-lib/fancybox/jquery.fancybox/fancy_title_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/jQuery-lib/fancybox/jquery.fancybox/fancy_title_right.png -------------------------------------------------------------------------------- /jQuery-lib/imgUploadToolBar/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 22 | 23 | 24 |
25 | 26 | -------------------------------------------------------------------------------- /js-features/README.md: -------------------------------------------------------------------------------- 1 | ##JavaScript基础知识,特性 -------------------------------------------------------------------------------- /js-features/datatype/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /reactjs/live-demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "react", "stage-2"], 3 | } -------------------------------------------------------------------------------- /reactjs/live-demo/.eslintrc: -------------------------------------------------------------------------------- 1 | parser: 'babel-eslint' 2 | 3 | plugins: [ 'react' ] 4 | 5 | ecmaFeatures: 6 | jsx: true 7 | 8 | rules: 9 | quotes: [ 2, 'single' ] -------------------------------------------------------------------------------- /reactjs/live-demo/app/Components/Button.html: -------------------------------------------------------------------------------- 1 | {{text}} -------------------------------------------------------------------------------- /reactjs/live-demo/app/Components/Button.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | import template from './Button.html'; 3 | import Mustache from 'mustache'; 4 | import './Button.scss'; 5 | 6 | export default class Button { 7 | constructor(link) { 8 | this.link = link; 9 | } 10 | 11 | onClick(event) { 12 | event.preventDefault(); 13 | alert(this.link); 14 | } 15 | 16 | render(node) { 17 | const text = $(node).text(); 18 | 19 | // Render our button 20 | $(node).html( 21 | Mustache.render(template, {text}) 22 | ); 23 | 24 | console.log(Mustache.render(template, {text})) 25 | 26 | // Attach our listeners 27 | $('.button').click(this.onClick.bind(this)); 28 | } 29 | } -------------------------------------------------------------------------------- /reactjs/live-demo/app/Components/Button.scss: -------------------------------------------------------------------------------- 1 | .button { 2 | background: tomato; 3 | color: white; 4 | } -------------------------------------------------------------------------------- /reactjs/live-demo/app/Components/Header.html: -------------------------------------------------------------------------------- 1 |
{{text}}
-------------------------------------------------------------------------------- /reactjs/live-demo/app/Components/Header.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | import Mustache from 'mustache'; 3 | import template from './Header.html'; 4 | import './Header.scss'; 5 | 6 | export default class Header { 7 | 8 | render(node) { 9 | const text = $(node).text(); 10 | 11 | $(node).html( 12 | Mustache.render(template, {text}) 13 | ); 14 | } 15 | } -------------------------------------------------------------------------------- /reactjs/live-demo/app/Components/Header.scss: -------------------------------------------------------------------------------- 1 | .header { 2 | font-size: 3rem; 3 | } -------------------------------------------------------------------------------- /reactjs/live-demo/app/index2.js: -------------------------------------------------------------------------------- 1 | import './styles2.scss'; 2 | 3 | module.exports = require('./index2.react.jsx'); -------------------------------------------------------------------------------- /reactjs/live-demo/app/index2.react.jsx: -------------------------------------------------------------------------------- 1 | // main.js 2 | var React = require('react'); 3 | var ReactDOM = require('react-dom'); 4 | 5 | ReactDOM.render( 6 |

Hello, world!

, 7 | document.getElementById('example') 8 | ); 9 | -------------------------------------------------------------------------------- /reactjs/live-demo/app/styles1.scss: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | background: darken(white, 0.2); 4 | background-image: url('../img/puppy.jpg'); 5 | background-size: cover; 6 | } -------------------------------------------------------------------------------- /reactjs/live-demo/app/styles2.scss: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | background: darken(white, 0.2); 4 | background-image: url('../img/puppy.jpg'); 5 | background-size: cover; 6 | } -------------------------------------------------------------------------------- /reactjs/live-demo/app/template.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%= htmlWebpackPlugin.options.title %> 6 | <% 7 | for (var css in htmlWebpackPlugin.files.css) { 8 | %> 9 | 10 | <% 11 | } 12 | %> 13 | 14 | 15 | test 16 |

17 |
18 | <% 19 | for (var chunk in htmlWebpackPlugin.files.chunks) { 20 | %> 21 | 22 | <% 23 | } 24 | %> 25 | 26 | 27 | -------------------------------------------------------------------------------- /reactjs/live-demo/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/reactjs/live-demo/favicon.ico -------------------------------------------------------------------------------- /reactjs/live-demo/img/puppy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/reactjs/live-demo/img/puppy.jpg -------------------------------------------------------------------------------- /reactjs/live-demo/index1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 | 9 | 10 | 11 | test 12 |

13 |
14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /reactjs/live-demo/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 | 9 | 10 | 11 | test 12 |

13 |
14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /seajs/app/first-module-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 12 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /seajs/app/now.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /seajs/app/test.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /seajs/assets/scripts/application/application.js: -------------------------------------------------------------------------------- 1 | define(function(require,exports,module){ 2 | var util = require('./util'); 3 | 4 | var helloSeaJS = document.getElementById('hello-seajs'); 5 | helloSeaJS.style.color = util.randomColor(); 6 | window.setInterval(function(){ 7 | helloSeaJS.style.color = util.randomColor(); 8 | },1500); 9 | }); -------------------------------------------------------------------------------- /seajs/assets/scripts/application/util.js: -------------------------------------------------------------------------------- 1 | define(function(require,exports,module){ 2 | var util = {}; 3 | 4 | var colorRange = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']; 5 | 6 | util.randomColor = function(){ 7 | return '#' + 8 | colorRange[Math.floor(Math.random() * 16)] + 9 | colorRange[Math.floor(Math.random() * 16)] + 10 | colorRange[Math.floor(Math.random() * 16)] + 11 | colorRange[Math.floor(Math.random() * 16)] + 12 | colorRange[Math.floor(Math.random() * 16)] + 13 | colorRange[Math.floor(Math.random() * 16)]; 14 | }; 15 | 16 | module.exports = util; 17 | }); -------------------------------------------------------------------------------- /seajs/assets/scripts/seajs/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .ipr 4 | .iws 5 | *~ 6 | ~* 7 | *.diff 8 | *.patch 9 | *.bak 10 | .DS_Store 11 | Thumbs.db 12 | .svn/ 13 | *.swp 14 | .nojekyll 15 | .project 16 | .settings/ 17 | node_modules/ 18 | _site/ 19 | -------------------------------------------------------------------------------- /seajs/assets/scripts/seajs/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | src/ 3 | tests/ 4 | tools/ 5 | node_modules/ 6 | CNAME 7 | Makefile 8 | *.ico 9 | *.html 10 | *.txt 11 | *.xml 12 | *.yml 13 | *.iml 14 | .* 15 | *~ 16 | -------------------------------------------------------------------------------- /seajs/assets/scripts/seajs/.spmignore: -------------------------------------------------------------------------------- 1 | _site 2 | src 3 | docs 4 | lib 5 | tests 6 | -------------------------------------------------------------------------------- /seajs/assets/scripts/seajs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 0.10 5 | 6 | before_script: 7 | - phantomjs --version 8 | 9 | script: 10 | - make test 11 | -------------------------------------------------------------------------------- /seajs/assets/scripts/seajs/standalone.js: -------------------------------------------------------------------------------- 1 | /*! Sea.js 3.0.0 | seajs.org/LICENSE.md */ 2 | var define,require;!function(a,b){function c(a){return function(b){return{}.toString.call(b)=="[object "+a+"]"}}function d(){}var e=c("Function"),f={};d.prototype.exec=function(){function a(a){return d.get(a).exec()}var c=this;if(this.execed)return c.exports;this.execed=!0;var f=c.factory,g=e(f)?f(a,c.exports={},c):f;return g===b&&(g=c.exports),delete c.factory,c.exports=g,g},define=function(a,b,c){var e={id:a,deps:b,factory:c};d.save(e)},d.save=function(a){var b=d.get(a.id);b.id=a.id,b.dependencies=a.deps,b.factory=a.factory},d.get=function(a){return f[a]||(f[a]=new d)},require=function(a){var b=d.get(a);return b.execed||b.exec(),b.exports}}(this); -------------------------------------------------------------------------------- /seajs/sea-modules/examples/hello/1.0.0/style.css: -------------------------------------------------------------------------------- 1 | html,body,div,span,h1,h2,h3,h4,p,img,strong,ol,ul,li{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;background:transparent}body{background:#F4F4F4}#container{position:relative;margin:40px 120px;background:url(https://a248.e.akamai.net/assets.github.com/images/spinners/octocat-spinner-32.gif) no-repeat;min-height:32px}#container img{position:absolute;cursor:pointer;opacity:.6;display:none;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;transition-property:transform;-webkit-transition-duration:.8s;-moz-transition-duration:.8s;-o-transition-duration:.8s;transition-duration:.8s} 2 | -------------------------------------------------------------------------------- /seajs/sea-modules/gallery/backbone/1.0.0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "gallery", 3 | "name": "backbone", 4 | "version": "1.0.0", 5 | "description": "Give your JS App some Backbone with Models, Views, Collections, and Events.", 6 | "homepage": "http://backbonejs.org", 7 | "keywords": ["model", "view", "controller", "router", "server", "client", "browser"], 8 | "author": "Jeremy Ashkenas ", 9 | "package": "https://raw.github.com/documentcloud/backbone/master/package.json", 10 | "spm": { 11 | "alias": { 12 | "$": "$", 13 | "underscore": "gallery/underscore/1.4.4/underscore" 14 | }, 15 | "output": ["backbone.js"] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /seajs/sea-modules/gallery/underscore/1.4.4/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "underscore", 3 | "family": "gallery", 4 | "version": "1.4.4", 5 | "package": "https://raw.github.com/documentcloud/underscore/master/package.json", 6 | "description": "JavaScript's functional programming helper library.", 7 | "homepage": "http://underscorejs.org", 8 | "keywords": ["util", "functional", "server", "client", "browser"], 9 | "author": "Jeremy Ashkenas ", 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/documentcloud/underscore.git" 13 | }, 14 | "spm": { 15 | "output": ["underscore.js"] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /seajs/sea-modules/jquery/easing/1.3.0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "jquery", 3 | "name": "easing", 4 | "version": "1.3.0", 5 | "description": "jQuery easing plugin", 6 | "author": { 7 | "name": "jQuery Foundation and other contributors", 8 | "url": "http://jquery.com/" 9 | }, 10 | "keywords": [ "jquery", "animation", "easing" ], 11 | 12 | "spm": { 13 | "alias": { 14 | "jquery": "jquery" 15 | }, 16 | "output": ["easing.js"] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /seajs/sea-modules/jquery/jquery/1.10.1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "family": "jquery", 4 | "description": "JavaScript library for DOM operations", 5 | "version": "1.10.1", 6 | "package": "https://raw.github.com/jquery/jquery/master/package.json", 7 | "homepage": "http://jquery.com", 8 | "author": { 9 | "name": "jQuery Foundation and other contributors", 10 | "url": "https://github.com/jquery/jquery/blob/master/AUTHORS.txt" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/jquery/jquery.git" 15 | }, 16 | "bugs": { 17 | "url": "http://bugs.jquery.com" 18 | }, 19 | "licenses": [{ 20 | "type": "MIT", 21 | "url": "https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt" 22 | }] 23 | } 24 | -------------------------------------------------------------------------------- /seajs/sea-modules/moment/2.9.0/ender.js: -------------------------------------------------------------------------------- 1 | $.ender({ moment: require('moment') }) 2 | -------------------------------------------------------------------------------- /seajs/sea-modules/moment/2.9.0/package.js: -------------------------------------------------------------------------------- 1 | var profile = { 2 | resourceTags: { 3 | ignore: function(filename, mid){ 4 | // only include moment/moment 5 | return mid != "moment/moment"; 6 | }, 7 | amd: function(filename, mid){ 8 | return /\.js$/.test(filename); 9 | } 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /seajs/sea-modules/now/index-debug.js: -------------------------------------------------------------------------------- 1 | define("now/0.0.0/index-debug", ["moment/2.9.0/moment-debug"], function(require, exports, module){ 2 | // require module in spm.dependencies 3 | var moment = require("moment/2.9.0/moment-debug"); 4 | 5 | // require relative file in you project 6 | // var util = require('./util'); 7 | 8 | var now = 'test'; // moment().format('MMMM Do YYYY, h:mm:ss a'); 9 | module.exports = now; 10 | }); 11 | -------------------------------------------------------------------------------- /seajs/sea-modules/now/index.js: -------------------------------------------------------------------------------- 1 | define("now/0.0.0/index",["moment/2.9.0/moment"],function(e,n,m){var t=(e("moment/2.9.0/moment"),"test");m.exports=t}); -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/2.3.0/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .ipr 4 | .iws 5 | *~ 6 | ~* 7 | *.diff 8 | *.patch 9 | *.bak 10 | .DS_Store 11 | Thumbs.db 12 | .svn/ 13 | *.swp 14 | .nojekyll 15 | .project 16 | .settings/ 17 | node_modules/ 18 | _site/ 19 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/2.3.0/.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | src/ 3 | tests/ 4 | tools/ 5 | node_modules/ 6 | CNAME 7 | Makefile 8 | *.ico 9 | *.html 10 | *.txt 11 | *.xml 12 | *.yml 13 | *.iml 14 | .* 15 | *~ 16 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/2.3.0/.spmignore: -------------------------------------------------------------------------------- 1 | _site 2 | src 3 | docs 4 | lib 5 | tests 6 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/2.3.0/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 0.10 5 | 6 | before_script: 7 | - phantomjs --version 8 | 9 | script: 10 | - make test 11 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/2.3.0/Makefile: -------------------------------------------------------------------------------- 1 | 2 | build: 3 | @seatools build 4 | 5 | test: test_node test_local test_http 6 | 7 | test_node: 8 | @node tests/node-runner.js 9 | 10 | test_local: 11 | @seatools site 12 | @seatools test --local 13 | 14 | test_http: 15 | @seatools site 16 | @seatools test --http 17 | 18 | totoro: 19 | @seatools site 20 | @seatools test --totoro 21 | 22 | size: 23 | @seatools size 24 | 25 | pages: 26 | @seatools publish 27 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/2.3.0/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seajs", 3 | "version": "2.3.0", 4 | "main": "./dist/sea.js", 5 | "ignore": [ 6 | "**/.*", 7 | "docs", 8 | "lib", 9 | "src", 10 | "tests", 11 | "CNAME", 12 | "component.json", 13 | "CONTRIBUTING.md", 14 | "index.html", 15 | "Makefile", 16 | "package.json", 17 | "README.md" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/2.3.0/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seajs", 3 | "repo": "seajs/seajs", 4 | "description": "A Module Loader for the Web", 5 | "version": "2.2.0", 6 | "keywords": ["module", "loader"], 7 | "main": "dist/sea.js", 8 | "scripts": ["dist/sea.js", "dist/sea-debug.js"], 9 | "license": "MIT" 10 | } 11 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/2.3.0/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/2.3.0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "seajs", 3 | "name": "seajs", 4 | "version": "2.3.0", 5 | "description": "A Module Loader for the Web", 6 | "homepage": "http://seajs.org/", 7 | "keywords": ["module", "loader"], 8 | "author": "Frank Wang ", 9 | "engines": { 10 | "node": ">= 0.6.0" 11 | }, 12 | "dependencies": {}, 13 | "devDependencies": { 14 | "seatools": "*" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/seajs/seajs.git" 19 | }, 20 | "main": "./lib/sea.js", 21 | "spm": { 22 | "main": "./dist/sea.js" 23 | }, 24 | "licenses": [ 25 | { 26 | "type": "MIT", 27 | "url": "http://seajs.org/LICENSE.md" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/seajs/2.1.0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "seajs", 3 | "name": "seajs", 4 | "version": "2.1.0", 5 | "description": "A Module Loader for the Web", 6 | "homepage": "http://seajs.org/", 7 | "keywords": ["module", "loader"], 8 | "author": "Frank Wang ", 9 | "engines": { 10 | "node": ">= 0.6.0" 11 | }, 12 | "dependencies": {}, 13 | "devDependencies": { 14 | "grunt": "~0.4.0", 15 | "node-static": "~0.6.9", 16 | "grunt-contrib-concat": "~0.2.0", 17 | "gcc": "~0.2.0" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/seajs/seajs.git" 22 | }, 23 | "main": "./lib/sea.js", 24 | "licenses": [ 25 | { 26 | "type": "MIT", 27 | "url": "http://seajs.org/LICENSE.md" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/seajs/2.1.1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "seajs", 3 | "name": "seajs", 4 | "version": "2.1.1", 5 | "description": "A Module Loader for the Web", 6 | "homepage": "http://seajs.org/", 7 | "keywords": ["module", "loader"], 8 | "author": "Frank Wang ", 9 | "engines": { 10 | "node": ">= 0.6.0" 11 | }, 12 | "dependencies": {}, 13 | "devDependencies": { 14 | "grunt": "~0.4.0", 15 | "node-static": "~0.6.9", 16 | "grunt-contrib-concat": "~0.2.0", 17 | "gcc": "~0.2.0" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/seajs/seajs.git" 22 | }, 23 | "main": "./lib/sea.js", 24 | "licenses": [ 25 | { 26 | "type": "MIT", 27 | "url": "http://seajs.org/LICENSE.md" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /seajs/sea-modules/seajs/seajs/2.2.0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "seajs", 3 | "name": "seajs", 4 | "version": "2.2.1", 5 | "description": "A Module Loader for the Web", 6 | "homepage": "http://seajs.org/", 7 | "keywords": ["module", "loader"], 8 | "author": "Frank Wang ", 9 | "engines": { 10 | "node": ">= 0.6.0" 11 | }, 12 | "dependencies": {}, 13 | "devDependencies": { 14 | "seatools": "*" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/seajs/seajs.git" 19 | }, 20 | "main": "./lib/sea.js", 21 | "licenses": [ 22 | { 23 | "type": "MIT", 24 | "url": "http://seajs.org/LICENSE.md" 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /seajs/static/first-module/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .ipr 4 | .iws 5 | *~ 6 | ~* 7 | *.diff 8 | *.patch 9 | *.bak 10 | .DS_Store 11 | Thumbs.db 12 | .project 13 | .*proj 14 | .svn/ 15 | *.swp 16 | *.swo 17 | *.pyc 18 | *.pyo 19 | .build 20 | node_modules 21 | _site 22 | sea-modules 23 | spm_modules 24 | .cache 25 | dist 26 | coverage 27 | -------------------------------------------------------------------------------- /seajs/static/first-module/.spmignore: -------------------------------------------------------------------------------- 1 | dist 2 | _site 3 | sea-modules 4 | spm_modules 5 | node_modules 6 | .git 7 | tests 8 | examples 9 | test 10 | coverage 11 | -------------------------------------------------------------------------------- /seajs/static/first-module/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.10" 5 | 6 | install: 7 | - npm install spm coveralls 8 | 9 | before_script: 10 | - node_modules/spm/bin/spm-install 11 | 12 | script: 13 | - node_modules/spm/bin/spm-test 14 | 15 | after_success: 16 | - node_modules/spm/bin/spm-test --coveralls | node_modules/.bin/coveralls 17 | -------------------------------------------------------------------------------- /seajs/static/first-module/HISTORY.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | --- 4 | 5 | ## 1.0.0 6 | 7 | `new` It is the first version of first-module. 8 | -------------------------------------------------------------------------------- /seajs/static/first-module/README.md: -------------------------------------------------------------------------------- 1 | # first-module [![spm version](http://spmjs.io/badge/first-module)](http://spmjs.io/package/first-module) 2 | 3 | --- 4 | 5 | Just first module 6 | 7 | ## Install 8 | 9 | ``` 10 | $ spm install first-module --save 11 | ``` 12 | 13 | ## Usage 14 | 15 | ```js 16 | var firstModule = require('first-module'); 17 | // use firstModule 18 | ``` 19 | -------------------------------------------------------------------------------- /seajs/static/first-module/examples/index.md: -------------------------------------------------------------------------------- 1 | # Demo 2 | 3 | --- 4 | 5 | ## Normal usage 6 | 7 | ````javascript 8 | var firstModule = require('index'); 9 | ```` 10 | -------------------------------------------------------------------------------- /seajs/static/first-module/index.js: -------------------------------------------------------------------------------- 1 | var firstModule; 2 | 3 | module.exports = firstModule; 4 | -------------------------------------------------------------------------------- /seajs/static/first-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "first-module", 3 | "version": "1.0.0", 4 | "description": "Just first module", 5 | "keywords": [], 6 | "homepage": "", 7 | "author": "arthinking", 8 | "repository": { 9 | "type": "git", 10 | "url": "" 11 | }, 12 | "bugs": { 13 | "url": "" 14 | }, 15 | "licenses": "MIT", 16 | "spm": { 17 | "main": "src/index.js", 18 | "dependencies": { 19 | "jquery": "2.1.3" 20 | }, 21 | "devDependencies": { 22 | "expect.js": "0.3.1" 23 | } 24 | }, 25 | "devDependencies": { 26 | "spm": "3" 27 | }, 28 | "scripts": { 29 | "test": "spm test", 30 | "build": "spm build" 31 | } 32 | } -------------------------------------------------------------------------------- /seajs/static/first-module/src/index.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | 3 | var $ = require('jquery'); 4 | 5 | console.log($); 6 | 7 | module.exports = { 8 | }; 9 | 10 | }); -------------------------------------------------------------------------------- /seajs/static/first-module/tests/index-spec.js: -------------------------------------------------------------------------------- 1 | var expect = require('expect.js'); 2 | var firstModule = require('../index'); 3 | 4 | describe('first-module', function() { 5 | 6 | it('normal usage', function() { 7 | 8 | }); 9 | 10 | }); 11 | -------------------------------------------------------------------------------- /seajs/static/hello/Makefile: -------------------------------------------------------------------------------- 1 | 2 | build: 3 | @spm build 4 | 5 | deploy: 6 | @rm -rf ../../sea-modules/examples/hello 7 | @mkdir ../../sea-modules/examples/hello 8 | @mkdir ../../sea-modules/examples/hello/1.0.0 9 | @cp dist/*.* ../../sea-modules/examples/hello/1.0.0 10 | @echo 11 | @echo " deploy to seajs-modules/examples/hello/1.0.0" 12 | @echo 13 | -------------------------------------------------------------------------------- /seajs/static/hello/dist/style.css: -------------------------------------------------------------------------------- 1 | html,body,div,span,h1,h2,h3,h4,p,img,strong,ol,ul,li{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;background:transparent}body{background:#F4F4F4}#container{position:relative;margin:40px 120px;background:url(https://a248.e.akamai.net/assets.github.com/images/spinners/octocat-spinner-32.gif) no-repeat;min-height:32px}#container img{position:absolute;cursor:pointer;opacity:.6;display:none;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;transition-property:transform;-webkit-transition-duration:.8s;-moz-transition-duration:.8s;-o-transition-duration:.8s;transition-duration:.8s} 2 | -------------------------------------------------------------------------------- /seajs/static/hello/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "family": "examples", 3 | "name": "hello", 4 | "version": "1.0.0", 5 | 6 | "spm": { 7 | "alias": { 8 | "jquery": "jquery" 9 | }, 10 | "output": ["main.js", "application.js", "style.css"] 11 | } 12 | } -------------------------------------------------------------------------------- /seajs/static/hello/src/application.css: -------------------------------------------------------------------------------- 1 | html,body,h1{padding:0px;margin:0px;font-size:13px;} 2 | 3 | #hello-seajs{ 4 | -webkit-transition:color 1.5s ease; 5 | -o-transition:color 1.5s ease; 6 | -moz-transition:color 1.5s ease; 7 | transition:color 1.5s ease; 8 | font-size:10em; 9 | text-align:center; 10 | } -------------------------------------------------------------------------------- /seajs/static/hello/src/application.js: -------------------------------------------------------------------------------- 1 | define(function(require,exports,module){ 2 | var util = require('./util'); 3 | 4 | var helloSeaJS = document.getElementById('hello-seajs'); 5 | helloSeaJS.style.color = util.randomColor(); 6 | window.setInterval(function(){ 7 | helloSeaJS.style.color = util.randomColor(); 8 | },1500); 9 | }); -------------------------------------------------------------------------------- /seajs/static/hello/src/main.js: -------------------------------------------------------------------------------- 1 | define(function(require) { 2 | 3 | var Spinning = require('./spinning'); 4 | 5 | var s = new Spinning('#container'); 6 | s.render(); 7 | 8 | }); 9 | 10 | -------------------------------------------------------------------------------- /seajs/static/hello/src/util.js: -------------------------------------------------------------------------------- 1 | define(function(require,exports,module){ 2 | var util = {}; 3 | 4 | var colorRange = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']; 5 | 6 | util.randomColor = function(){ 7 | return '#' + 8 | colorRange[Math.floor(Math.random() * 16)] + 9 | colorRange[Math.floor(Math.random() * 16)] + 10 | colorRange[Math.floor(Math.random() * 16)] + 11 | colorRange[Math.floor(Math.random() * 16)] + 12 | colorRange[Math.floor(Math.random() * 16)] + 13 | colorRange[Math.floor(Math.random() * 16)]; 14 | }; 15 | 16 | module.exports = util; 17 | }); -------------------------------------------------------------------------------- /seajs/static/node_modules/.bin/spm-init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../spm-init/bin/spm-init" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../spm-init/bin/spm-init" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/.bin/spm-init.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\spm-init\bin\spm-init" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\spm-init\bin\spm-init" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/.npmignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .ipr 4 | .iws 5 | *~ 6 | ~* 7 | *.diff 8 | *.patch 9 | *.bak 10 | .DS_Store 11 | Thumbs.db 12 | .project 13 | .*proj 14 | .svn/ 15 | *.swp 16 | *.swo 17 | *.log 18 | node_modules/ 19 | .buildpath 20 | .settings 21 | .yml 22 | coverage.html 23 | lib-cov -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 0.8 5 | 6 | after_success: make coveralls 7 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/README-zh.md: -------------------------------------------------------------------------------- 1 | # Spm init 2 | 3 | spm 初始化命令 4 | 5 | --- 6 | 7 | ## 安装 8 | 9 | ``` 10 | $ npm install spm-init -g 11 | ``` 12 | 13 | ## 使用 14 | 15 | ``` 16 | $ spm-init 17 | ``` 18 | 19 | 如果已经安装 [spm2](https://github.com/spmjs/spm2) 可运行 20 | 21 | ``` 22 | $ spm init 23 | ``` 24 | 25 | ## 模板 26 | 27 | 模板文件默认路径为 `~/.spm/init`,可以通过配置(`~/.spm/spmrc`)修改 28 | 29 | ``` 30 | [init] 31 | template = ~/.spm-init 32 | ``` 33 | 34 | 下载模板 35 | 36 | ``` 37 | $ git clone https://github.com/spmjs/template-cmd ~/.spm/init/cmd 38 | ``` 39 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/README.md: -------------------------------------------------------------------------------- 1 | # Spm init 2 | 3 | [![David Status](https://david-dm.org/spmjs/spm-init.png)](https://david-dm.org/spmjs/spm-init) 4 | 5 | spm-init is a scaffolding tool used to automate project creation. 6 | 7 | --- 8 | 9 | ## Install 10 | 11 | ``` 12 | $ npm install spm-init -g 13 | ``` 14 | 15 | ## Usage 16 | 17 | ``` 18 | $ spm-init 19 | ``` 20 | 21 | If you have installed [spm2](https://github.com/spmjs/spm2): 22 | 23 | ``` 24 | $ spm init 25 | ``` 26 | 27 | ## Template 28 | 29 | The default template path is `~/.spm/init`, you can config `~/.spm/spmrc` 30 | 31 | ``` 32 | [init] 33 | template = ~/.spm-init 34 | ``` 35 | 36 | Install a template: 37 | 38 | ``` 39 | $ git clone https://github.com/spmjs/template-cmd ~/.spm/init/cmd 40 | ``` 41 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/.bin/grunt-init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../grunt-init/bin/grunt-init" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../grunt-init/bin/grunt-init" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/.bin/grunt-init.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\grunt-init\bin\grunt-init" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\grunt-init\bin\grunt-init" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/.bin/win-spawn: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../win-spawn/bin/win-spawn" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../win-spawn/bin/win-spawn" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/.bin/win-spawn.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\win-spawn\bin\win-spawn" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\win-spawn\bin\win-spawn" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/colorful/.cache/files.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/colorful/.cache/pages.json: -------------------------------------------------------------------------------- 1 | {"_docs/index.md":{"title":"Colorful","id":"-index","tags":[],"filepath":"_docs/index.md","meta":{"title":"Colorful","description":"

It's not just color, it's everything colorful in terminal.

","filepath":"_docs/index.md","filename":"index","directory":"","id":"-index"}}} -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/colorful/.cache/runtime.json: -------------------------------------------------------------------------------- 1 | {"loaded":"2013-03-18T08:18:41.567Z","nico":"0.3.0a1","cachetag":"0.1.0"} -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/colorful/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "asi": true, 3 | "eqeqeq": true, 4 | "forin": false, 5 | "latedef": false, 6 | "newcap": true, 7 | "quotmark": false, 8 | "undef": false, 9 | "unused": false, 10 | "trailing": true, 11 | "boss": true, 12 | "expr": true, 13 | "strict": false, 14 | "es5": true, 15 | "funcscope": true, 16 | "loopfunc": true, 17 | "multistr": true, 18 | "proto": false, 19 | "smarttabs": true, 20 | "shadow": false, 21 | "sub": true, 22 | "passfail": false, 23 | "white": false 24 | } 25 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/colorful/.npmignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .ipr 4 | .iws 5 | *~ 6 | ~* 7 | *.diff 8 | *.patch 9 | *.bak 10 | .DS_Store 11 | Thumbs.db 12 | .project 13 | .*proj 14 | .svn/ 15 | *.swp 16 | *.swo 17 | *.log 18 | node_modules/ 19 | .buildpath 20 | .settings 21 | .yml 22 | _docs 23 | _site 24 | *.png 25 | tests/ 26 | scripts/ 27 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/colorful/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/colorful/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @npm install -d 3 | @cp scripts/githooks/* .git/hooks/ 4 | @chmod -R +x .git/hooks/ 5 | 6 | colors: 7 | @node tests/colors.test.js 8 | 9 | 10 | files := $(shell find . -name '*.js' ! -path "*node_modules/*") 11 | lint: 12 | @node_modules/.bin/jshint ${files} 13 | 14 | theme = $(HOME)/.spm/themes/one 15 | documentation: 16 | @cp README.md _docs/index.md 17 | @nico build --theme=${theme} 18 | @cp screen-shot.png _site/ 19 | 20 | publish: clean documentation 21 | @ghp-import _site -p 22 | 23 | clean: 24 | @rm -fr _site 25 | 26 | server: 27 | @cp README.md _docs/index.md 28 | @nico server --theme=${theme} 29 | 30 | .PHONY: all build test lint coverage 31 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/colorful/nico.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": "_docs", 3 | "output": "_site", 4 | "permalink": "{{directory}}/{{filename}}", 5 | "sitename": "Colorful", 6 | "github": "https://github.com/lepture/colorful", 7 | "google": "UA-21475122-5", 8 | "writers": [ 9 | "nico.PageWriter", 10 | "nico.StaticWriter" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "latedef": true, 6 | "newcap": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "unused": true, 11 | "boss": true, 12 | "eqnull": true, 13 | "node": true, 14 | "es5": true 15 | } 16 | 17 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | tmp 4 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - 0.10 5 | before_script: 6 | - npm install -g grunt-cli -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/AUTHORS: -------------------------------------------------------------------------------- 1 | "Cowboy" Ben Alman (http://benalman.com) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/README.md: -------------------------------------------------------------------------------- 1 | # grunt-init [![Build Status](https://secure.travis-ci.org/gruntjs/grunt-init.png?branch=master)](http://travis-ci.org/gruntjs/grunt-init) 2 | Grunt-init is a scaffolding tool used to automate project creation. 3 | 4 | ## Introduction 5 | Check out our [project scaffolding guide] for a primer on how to use grunt-init. 6 | 7 | ## Documentation 8 | The [project scaffolding guide] has API documentation and usage examples. 9 | 10 | ## Support / Contributing 11 | Before you make an issue, please read our [contribution guide]. 12 | 13 | You can find the grunt team in [#grunt on irc.freenode.net](irc://irc.freenode.net/#grunt). 14 | 15 | 16 | [contribution guide]: http://gruntjs.com/contributing 17 | [project scaffolding guide]: http://gruntjs.com/project-scaffolding 18 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/.bin/semver: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../semver/bin/semver" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../semver/bin/semver" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/.bin/semver.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\semver\bin\semver" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/colors/themes/winston-dark.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'black', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red' 12 | }; -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/colors/themes/winston-light.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'grey', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red' 12 | }; -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/hooker/parent.js: -------------------------------------------------------------------------------- 1 | var spawn = require('child_process').spawn; 2 | 3 | function loop() { 4 | console.log('starting'); 5 | console.log(this); 6 | //var child = spawn('./node_modules/nodeunit/bin/nodeunit', ['test']); 7 | var child = spawn('node', ['child.js']); 8 | child.stdout.on('data', function(buffer) { 9 | process.stdout.write(buffer); 10 | }); 11 | child.on('exit', this.async()); 12 | } 13 | 14 | var context = { 15 | async: function() { return loop.bind(context); } 16 | }; 17 | loop.call(context); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | node_modules/* 3 | npm-debug.log -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | 6 | notifications: 7 | email: 8 | - travis@nodejitsu.com 9 | irc: "irc.freenode.org#nodejitsu" 10 | 11 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/examples/add-properties.js: -------------------------------------------------------------------------------- 1 | /* 2 | * add-properties.js: Example of how to add properties to an object using prompt. 3 | * 4 | * (C) 2010, Nodejitsu Inc. 5 | * 6 | */ 7 | 8 | var prompt = require('../lib/prompt'); 9 | 10 | // 11 | // Start the prompt 12 | // 13 | prompt.start(); 14 | 15 | var obj = { 16 | password: 'lamepassword', 17 | mindset: 'NY' 18 | } 19 | 20 | // 21 | // Log the initial object. 22 | // 23 | console.log('Initial object to be extended:'); 24 | console.dir(obj); 25 | 26 | // 27 | // Add two properties to the empty object: username and email 28 | // 29 | prompt.addProperties(obj, ['username', 'email'], function (err) { 30 | // 31 | // Log the results. 32 | // 33 | console.log('Updated object received:'); 34 | console.dir(obj); 35 | }); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/examples/password.js: -------------------------------------------------------------------------------- 1 | /* 2 | * simple-prompt.js: Simple example of using prompt. 3 | * 4 | * (C) 2010, Nodejitsu Inc. 5 | * 6 | */ 7 | 8 | var prompt = require('../lib/prompt'); 9 | 10 | // 11 | // Start the prompt 12 | // 13 | prompt.start(); 14 | 15 | // 16 | // Get two properties from the user: username and password 17 | // 18 | prompt.get([{ 19 | name:'password', 20 | hidden: true, 21 | validator: function (value, next) { 22 | setTimeout(next, 200); 23 | } 24 | }], function (err, result) { 25 | // 26 | // Log the results. 27 | // 28 | console.log('Command-line input received:'); 29 | console.log(' password: ' + result.password); 30 | }); 31 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/examples/simple-prompt.js: -------------------------------------------------------------------------------- 1 | /* 2 | * simple-prompt.js: Simple example of using prompt. 3 | * 4 | * (C) 2010, Nodejitsu Inc. 5 | * 6 | */ 7 | 8 | var prompt = require('../lib/prompt'); 9 | 10 | // 11 | // Start the prompt 12 | // 13 | prompt.start(); 14 | 15 | // 16 | // Get two properties from the user: username and email 17 | // 18 | prompt.get(['username', 'email'], function (err, result) { 19 | // 20 | // Log the results. 21 | // 22 | console.log('Command-line input received:'); 23 | console.log(' username: ' + result.username); 24 | console.log(' email: ' + result.email); 25 | }); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/async/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/nodeunit"] 2 | path = deps/nodeunit 3 | url = git://github.com/caolan/nodeunit.git 4 | [submodule "deps/UglifyJS"] 5 | path = deps/UglifyJS 6 | url = https://github.com/mishoo/UglifyJS.git 7 | [submodule "deps/nodelint"] 8 | path = deps/nodelint 9 | url = https://github.com/tav/nodelint.git 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/async/.npmignore: -------------------------------------------------------------------------------- 1 | deps 2 | dist 3 | test 4 | nodelint.cfg -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/async/Makefile: -------------------------------------------------------------------------------- 1 | PACKAGE = asyncjs 2 | NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) 3 | CWD := $(shell pwd) 4 | NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit 5 | UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs 6 | NODELINT = $(CWD)/node_modules/nodelint/nodelint 7 | 8 | BUILDDIR = dist 9 | 10 | all: clean test build 11 | 12 | build: $(wildcard lib/*.js) 13 | mkdir -p $(BUILDDIR) 14 | $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js 15 | 16 | test: 17 | $(NODEUNIT) test 18 | 19 | clean: 20 | rm -rf $(BUILDDIR) 21 | 22 | lint: 23 | $(NODELINT) --config nodelint.cfg lib/async.js 24 | 25 | .PHONY: test build all 26 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/async/index.js: -------------------------------------------------------------------------------- 1 | // This file is just added for convenience so this repository can be 2 | // directly checked out into a project's deps folder 3 | module.exports = require('./lib/async'); 4 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/pkginfo/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/pkginfo/examples/all-properties.js: -------------------------------------------------------------------------------- 1 | /* 2 | * all-properties.js: Sample of including all properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | pkginfo = require('../lib/pkginfo')(module); 10 | 11 | exports.someFunction = function () { 12 | console.log('some of your custom logic here'); 13 | }; 14 | 15 | console.log('Inspecting module:'); 16 | console.dir(module.exports); 17 | 18 | console.log('\nAll exports exposed:'); 19 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/pkginfo/examples/array-argument.js: -------------------------------------------------------------------------------- 1 | /* 2 | * array-argument.js: Sample of including specific properties from a package.json file 3 | * using Array argument syntax. 4 | * 5 | * (C) 2011, Charlie Robbins 6 | * 7 | */ 8 | 9 | var util = require('util'), 10 | pkginfo = require('../lib/pkginfo')(module, ['version', 'author']); 11 | 12 | exports.someFunction = function () { 13 | console.log('some of your custom logic here'); 14 | }; 15 | 16 | console.log('Inspecting module:'); 17 | console.dir(module.exports); 18 | 19 | console.log('\nAll exports exposed:'); 20 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/pkginfo/examples/multiple-properties.js: -------------------------------------------------------------------------------- 1 | /* 2 | * multiple-properties.js: Sample of including multiple properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | pkginfo = require('../lib/pkginfo')(module, 'version', 'author'); 10 | 11 | exports.someFunction = function () { 12 | console.log('some of your custom logic here'); 13 | }; 14 | 15 | console.log('Inspecting module:'); 16 | console.dir(module.exports); 17 | 18 | console.log('\nAll exports exposed:'); 19 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/pkginfo/examples/object-argument.js: -------------------------------------------------------------------------------- 1 | /* 2 | * object-argument.js: Sample of including specific properties from a package.json file 3 | * using Object argument syntax. 4 | * 5 | * (C) 2011, Charlie Robbins 6 | * 7 | */ 8 | 9 | var util = require('util'), 10 | pkginfo = require('../lib/pkginfo')(module, { 11 | include: ['version', 'author'] 12 | }); 13 | 14 | exports.someFunction = function () { 15 | console.log('some of your custom logic here'); 16 | }; 17 | 18 | console.log('Inspecting module:'); 19 | console.dir(module.exports); 20 | 21 | console.log('\nAll exports exposed:'); 22 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/pkginfo/examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple-app", 3 | "description": "A test fixture for pkginfo", 4 | "version": "0.1.0", 5 | "author": "Charlie Robbins ", 6 | "keywords": ["test", "fixture"], 7 | "main": "./index.js", 8 | "scripts": { "test": "vows test/*-test.js --spec" }, 9 | "engines": { "node": ">= 0.4.0" } 10 | } 11 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/pkginfo/examples/single-property.js: -------------------------------------------------------------------------------- 1 | /* 2 | * single-property.js: Sample of including a single specific properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | pkginfo = require('../lib/pkginfo')(module, 'version'); 10 | 11 | exports.someFunction = function () { 12 | console.log('some of your custom logic here'); 13 | }; 14 | 15 | console.log('Inspecting module:'); 16 | console.dir(module.exports); 17 | 18 | console.log('\nAll exports exposed:'); 19 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/pkginfo/examples/subdir/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple-app-subdir", 3 | "description": "A test fixture for pkginfo", 4 | "version": "0.1.0", 5 | "author": "Charlie Robbins ", 6 | "keywords": ["test", "fixture"], 7 | "main": "./index.js", 8 | "scripts": { "test": "vows test/*-test.js --spec" }, 9 | "engines": { "node": ">= 0.4.0" }, 10 | "subdironly": "true" 11 | } 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/pkginfo/examples/target-dir.js: -------------------------------------------------------------------------------- 1 | /* 2 | * multiple-properties.js: Sample of including multiple properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | path = require('path'), 10 | pkginfo = require('../lib/pkginfo')(module, { dir: path.resolve(__dirname, 'subdir' )}); 11 | 12 | exports.someFunction = function () { 13 | console.log('some of your custom logic here'); 14 | }; 15 | 16 | console.log('Inspecting module:'); 17 | console.dir(module.exports); 18 | 19 | console.log('\nAll exports exposed:'); 20 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/.npmignore: -------------------------------------------------------------------------------- 1 | test/*.log 2 | test/fixtures/*.json 3 | test/fixtures/logs/*.log 4 | node_modules/ 5 | node_modules/* 6 | npm-debug.log -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | - 0.7 6 | 7 | notifications: 8 | email: 9 | - travis@nodejitsu.com 10 | irc: "irc.freenode.org#nodejitsu" 11 | 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/examples/couchdb.js: -------------------------------------------------------------------------------- 1 | var winston = require('../lib/winston'); 2 | 3 | // 4 | // Create a new winston logger instance with two tranports: Console, and Couchdb 5 | // 6 | // 7 | // The Console transport will simply output to the console screen 8 | // The Couchdb tranport will perform an HTTP POST request to the specified CouchDB instance 9 | // 10 | var logger = new (winston.Logger)({ 11 | transports: [ 12 | new (winston.transports.Console)(), 13 | new (winston.transports.Couchdb)({ 'host': 'localhost', 'db': 'logs' }) 14 | // if you need auth do this: new (winston.transports.Couchdb)({ 'user': 'admin', 'pass': 'admin', 'host': 'localhost', 'db': 'logs' }) 15 | ] 16 | }); 17 | 18 | logger.log('info', 'Hello webhook log files!', { 'foo': 'bar' }); 19 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/examples/raw-mode.js: -------------------------------------------------------------------------------- 1 | var winston = require('../lib/winston'); 2 | 3 | var logger = new (winston.Logger)({ 4 | transports: [ 5 | new (winston.transports.Console)({ raw: true }), 6 | ] 7 | }); 8 | 9 | logger.log('info', 'Hello, this is a raw logging event', { 'foo': 'bar' }); 10 | logger.log('info', 'Hello, this is a raw logging event 2', { 'foo': 'bar' }); 11 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/examples/webhook-post.js: -------------------------------------------------------------------------------- 1 | var winston = require('../lib/winston'); 2 | 3 | // 4 | // Create a new winston logger instance with two tranports: Console, and Webhook 5 | // 6 | // 7 | // The Console transport will simply output to the console screen 8 | // The Webhook tranports will perform an HTTP POST request to an abritrary end-point ( for post/recieve webhooks ) 9 | // 10 | var logger = new (winston.Logger)({ 11 | transports: [ 12 | new (winston.transports.Console)(), 13 | new (winston.transports.Webhook)({ 'host': 'localhost', 'port': 8080, 'path': '/collectdata' }) 14 | ] 15 | }); 16 | 17 | logger.log('info', 'Hello webhook log files!', { 'foo': 'bar' }); 18 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/lib/winston/config/cli-config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * cli-config.js: Config that conform to commonly used CLI logging levels. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var cliConfig = exports; 10 | 11 | cliConfig.levels = { 12 | silly: 0, 13 | input: 1, 14 | verbose: 2, 15 | prompt: 3, 16 | info: 4, 17 | data: 5, 18 | help: 6, 19 | warn: 7, 20 | debug: 8, 21 | error: 9 22 | }; 23 | 24 | cliConfig.colors = { 25 | silly: 'magenta', 26 | input: 'grey', 27 | verbose: 'cyan', 28 | prompt: 'grey', 29 | info: 'green', 30 | data: 'grey', 31 | help: 'cyan', 32 | warn: 'yellow', 33 | debug: 'blue', 34 | error: 'red' 35 | }; -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/lib/winston/config/npm-config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * npm-config.js: Config that conform to npm logging levels. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var npmConfig = exports; 10 | 11 | npmConfig.levels = { 12 | silly: 0, 13 | verbose: 1, 14 | info: 2, 15 | warn: 3, 16 | debug: 4, 17 | error: 5 18 | }; 19 | 20 | npmConfig.colors = { 21 | silly: 'magenta', 22 | verbose: 'cyan', 23 | info: 'green', 24 | warn: 'yellow', 25 | debug: 'blue', 26 | error: 'red' 27 | }; -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/lib/winston/config/syslog-config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * syslog-config.js: Config that conform to syslog logging levels. 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var syslogConfig = exports; 10 | 11 | syslogConfig.levels = { 12 | debug: 0, 13 | info: 1, 14 | notice: 2, 15 | warning: 3, 16 | error: 4, 17 | crit: 5, 18 | alert: 6, 19 | emerg: 7 20 | }; 21 | 22 | syslogConfig.colors = { 23 | debug: 'blue', 24 | info: 'green', 25 | notice: 'yellow', 26 | warning: 'red', 27 | error: 'red', 28 | crit: 'red', 29 | alert: 'yellow', 30 | emerg: 'red' 31 | }; -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/lib/winston/transports.js: -------------------------------------------------------------------------------- 1 | /* 2 | * transports.js: Set of all transports Winston knows about 3 | * 4 | * (C) 2010 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var fs = require('fs'), 10 | path = require('path'), 11 | common = require('./common'); 12 | 13 | var transports = exports; 14 | 15 | // 16 | // Setup all transports as lazy-loaded getters. 17 | // 18 | fs.readdirSync(path.join(__dirname, 'transports')).forEach(function (file) { 19 | var transport = file.replace('.js', ''), 20 | name = common.capitalize(transport); 21 | 22 | if (transport === 'transport') { 23 | return; 24 | } 25 | 26 | transports.__defineGetter__(name, function () { 27 | return require('./transports/' + transport)[name]; 28 | }); 29 | }); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/eyes/Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | @@node test/eyes-test.js 3 | 4 | .PHONY: test 5 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/.npmignore: -------------------------------------------------------------------------------- 1 | test/data 2 | test/data/* 3 | node_modules 4 | npm-debug.log -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/lib/loggly.js: -------------------------------------------------------------------------------- 1 | /* 2 | * loggly.js: Wrapper for node-loggly object 3 | * 4 | * (C) 2010 Nodejitsu Inc. 5 | * MIT LICENSE 6 | * 7 | */ 8 | 9 | var loggly = exports; 10 | 11 | // 12 | // Export node-loggly core client APIs 13 | // 14 | loggly.createClient = require('./loggly/core').createClient; 15 | loggly.serialize = require('./loggly/common').serialize; 16 | loggly.Loggly = require('./loggly/core').Loggly; 17 | loggly.Config = require('./loggly/config').Config; 18 | 19 | // 20 | // Export Resources for node-loggly 21 | // 22 | loggly.Input = require('./loggly/input').Input; 23 | loggly.Facet = require('./loggly/facet').Facet; 24 | loggly.Device = require('./loggly/device').Device; 25 | loggly.Search = require('./loggly/search').Search; -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/googledoodle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/googledoodle.png -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/ssl/ca/ca.cnf: -------------------------------------------------------------------------------- 1 | [ req ] 2 | default_bits = 1024 3 | days = 3650 4 | distinguished_name = req_distinguished_name 5 | attributes = req_attributes 6 | prompt = no 7 | output_password = password 8 | 9 | [ req_distinguished_name ] 10 | C = US 11 | ST = CA 12 | L = Oakland 13 | O = request 14 | OU = request Certificate Authority 15 | CN = requestCA 16 | emailAddress = mikeal@mikealrogers.com 17 | 18 | [ req_attributes ] 19 | challengePassword = password challenge 20 | 21 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/ssl/ca/ca.crl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/ssl/ca/ca.crl -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/ssl/ca/ca.srl: -------------------------------------------------------------------------------- 1 | ADF62016AA40C9C3 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/ssl/ca/server.cnf: -------------------------------------------------------------------------------- 1 | [ req ] 2 | default_bits = 1024 3 | days = 3650 4 | distinguished_name = req_distinguished_name 5 | attributes = req_attributes 6 | prompt = no 7 | 8 | [ req_distinguished_name ] 9 | C = US 10 | ST = CA 11 | L = Oakland 12 | O = request 13 | OU = testing 14 | CN = testing.request.mikealrogers.com 15 | emailAddress = mikeal@mikealrogers.com 16 | 17 | [ req_attributes ] 18 | challengePassword = password challenge 19 | 20 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/ssl/ca/server.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBgjCCASwCAQAwgaMxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEQMA4GA1UE 3 | BxMHT2FrbGFuZDEQMA4GA1UEChMHcmVxdWVzdDEQMA4GA1UECxMHdGVzdGluZzEp 4 | MCcGA1UEAxMgdGVzdGluZy5yZXF1ZXN0Lm1pa2VhbHJvZ2Vycy5jb20xJjAkBgkq 5 | hkiG9w0BCQEWF21pa2VhbEBtaWtlYWxyb2dlcnMuY29tMFwwDQYJKoZIhvcNAQEB 6 | BQADSwAwSAJBAOBWXSMy6a86mYzbRbm/3KEaBmPyE+ERAX83vIIFUGf+tYZibvQg 7 | cLxP+lHlzQuRZzmB2cIkS8pZCOEMErFkPwUCAwEAAaAjMCEGCSqGSIb3DQEJBzEU 8 | ExJwYXNzd29yZCBjaGFsbGVuZ2UwDQYJKoZIhvcNAQEFBQADQQBD3E5WekQzCEJw 9 | 7yOcqvtPYIxGaX8gRKkYfLPoj3pm3GF5SGqtJKhylKfi89szHXgktnQgzff9FN+A 10 | HidVJ/3u 11 | -----END CERTIFICATE REQUEST----- 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/ssl/ca/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBOwIBAAJBAOBWXSMy6a86mYzbRbm/3KEaBmPyE+ERAX83vIIFUGf+tYZibvQg 3 | cLxP+lHlzQuRZzmB2cIkS8pZCOEMErFkPwUCAwEAAQJAK+r8ZM2sze8s7FRo/ApB 4 | iRBtO9fCaIdJwbwJnXKo4RKwZDt1l2mm+fzZ+/QaQNjY1oTROkIIXmnwRvZWfYlW 5 | gQIhAPKYsG+YSBN9o8Sdp1DMyZ/rUifKX3OE6q9tINkgajDVAiEA7Ltqh01+cnt0 6 | JEnud/8HHcuehUBLMofeg0G+gCnSbXECIQCqDvkXsWNNLnS/3lgsnvH0Baz4sbeJ 7 | rjIpuVEeg8eM5QIgbu0+9JmOV6ybdmmiMV4yAncoF35R/iKGVHDZCAsQzDECIQDZ 8 | 0jGz22tlo5YMcYSqrdD3U4sds1pwiAaWFRbCunoUJw== 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/test-pool.js: -------------------------------------------------------------------------------- 1 | var request = require('../main') 2 | , http = require('http') 3 | , assert = require('assert') 4 | ; 5 | 6 | var s = http.createServer(function (req, resp) { 7 | resp.statusCode = 200; 8 | resp.end('asdf'); 9 | }).listen(8080, function () { 10 | request({'url': 'http://localhost:8080', 'pool': false}, function (e, resp) { 11 | var agent = resp.request.agent; 12 | assert.strictEqual(typeof agent, 'boolean'); 13 | assert.strictEqual(agent, false); 14 | s.close(); 15 | }); 16 | }); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/test-s3.js: -------------------------------------------------------------------------------- 1 | var request = require('../main') 2 | 3 | var r = request.get('https://log.curlybracecast.com.s3.amazonaws.com/', 4 | { aws: 5 | { key: 'AKIAI6KIQRRVMGK3WK5Q' 6 | , secret: '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' 7 | , bucket: 'log.curlybracecast.com' 8 | } 9 | }, function (e, resp, body) { 10 | console.log(r.headers) 11 | console.log(body) 12 | } 13 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/tests/test-toJSON.js: -------------------------------------------------------------------------------- 1 | var request = require('../main') 2 | , http = require('http') 3 | , assert = require('assert') 4 | ; 5 | 6 | var s = http.createServer(function (req, resp) { 7 | resp.statusCode = 200 8 | resp.end('asdf') 9 | }).listen(8080, function () { 10 | var r = request('http://localhost:8080', function (e, resp) { 11 | assert.equal(JSON.parse(JSON.stringify(r)).response.statusCode, 200) 12 | s.close() 13 | }) 14 | }) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/request/uuid.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { 2 | var s = [], itoh = '0123456789ABCDEF'; 3 | 4 | // Make array of random hex digits. The UUID only has 32 digits in it, but we 5 | // allocate an extra items to make room for the '-'s we'll be inserting. 6 | for (var i = 0; i <36; i++) s[i] = Math.floor(Math.random()*0x10); 7 | 8 | // Conform to RFC-4122, section 4.4 9 | s[14] = 4; // Set 4 high bits of time_high field to version 10 | s[19] = (s[19] & 0x3) | 0x8; // Specify 2 high bits of clock sequence 11 | 12 | // Convert to hex chars 13 | for (var i = 0; i <36; i++) s[i] = itoh[s[i]]; 14 | 15 | // Insert '-'s 16 | s[8] = s[13] = s[18] = s[23] = '-'; 17 | 18 | return s.join(''); 19 | } 20 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/timespan/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | node_modules/* 3 | npm-debug.log -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/loggly/node_modules/timespan/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | #VERSION HISTORY 2 | 3 | ##2.0 4 | * [Breaking] Refactored this to work in node.js. Backwards compatibility to existing browser API coming in future 2.x releases. (indexzero) 5 | 6 | ## 1.2 7 | * Added TimeSpan.FromDates Constructor to take two dates 8 | and create a TimeSpan from the difference. (mstum) 9 | 10 | ## 1.1 11 | * Changed naming to follow JavaScript standards (mstum) 12 | * Added Documentation (mstum) 13 | 14 | ## 1.0 15 | * Initial Revision (mstum) 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/pkginfo/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/all-properties.js: -------------------------------------------------------------------------------- 1 | /* 2 | * all-properties.js: Sample of including all properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | pkginfo = require('../lib/pkginfo')(module); 10 | 11 | exports.someFunction = function () { 12 | console.log('some of your custom logic here'); 13 | }; 14 | 15 | console.log('Inspecting module:'); 16 | console.dir(module.exports); 17 | 18 | console.log('\nAll exports exposed:'); 19 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/array-argument.js: -------------------------------------------------------------------------------- 1 | /* 2 | * array-argument.js: Sample of including specific properties from a package.json file 3 | * using Array argument syntax. 4 | * 5 | * (C) 2011, Charlie Robbins 6 | * 7 | */ 8 | 9 | var util = require('util'), 10 | pkginfo = require('../lib/pkginfo')(module, ['version', 'author']); 11 | 12 | exports.someFunction = function () { 13 | console.log('some of your custom logic here'); 14 | }; 15 | 16 | console.log('Inspecting module:'); 17 | console.dir(module.exports); 18 | 19 | console.log('\nAll exports exposed:'); 20 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/multiple-properties.js: -------------------------------------------------------------------------------- 1 | /* 2 | * multiple-properties.js: Sample of including multiple properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | pkginfo = require('../lib/pkginfo')(module, 'version', 'author'); 10 | 11 | exports.someFunction = function () { 12 | console.log('some of your custom logic here'); 13 | }; 14 | 15 | console.log('Inspecting module:'); 16 | console.dir(module.exports); 17 | 18 | console.log('\nAll exports exposed:'); 19 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/object-argument.js: -------------------------------------------------------------------------------- 1 | /* 2 | * object-argument.js: Sample of including specific properties from a package.json file 3 | * using Object argument syntax. 4 | * 5 | * (C) 2011, Charlie Robbins 6 | * 7 | */ 8 | 9 | var util = require('util'), 10 | pkginfo = require('../lib/pkginfo')(module, { 11 | include: ['version', 'author'] 12 | }); 13 | 14 | exports.someFunction = function () { 15 | console.log('some of your custom logic here'); 16 | }; 17 | 18 | console.log('Inspecting module:'); 19 | console.dir(module.exports); 20 | 21 | console.log('\nAll exports exposed:'); 22 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simple-app", 3 | "description": "A test fixture for pkginfo", 4 | "version": "0.1.0", 5 | "author": "Charlie Robbins ", 6 | "keywords": ["test", "fixture"], 7 | "main": "./index.js", 8 | "scripts": { "test": "vows test/*-test.js --spec" }, 9 | "engines": { "node": ">= 0.4.0" } 10 | } 11 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/pkginfo/examples/single-property.js: -------------------------------------------------------------------------------- 1 | /* 2 | * single-property.js: Sample of including a single specific properties from a package.json file 3 | * 4 | * (C) 2011, Charlie Robbins 5 | * 6 | */ 7 | 8 | var util = require('util'), 9 | pkginfo = require('../lib/pkginfo')(module, 'version'); 10 | 11 | exports.someFunction = function () { 12 | console.log('some of your custom logic here'); 13 | }; 14 | 15 | console.log('Inspecting module:'); 16 | console.dir(module.exports); 17 | 18 | console.log('\nAll exports exposed:'); 19 | console.error(Object.keys(module.exports)); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/stack-trace/.npmignore: -------------------------------------------------------------------------------- 1 | test/ -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/node_modules/stack-trace/Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | test: 4 | @./test/run.js 5 | 6 | release: 7 | git push 8 | git push --tags 9 | npm publish . 10 | 11 | .PHONY: test 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/.gitkeep -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/keys/agent2-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB7DCCAZYCCQC7gs0MDNn6MTANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJV 3 | UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO 4 | BgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEgMB4GCSqGSIb3DQEJARYR 5 | cnlAdGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEy 6 | WjB9MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYD 7 | VQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEg 8 | MB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEF 9 | AANLADBIAkEAyXb8FrRdKbhrKLgLSsn61i1C7w7fVVVd7OQsmV/7p9WB2lWFiDlC 10 | WKGU9SiIz/A6wNZDUAuc2E+VwtpCT561AQIDAQABMA0GCSqGSIb3DQEBBQUAA0EA 11 | C8HzpuNhFLCI3A5KkBS5zHAQax6TFUOhbpBCR0aTDbJ6F1liDTK1lmU/BjvPoj+9 12 | 1LHwrmh29rK8kBPEjmymCQ== 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/keys/agent2-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIBOgIBAAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf+6fVgdpVhYg5 3 | QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAQJBAMT6Bf34+UHKY1ObpsbH 4 | 9u2jsVblFq1rWvs8GPMY6oertzvwm3DpuSUp7PTgOB1nLTLYtCERbQ4ovtN8tn3p 5 | OHUCIQDzIEGsoCr5vlxXvy2zJwu+fxYuhTZWMVuo1397L0VyhwIhANQh+yzqUgaf 6 | WRtSB4T2W7ADtJI35ET61jKBty3CqJY3AiAIwju7dVW3A5WeD6Qc1SZGKZvp9yCb 7 | AFI2BfVwwaY11wIgXF3PeGcvACMyMWsuSv7aPXHfliswAbkWuzcwA4TW01ECIGWa 8 | cgsDvVFxmfM5NPSuT/UDTa6R5BFISB5ea0N0AR3I 9 | -----END RSA PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/logs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/logs/.gitkeep -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/scripts/default-exceptions.js: -------------------------------------------------------------------------------- 1 | /* 2 | * default-exceptions.js: A test fixture for logging exceptions with the default winston logger. 3 | * 4 | * (C) 2011 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | winston = require('../../../lib/winston'); 11 | 12 | winston.handleExceptions([ 13 | new (winston.transports.File)({ 14 | filename: path.join(__dirname, '..', 'logs', 'default-exception.log'), 15 | handleExceptions: true 16 | }) 17 | ]); 18 | 19 | setTimeout(function () { 20 | throw new Error('OH NOES! It failed!'); 21 | }, 1000); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/scripts/exit-on-error.js: -------------------------------------------------------------------------------- 1 | /* 2 | * default-exceptions.js: A test fixture for logging exceptions with the default winston logger. 3 | * 4 | * (C) 2011 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | winston = require('../../../lib/winston'); 11 | 12 | winston.exitOnError = function (err) { 13 | return err.message !== 'Ignore this error'; 14 | }; 15 | 16 | winston.handleExceptions([ 17 | new (winston.transports.File)({ 18 | filename: path.join(__dirname, '..', 'logs', 'exit-on-error.log'), 19 | handleExceptions: true 20 | }) 21 | ]); 22 | 23 | setTimeout(function () { 24 | throw new Error('Ignore this error'); 25 | }, 1000); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/scripts/log-exceptions.js: -------------------------------------------------------------------------------- 1 | /* 2 | * log-exceptions.js: A test fixture for logging exceptions in winston. 3 | * 4 | * (C) 2011 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | winston = require('../../../lib/winston'); 11 | 12 | var logger = new (winston.Logger)({ 13 | transports: [ 14 | new (winston.transports.File)({ 15 | filename: path.join(__dirname, '..', 'logs', 'exception.log'), 16 | handleExceptions: true 17 | }) 18 | ] 19 | }); 20 | 21 | logger.handleExceptions(); 22 | 23 | setTimeout(function () { 24 | throw new Error('OH NOES! It failed!'); 25 | }, 1000); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/node_modules/prompt/node_modules/winston/test/fixtures/scripts/unhandle-exceptions.js: -------------------------------------------------------------------------------- 1 | /* 2 | * unhandle-exceptions.js: A test fixture for using `.unhandleExceptions()` winston. 3 | * 4 | * (C) 2011 Charlie Robbins 5 | * MIT LICENCE 6 | * 7 | */ 8 | 9 | var path = require('path'), 10 | winston = require('../../../lib/winston'); 11 | 12 | var logger = new (winston.Logger)({ 13 | transports: [ 14 | new (winston.transports.File)({ 15 | filename: path.join(__dirname, '..', 'logs', 'unhandle-exception.log'), 16 | handleExceptions: true 17 | }) 18 | ] 19 | }); 20 | 21 | logger.handleExceptions(); 22 | logger.unhandleExceptions(); 23 | 24 | setTimeout(function () { 25 | throw new Error('OH NOES! It failed!'); 26 | }, 1000); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt-init/templates/misc/placeholder: -------------------------------------------------------------------------------- 1 | What is this I don’t even -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/.npmignore: -------------------------------------------------------------------------------- 1 | docs 2 | test 3 | .travis.yml 4 | AUTHORS 5 | CHANGELOG 6 | custom-gruntfile.js 7 | Gruntfile.js 8 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Please see the [Contributing to grunt](http://gruntjs.com/contributing) guide for information on contributing to this project. 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/lib/grunt/event.js: -------------------------------------------------------------------------------- 1 | /* 2 | * grunt 3 | * http://gruntjs.com/ 4 | * 5 | * Copyright (c) 2014 "Cowboy" Ben Alman 6 | * Licensed under the MIT license. 7 | * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT 8 | */ 9 | 10 | 'use strict'; 11 | 12 | // External lib. 13 | var EventEmitter2 = require('eventemitter2').EventEmitter2; 14 | 15 | // Awesome. 16 | module.exports = new EventEmitter2({wildcard: true}); 17 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/cake: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../coffee-script/bin/cake" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../coffee-script/bin/cake" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/cake.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\coffee-script\bin\cake" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\coffee-script\bin\cake" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/coffee: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../coffee-script/bin/coffee" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../coffee-script/bin/coffee" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/coffee.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\coffee-script\bin\coffee" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\coffee-script\bin\coffee" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/js-yaml: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../js-yaml/bin/js-yaml.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/js-yaml.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\js-yaml\bin\js-yaml.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\js-yaml\bin\js-yaml.js" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/nopt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../nopt/bin/nopt.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/nopt.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\nopt\bin\nopt.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\nopt\bin\nopt.js" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/rimraf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../rimraf/bin.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../rimraf/bin.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/rimraf.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\rimraf\bin.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\rimraf\bin.js" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/which: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../which/bin/which" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../which/bin/which" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/.bin/which.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\which\bin\which" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\which\bin\which" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/async/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/nodeunit"] 2 | path = deps/nodeunit 3 | url = git://github.com/caolan/nodeunit.git 4 | [submodule "deps/UglifyJS"] 5 | path = deps/UglifyJS 6 | url = https://github.com/mishoo/UglifyJS.git 7 | [submodule "deps/nodelint"] 8 | path = deps/nodelint 9 | url = https://github.com/tav/nodelint.git 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/async/.npmignore: -------------------------------------------------------------------------------- 1 | deps 2 | dist 3 | test 4 | nodelint.cfg -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/async/Makefile: -------------------------------------------------------------------------------- 1 | PACKAGE = asyncjs 2 | NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) 3 | CWD := $(shell pwd) 4 | NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit 5 | UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs 6 | NODELINT = $(CWD)/node_modules/nodelint/nodelint 7 | 8 | BUILDDIR = dist 9 | 10 | all: clean test build 11 | 12 | build: $(wildcard lib/*.js) 13 | mkdir -p $(BUILDDIR) 14 | $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js 15 | 16 | test: 17 | $(NODEUNIT) test 18 | 19 | clean: 20 | rm -rf $(BUILDDIR) 21 | 22 | lint: 23 | $(NODELINT) --config nodelint.cfg lib/async.js 24 | 25 | .PHONY: test build all 26 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/async/index.js: -------------------------------------------------------------------------------- 1 | // This file is just added for convenience so this repository can be 2 | // directly checked out into a project's deps folder 3 | module.exports = require('./lib/async'); 4 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/coffee-script/.npmignore: -------------------------------------------------------------------------------- 1 | *.coffee 2 | *.html 3 | .DS_Store 4 | .git* 5 | Cakefile 6 | documentation/ 7 | examples/ 8 | extras/coffee-script.js 9 | raw/ 10 | src/ 11 | test/ 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/coffee-script/CNAME: -------------------------------------------------------------------------------- 1 | coffeescript.org -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/coffee-script/bin/cake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var path = require('path'); 4 | var fs = require('fs'); 5 | var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); 6 | 7 | require(lib + '/coffee-script/cake').run(); 8 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/coffee-script/bin/coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var path = require('path'); 4 | var fs = require('fs'); 5 | var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); 6 | 7 | require(lib + '/coffee-script/command').run(); 8 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/index.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.3.3 2 | (function() { 3 | var key, val, _ref; 4 | 5 | _ref = require('./coffee-script'); 6 | for (key in _ref) { 7 | val = _ref[key]; 8 | exports[key] = val; 9 | } 10 | 11 | }).call(this); 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/colors/themes/winston-dark.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'black', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red' 12 | }; -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/colors/themes/winston-light.js: -------------------------------------------------------------------------------- 1 | module['exports'] = { 2 | silly: 'rainbow', 3 | input: 'grey', 4 | verbose: 'cyan', 5 | prompt: 'grey', 6 | info: 'green', 7 | data: 'grey', 8 | help: 'cyan', 9 | warn: 'yellow', 10 | debug: 'blue', 11 | error: 'red' 12 | }; -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.js: -------------------------------------------------------------------------------- 1 | var dateFormat = require('../lib/dateformat.js'); 2 | 3 | var val = process.argv[2] || new Date(); 4 | console.log(dateFormat(val, 'W')); 5 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/eventemitter2/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/eventemitter2'); 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "latedef": "nofunc", 6 | "newcap": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "unused": true, 11 | "boss": true, 12 | "eqnull": true, 13 | "node": true 14 | } 15 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/.npmignore -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - '0.10' 5 | before_script: 6 | - npm install -g grunt-cli 7 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/test/fixtures/10-stderr.txt: -------------------------------------------------------------------------------- 1 | stderr 0 2 | stderr 1 3 | stderr 2 4 | stderr 3 5 | stderr 4 6 | stderr 5 7 | stderr 6 8 | stderr 7 9 | stderr 8 10 | stderr 9 11 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout-stderr.txt: -------------------------------------------------------------------------------- 1 | stdout 0 2 | stderr 0 3 | stdout 1 4 | stdout 2 5 | stderr 1 6 | stdout 3 7 | stderr 2 8 | stderr 3 9 | stdout 4 10 | stderr 4 11 | stdout 5 12 | stderr 5 13 | stdout 6 14 | stderr 6 15 | stdout 7 16 | stderr 7 17 | stdout 8 18 | stderr 8 19 | stdout 9 20 | stderr 9 21 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout.txt: -------------------------------------------------------------------------------- 1 | stdout 0 2 | stdout 1 3 | stdout 2 4 | stdout 3 5 | stdout 4 6 | stdout 5 7 | stdout 6 8 | stdout 7 9 | stdout 8 10 | stdout 9 11 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/test/fixtures/create-files.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | rm 10*.txt 4 | for n in 10 100 1000; do 5 | node log.js 0 $n stdout stderr &> $n-stdout-stderr.txt 6 | node log.js 0 $n stdout &> $n-stdout.txt 7 | node log.js 0 $n stderr &> $n-stderr.txt 8 | done 9 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/test/fixtures/log-broken.js: -------------------------------------------------------------------------------- 1 | var errorCode = process.argv[2]; 2 | var max = process.argv[3]; 3 | var modes = process.argv.slice(4); 4 | 5 | function stdout(message) { 6 | if (modes.indexOf('stdout') === -1) { return; } 7 | process.stdout.write('stdout ' + message + '\n'); 8 | } 9 | 10 | function stderr(message) { 11 | if (modes.indexOf('stderr') === -1) { return; } 12 | process.stderr.write('stderr ' + message + '\n'); 13 | } 14 | 15 | for (var i = 0; i < max; i++) { 16 | stdout(i); 17 | stderr(i); 18 | } 19 | 20 | process.exit(errorCode); 21 | 22 | stdout('fail'); 23 | stderr('fail'); 24 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/exit/test/fixtures/log.js: -------------------------------------------------------------------------------- 1 | var exit = require('../../lib/exit'); 2 | 3 | var errorCode = process.argv[2]; 4 | var max = process.argv[3]; 5 | var modes = process.argv.slice(4); 6 | 7 | function stdout(message) { 8 | if (modes.indexOf('stdout') === -1) { return; } 9 | process.stdout.write('stdout ' + message + '\n'); 10 | } 11 | 12 | function stderr(message) { 13 | if (modes.indexOf('stderr') === -1) { return; } 14 | process.stderr.write('stderr ' + message + '\n'); 15 | } 16 | 17 | for (var i = 0; i < max; i++) { 18 | stdout(i); 19 | stderr(i); 20 | } 21 | 22 | exit(errorCode); 23 | 24 | stdout('fail'); 25 | stderr('fail'); 26 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "loopfunc": true, 3 | "curly": true, 4 | "eqeqeq": true, 5 | "immed": true, 6 | "latedef": true, 7 | "newcap": true, 8 | "noarg": true, 9 | "sub": true, 10 | "undef": true, 11 | "unused": true, 12 | "boss": true, 13 | "eqnull": true, 14 | "node": true 15 | } 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/.npmignore -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | before_script: 5 | - npm install -g grunt-cli 6 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(grunt) { 4 | 5 | // Project configuration. 6 | grunt.initConfig({ 7 | nodeunit: { 8 | files: ['test/**/*_test.js'], 9 | }, 10 | jshint: { 11 | options: { 12 | jshintrc: '.jshintrc' 13 | }, 14 | all: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js'] 15 | } 16 | }); 17 | 18 | // Load plugins. 19 | grunt.loadNpmTasks('grunt-contrib-jshint'); 20 | grunt.loadNpmTasks('grunt-contrib-nodeunit'); 21 | 22 | // Default task. 23 | grunt.registerTask('default', ['jshint', 'nodeunit']); 24 | 25 | }; 26 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/.npmignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | test/a/ 3 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/examples/g.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../").Glob 2 | 3 | var pattern = "test/a/**/[cg]/../[cg]" 4 | console.log(pattern) 5 | 6 | var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { 7 | console.log("matches", matches) 8 | }) 9 | console.log("after") 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/examples/usr-local.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../").Glob 2 | 3 | var pattern = "{./*/*,/*,/usr/local/*}" 4 | console.log(pattern) 5 | 6 | var mg = new Glob(pattern, {mark: true}, function (er, matches) { 7 | console.log("matches", matches) 8 | }) 9 | console.log("after") 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | module.exports = require('util').inherits 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | ctor.super_ = superCtor 5 | ctor.prototype = Object.create(superCtor.prototype, { 6 | constructor: { 7 | value: ctor, 8 | enumerable: false, 9 | writable: true, 10 | configurable: true 11 | } 12 | }); 13 | }; 14 | } else { 15 | // old school shim for old browsers 16 | module.exports = function inherits(ctor, superCtor) { 17 | ctor.super_ = superCtor 18 | var TempCtor = function () {} 19 | TempCtor.prototype = superCtor.prototype 20 | ctor.prototype = new TempCtor() 21 | ctor.prototype.constructor = ctor 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/inherits/test.js: -------------------------------------------------------------------------------- 1 | var inherits = require('./inherits.js') 2 | var assert = require('assert') 3 | 4 | function test(c) { 5 | assert(c.constructor === Child) 6 | assert(c.constructor.super_ === Parent) 7 | assert(Object.getPrototypeOf(c) === Child.prototype) 8 | assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) 9 | assert(c instanceof Child) 10 | assert(c instanceof Parent) 11 | } 12 | 13 | function Child() { 14 | Parent.call(this) 15 | test(this) 16 | } 17 | 18 | function Parent() {} 19 | 20 | inherits(Child, Parent) 21 | 22 | var c = new Child 23 | test(c) 24 | 25 | console.log('ok') 26 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/minimatch/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # Authors, sorted by whether or not they are me 2 | Isaac Z. Schlueter 3 | Brian Cottingham 4 | Carlos Brito Lage 5 | Jesse Dailey 6 | Kevin O'Hara 7 | Marco Rogers 8 | Mark Cavage 9 | Marko Mikulicic 10 | Nathan Rajlich 11 | Satheesh Natesan 12 | Trent Mick 13 | ashleybrener 14 | n4kz 15 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/minimatch/test/caching.js: -------------------------------------------------------------------------------- 1 | var Minimatch = require("../minimatch.js").Minimatch 2 | var tap = require("tap") 3 | tap.test("cache test", function (t) { 4 | var mm1 = new Minimatch("a?b") 5 | var mm2 = new Minimatch("a?b") 6 | t.equal(mm1, mm2, "should get the same object") 7 | // the lru should drop it after 100 entries 8 | for (var i = 0; i < 100; i ++) { 9 | new Minimatch("a"+i) 10 | } 11 | mm2 = new Minimatch("a?b") 12 | t.notEqual(mm1, mm2, "cache should have dropped") 13 | t.end() 14 | }) 15 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var minimatch = require('../') 3 | 4 | test('extglob ending with statechar', function(t) { 5 | t.notOk(minimatch('ax', 'a?(b*)')) 6 | t.ok(minimatch('ax', '?(a*|b)')) 7 | t.end() 8 | }) 9 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/globstar-match.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../glob.js").Glob 2 | var test = require('tap').test 3 | 4 | test('globstar should not have dupe matches', function(t) { 5 | var pattern = 'a/**/[gh]' 6 | var g = new Glob(pattern, { cwd: __dirname }) 7 | var matches = [] 8 | g.on('match', function(m) { 9 | console.error('match %j', m) 10 | matches.push(m) 11 | }) 12 | g.on('end', function(set) { 13 | console.error('set', set) 14 | matches = matches.sort() 15 | set = set.sort() 16 | t.same(matches, set, 'should have same set of matches') 17 | t.end() 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/new-glob-optional-options.js: -------------------------------------------------------------------------------- 1 | var Glob = require('../glob.js').Glob; 2 | var test = require('tap').test; 3 | 4 | test('new glob, with cb, and no options', function (t) { 5 | new Glob(__filename, function(er, results) { 6 | if (er) throw er; 7 | t.same(results, [__filename]); 8 | t.end(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/node_modules/glob/test/zz-cleanup.js: -------------------------------------------------------------------------------- 1 | // remove the fixtures 2 | var tap = require("tap") 3 | , rimraf = require("rimraf") 4 | , path = require("path") 5 | 6 | tap.test("cleanup fixtures", function (t) { 7 | rimraf(path.resolve(__dirname, "a"), function (er) { 8 | t.ifError(er, "removed") 9 | t.end() 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/test/fixtures/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/test/fixtures/a.txt -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/b/bar.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/b/bar.txt -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/foo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/foo.txt -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/getobject/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "latedef": true, 6 | "newcap": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "unused": true, 11 | "boss": true, 12 | "eqnull": true, 13 | "node": true, 14 | "es5": true 15 | } 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/getobject/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/getobject/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | before_script: 6 | - npm install -g grunt-cli 7 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/getobject/README.md: -------------------------------------------------------------------------------- 1 | # getobject [![Build Status](https://secure.travis-ci.org/cowboy/node-getobject.png?branch=master)](http://travis-ci.org/cowboy/node-getobject) 2 | 3 | get.and.set.deep.objects.easily = true; 4 | 5 | ## Getting Started 6 | Install the module with: `npm install getobject` 7 | 8 | ```javascript 9 | var getobject = require('getobject'); 10 | ``` 11 | 12 | ## Contributing 13 | In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/). 14 | 15 | ## Release History 16 | _(Nothing yet)_ 17 | 18 | ## License 19 | Copyright (c) 2013 "Cowboy" Ben Alman 20 | Licensed under the MIT license. -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/glob/.npmignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | test/a/ 3 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/glob/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/glob/examples/g.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../").Glob 2 | 3 | var pattern = "test/a/**/[cg]/../[cg]" 4 | console.log(pattern) 5 | 6 | var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { 7 | console.log("matches", matches) 8 | }) 9 | console.log("after") 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/glob/examples/usr-local.js: -------------------------------------------------------------------------------- 1 | var Glob = require("../").Glob 2 | 3 | var pattern = "{./*/*,/*,/usr/local/*}" 4 | console.log(pattern) 5 | 6 | var mg = new Glob(pattern, {mark: true}, function (er, matches) { 7 | console.log("matches", matches) 8 | }) 9 | console.log("after") 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/glob/test/zz-cleanup.js: -------------------------------------------------------------------------------- 1 | // remove the fixtures 2 | var tap = require("tap") 3 | , rimraf = require("rimraf") 4 | , path = require("path") 5 | 6 | tap.test("cleanup fixtures", function (t) { 7 | rimraf(path.resolve(__dirname, "a"), function (er) { 8 | t.ifError(er, "removed") 9 | t.end() 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "latedef": "nofunc", 6 | "newcap": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "unused": true, 11 | "boss": true, 12 | "eqnull": true, 13 | "node": true 14 | } 15 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | - "0.11" 6 | before_script: 7 | - npm install -g grunt-cli 8 | matrix: 9 | fast_finish: true 10 | allow_failures: 11 | - node_js: "0.11" 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(grunt) { 4 | 5 | grunt.initConfig({ 6 | jshint: { 7 | options: { 8 | jshintrc: '.jshintrc', 9 | }, 10 | all: ['*.js', 'test/*.js'], 11 | }, 12 | nodeunit: { 13 | util: ['test/index1.js'] 14 | }, 15 | watch: { 16 | all: { 17 | files: ['<%= jshint.all %>'], 18 | tasks: ['test'], 19 | }, 20 | }, 21 | }); 22 | 23 | grunt.loadNpmTasks('grunt-contrib-jshint'); 24 | grunt.loadNpmTasks('grunt-contrib-nodeunit'); 25 | grunt.loadNpmTasks('grunt-contrib-watch'); 26 | 27 | grunt.registerTask('test', ['jshint', 'nodeunit']); 28 | grunt.registerTask('default', ['test', 'watch']); 29 | 30 | }; 31 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/README.md: -------------------------------------------------------------------------------- 1 | # grunt-legacy-log 2 | > The Grunt 0.4.x logger. 3 | 4 | [![Build Status](https://secure.travis-ci.org/gruntjs/grunt-legacy-log.png?branch=master)](http://travis-ci.org/gruntjs/grunt-legacy-log) 5 | [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) 6 | 7 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | rvm: 3 | - 1.9.3 4 | 5 | before_script: 6 | - "export DISPLAY=:99.0" 7 | - "sh -e /etc/init.d/xvfb start" 8 | - sleep 2 -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem 'uglifier' 4 | gem 'rake' 5 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | execjs (1.4.0) 5 | multi_json (~> 1.0) 6 | multi_json (1.3.6) 7 | rake (0.9.2.2) 8 | uglifier (1.3.0) 9 | execjs (>= 0.3.0) 10 | multi_json (~> 1.0, >= 1.0.2) 11 | 12 | PLATFORMS 13 | ruby 14 | 15 | DEPENDENCIES 16 | rake 17 | uglifier 18 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "underscore.string", 3 | "repo": "epeli/underscore.string", 4 | "description": "String manipulation extensions for Underscore.js javascript library", 5 | "version": "2.3.3", 6 | "keywords": ["underscore", "string"], 7 | "dependencies": {}, 8 | "development": {}, 9 | "main": "lib/underscore.string.js", 10 | "scripts": ["lib/underscore.string.js"] 11 | } 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/libpeerconnection.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/libpeerconnection.log -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/strings_standalone.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | 3 | module("String extensions"); 4 | 5 | test("underscore not included", function() { 6 | raises(function() { _("foo") }, /TypeError/); 7 | }); 8 | 9 | test("provides standalone functions", function() { 10 | equal(typeof _.str.trim, "function"); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-log/node_modules/underscore.string/test/test_standalone.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Underscore.strings Test Suite 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Underscore.string Test Suite

14 |

15 |

16 |
    17 | 18 | 19 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "latedef": "nofunc", 6 | "newcap": true, 7 | "noarg": true, 8 | "sub": true, 9 | "undef": true, 10 | "unused": true, 11 | "boss": true, 12 | "eqnull": true, 13 | "node": true 14 | } 15 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | - "0.11" 6 | before_script: 7 | - npm install -g grunt-cli 8 | matrix: 9 | fast_finish: true 10 | allow_failures: 11 | - node_js: "0.11" 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(grunt) { 4 | 5 | grunt.initConfig({ 6 | jshint: { 7 | options: { 8 | jshintrc: '.jshintrc', 9 | }, 10 | all: ['*.js', 'test/*.js'], 11 | }, 12 | nodeunit: { 13 | util: ['test/index1.js'] 14 | }, 15 | watch: { 16 | all: { 17 | files: ['<%= jshint.all %>'], 18 | tasks: ['test'], 19 | }, 20 | }, 21 | }); 22 | 23 | grunt.loadNpmTasks('grunt-contrib-jshint'); 24 | grunt.loadNpmTasks('grunt-contrib-nodeunit'); 25 | grunt.loadNpmTasks('grunt-contrib-watch'); 26 | 27 | grunt.registerTask('test', ['jshint', 'nodeunit']); 28 | grunt.registerTask('default', ['test', 'watch']); 29 | 30 | }; 31 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/Gruntfile-execArgv-child.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | grunt.registerTask('default', function(text) { 4 | console.log('OUTPUT: ' + process.execArgv.join(' ')); 5 | }); 6 | 7 | }; 8 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/Gruntfile-execArgv.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | var util = require('../../'); 4 | 5 | grunt.registerTask('default', function(text) { 6 | var done = this.async(); 7 | util.spawn({ 8 | grunt: true, 9 | args: ['--gruntfile', 'Gruntfile-execArgv-child.js'], 10 | }, function(err, result, code) { 11 | var matches = result.stdout.match(/^(OUTPUT: .*)/m); 12 | console.log(matches ? matches[1] : ''); 13 | done(); 14 | }); 15 | }); 16 | 17 | }; 18 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/Gruntfile-print-text.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | grunt.registerTask('print', 'Print the specified text.', function(text) { 4 | console.log('OUTPUT: ' + text); 5 | // console.log(process.cwd()); 6 | }); 7 | 8 | }; 9 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/exec.cmd: -------------------------------------------------------------------------------- 1 | @echo done 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/exec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "done" 3 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/spawn-multibyte.js: -------------------------------------------------------------------------------- 1 | // This is a test fixture for a case where spawn receives incomplete 2 | // multibyte strings in separate data events. 3 | 4 | // A multibyte buffer containing all our output. We will slice it later. 5 | // In this case we are using a Japanese word for hello / good day, where each 6 | // character takes three bytes. 7 | var fullOutput = new Buffer('こんにちは'); 8 | 9 | // Output one full character and one third of a character 10 | process.stdout.write(fullOutput.slice(0, 4)); 11 | 12 | // Output the rest of the string 13 | process.stdout.write(fullOutput.slice(4)); 14 | 15 | // Do the same for stderr 16 | process.stderr.write(fullOutput.slice(0, 4)); 17 | process.stderr.write(fullOutput.slice(4)); 18 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/grunt-legacy-util/test/fixtures/spawn.js: -------------------------------------------------------------------------------- 1 | 2 | var code = Number(process.argv[2]); 3 | 4 | process.stdout.write('stdout\n'); 5 | process.stderr.write('stderr\n'); 6 | 7 | // Instead of process.exit. See https://github.com/cowboy/node-exit 8 | require('exit')(code); 9 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/hooker/parent.js: -------------------------------------------------------------------------------- 1 | var spawn = require('child_process').spawn; 2 | 3 | function loop() { 4 | console.log('starting'); 5 | console.log(this); 6 | //var child = spawn('./node_modules/nodeunit/bin/nodeunit', ['test']); 7 | var child = spawn('node', ['child.js']); 8 | child.stdout.on('data', function(buffer) { 9 | process.stdout.write(buffer); 10 | }); 11 | child.on('exit', this.async()); 12 | } 13 | 14 | var context = { 15 | async: function() { return loop.bind(context); } 16 | }; 17 | loop.call(context); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/iconv-lite/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *~ 3 | *sublime-* 4 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/iconv-lite/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | - 0.8 6 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/iconv-lite/encodings/big5.js: -------------------------------------------------------------------------------- 1 | var big5Table = require('./table/big5.js'); 2 | module.exports = { 3 | 'windows950': 'big5', 4 | 'cp950': 'big5', 5 | 'big5': { 6 | type: 'table', 7 | table: big5Table 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/iconv-lite/encodings/gbk.js: -------------------------------------------------------------------------------- 1 | var gbkTable = require('./table/gbk.js'); 2 | module.exports = { 3 | 'windows936': 'gbk', 4 | 'gb2312': 'gbk', 5 | 'gbk': { 6 | type: 'table', 7 | table: gbkTable 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/iconv-lite/test/big5File.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/iconv-lite/test/big5File.txt -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/iconv-lite/test/gbkFile.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/iconv-lite/test/gbkFile.txt -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml: -------------------------------------------------------------------------------- 1 | subject: Custom types in JS-YAML 2 | spaces: 3 | - !space 4 | height: 1000 5 | width: 1000 6 | points: 7 | - !point [ 10, 43, 23 ] 8 | - !point [ 165, 0, 50 ] 9 | - !point [ 100, 100, 100 ] 10 | 11 | - !space 12 | height: 64 13 | width: 128 14 | points: 15 | - !point [ 12, 43, 0 ] 16 | - !point [ 1, 4, 90 ] 17 | 18 | - !space {} # An empty space 19 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/examples/dumper.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var yaml = require('../lib/js-yaml'); 5 | var object = require('./dumper.json'); 6 | 7 | 8 | console.log(yaml.dump(object, { 9 | flowLevel: 3, 10 | styles: { 11 | '!!int' : 'hexadecimal', 12 | '!!null' : 'camelcase' 13 | } 14 | })); 15 | 16 | 17 | // Output: 18 | //============================================================================== 19 | // name: Wizzard 20 | // level: 0x11 21 | // sanity: Null 22 | // inventory: 23 | // - name: Hat 24 | // features: [magic, pointed] 25 | // traits: {} 26 | // - name: Staff 27 | // features: [] 28 | // traits: {damage: 0xA} 29 | // - name: Cloak 30 | // features: [old] 31 | // traits: {defence: 0x0, comfort: 0x3} 32 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/examples/dumper.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Wizzard", 3 | "level" : 17, 4 | "sanity" : null, 5 | "inventory" : [ 6 | { 7 | "name" : "Hat", 8 | "features" : [ "magic", "pointed" ], 9 | "traits" : {} 10 | }, 11 | { 12 | "name" : "Staff", 13 | "features" : [], 14 | "traits" : { "damage" : 10 } 15 | }, 16 | { 17 | "name" : "Cloak", 18 | "features" : [ "old" ], 19 | "traits" : { "defence" : 0, "comfort" : 3 } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/examples/sample_document.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var inspect = require('util').inspect; 5 | 6 | // just require jsyaml 7 | require('../lib/js-yaml'); 8 | 9 | 10 | try { 11 | var doc = require(__dirname + '/sample_document.yaml'); 12 | console.log(inspect(doc, false, 10, true)); 13 | } catch (e) { 14 | console.log(e.stack || e.toString()); 15 | } 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/js-yaml.js'); 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | function YAMLException(reason, mark) { 5 | this.name = 'YAMLException'; 6 | this.reason = reason; 7 | this.mark = mark; 8 | this.message = this.toString(false); 9 | } 10 | 11 | 12 | YAMLException.prototype.toString = function toString(compact) { 13 | var result; 14 | 15 | result = 'JS-YAML: ' + (this.reason || '(unknown reason)'); 16 | 17 | if (!compact && this.mark) { 18 | result += ' ' + this.mark.toString(); 19 | } 20 | 21 | return result; 22 | }; 23 | 24 | 25 | module.exports = YAMLException; 26 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var fs = require('fs'); 5 | var loader = require('./loader'); 6 | 7 | 8 | function yamlRequireHandler(module, filename) { 9 | var content = fs.readFileSync(filename, 'utf8'); 10 | 11 | // fill in documents 12 | module.exports = loader.load(content, { filename: filename }); 13 | } 14 | 15 | // register require extensions only if we're on node.js 16 | // hack for browserify 17 | if (undefined !== require.extensions) { 18 | require.extensions['.yml'] = yamlRequireHandler; 19 | require.extensions['.yaml'] = yamlRequireHandler; 20 | } 21 | 22 | 23 | module.exports = require; 24 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Schema = require('../schema'); 5 | 6 | 7 | module.exports = Schema.DEFAULT = new Schema({ 8 | include: [ 9 | require('./safe') 10 | ], 11 | explicit: [ 12 | require('../type/js/undefined'), 13 | require('../type/js/regexp'), 14 | require('../type/js/function') 15 | ] 16 | }); 17 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Schema = require('../schema'); 5 | 6 | 7 | module.exports = new Schema({ 8 | explicit: [ 9 | require('../type/str'), 10 | require('../type/seq'), 11 | require('../type/map') 12 | ] 13 | }); 14 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Schema = require('../schema'); 5 | 6 | 7 | module.exports = new Schema({ 8 | include: [ 9 | require('./minimal') 10 | ], 11 | implicit: [ 12 | require('../type/null'), 13 | require('../type/bool'), 14 | require('../type/int'), 15 | require('../type/float'), 16 | require('../type/timestamp'), 17 | require('../type/merge') 18 | ], 19 | explicit: [ 20 | require('../type/binary'), 21 | require('../type/omap'), 22 | require('../type/pairs'), 23 | require('../type/set') 24 | ] 25 | }); 26 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Type = require('../../type'); 5 | 6 | 7 | function resolveJavascriptUndefined(/*object, explicit*/) { 8 | var undef; 9 | 10 | return undef; 11 | } 12 | 13 | 14 | function representJavascriptUndefined(/*object, explicit*/) { 15 | return ''; 16 | } 17 | 18 | 19 | module.exports = new Type('tag:yaml.org,2002:js/undefined', { 20 | loader: { 21 | kind: 'string', 22 | resolver: resolveJavascriptUndefined 23 | }, 24 | dumper: { 25 | kind: 'undefined', 26 | representer: representJavascriptUndefined 27 | } 28 | }); 29 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Type = require('../type'); 5 | 6 | 7 | module.exports = new Type('tag:yaml.org,2002:map', { 8 | loader: { 9 | kind: 'object' 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var NIL = require('../common').NIL; 5 | var Type = require('../type'); 6 | 7 | 8 | function resolveYamlMerge(object /*, explicit*/) { 9 | return '<<' === object ? object : NIL; 10 | } 11 | 12 | 13 | module.exports = new Type('tag:yaml.org,2002:merge', { 14 | loader: { 15 | kind: 'string', 16 | resolver: resolveYamlMerge 17 | } 18 | }); 19 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Type = require('../type'); 5 | 6 | 7 | module.exports = new Type('tag:yaml.org,2002:seq', { 8 | loader: { 9 | kind: 'array' 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var NIL = require('../common').NIL; 5 | var Type = require('../type'); 6 | 7 | 8 | var _hasOwnProperty = Object.prototype.hasOwnProperty; 9 | 10 | 11 | function resolveYamlSet(object /*, explicit*/) { 12 | var key; 13 | 14 | for (key in object) { 15 | if (_hasOwnProperty.call(object, key)) { 16 | if (null !== object[key]) { 17 | return NIL; 18 | } 19 | } 20 | } 21 | 22 | return object; 23 | } 24 | 25 | 26 | module.exports = new Type('tag:yaml.org,2002:set', { 27 | loader: { 28 | kind: 'object', 29 | resolver: resolveYamlSet 30 | } 31 | }); 32 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Type = require('../type'); 5 | 6 | 7 | module.exports = new Type('tag:yaml.org,2002:str', { 8 | loader: { 9 | kind: 'string' 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esparse: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../esprima/bin/esparse.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esparse.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\esprima\bin\esparse.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\esprima\bin\esparse.js" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esvalidate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=`dirname "$0"` 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../esprima/bin/esvalidate.js" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/.bin/esvalidate.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\esprima\bin\esvalidate.js" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\esprima\bin\esvalidate.js" %* 7 | ) -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | 4 | var ArgumentParser = require('../lib/argparse').ArgumentParser; 5 | var parser = new ArgumentParser({ 6 | version: '0.0.1', 7 | addHelp: true, 8 | description: 'Argparse examples: choice' 9 | }); 10 | 11 | parser.addArgument(['foo'], {choices: 'abc'}); 12 | 13 | parser.printHelp(); 14 | console.log('-----------'); 15 | 16 | var args; 17 | args = parser.parseArgs(['c']); 18 | console.dir(args); 19 | console.log('-----------'); 20 | parser.parseArgs(['X']); 21 | console.dir(args); 22 | 23 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | 4 | var ArgumentParser = require('../lib/argparse').ArgumentParser; 5 | var parser = new ArgumentParser({ 6 | version: '0.0.1', 7 | addHelp: true, 8 | description: 'Argparse examples: help', 9 | epilog: 'help epilog', 10 | prog: 'help_example_prog', 11 | usage: 'Usage %(prog)s ' 12 | }); 13 | parser.printHelp(); 14 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | 4 | var ArgumentParser = require('../lib/argparse').ArgumentParser; 5 | var parser = new ArgumentParser({ 6 | version: '0.0.1', 7 | addHelp: true, 8 | description: 'Argparse examples: nargs' 9 | }); 10 | parser.addArgument( 11 | [ '-f', '--foo' ], 12 | { 13 | help: 'foo bar', 14 | nargs: 1 15 | } 16 | ); 17 | parser.addArgument( 18 | [ '-b', '--bar' ], 19 | { 20 | help: 'bar foo', 21 | nargs: '*' 22 | } 23 | ); 24 | 25 | parser.printHelp(); 26 | console.log('-----------'); 27 | 28 | var args; 29 | args = parser.parseArgs('--foo a --bar c d'.split(' ')); 30 | console.dir(args); 31 | console.log('-----------'); 32 | args = parser.parseArgs('--bar b c f --foo a'.split(' ')); 33 | console.dir(args); 34 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | 4 | var ArgumentParser = require('../lib/argparse').ArgumentParser; 5 | var parser = new ArgumentParser({ 6 | version: '0.0.1', 7 | addHelp: true, 8 | description: 'Argparse examples: prefix_chars', 9 | prefixChars: '-+' 10 | }); 11 | parser.addArgument(['+f', '++foo']); 12 | parser.addArgument(['++bar'], {action: 'storeTrue'}); 13 | 14 | parser.printHelp(); 15 | console.log('-----------'); 16 | 17 | var args; 18 | args = parser.parseArgs(['+f', '1']); 19 | console.dir(args); 20 | args = parser.parseArgs(['++bar']); 21 | console.dir(args); 22 | args = parser.parseArgs(['++foo', '2', '++bar']); 23 | console.dir(args); 24 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/argparse'); 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js: -------------------------------------------------------------------------------- 1 | /*:nodoc:* 2 | * class ActionStoreTrue 3 | * 4 | * This action store the values True respectively. 5 | * This isspecial cases of 'storeConst' 6 | * 7 | * This class inherited from [[Action]] 8 | **/ 9 | 'use strict'; 10 | 11 | var util = require('util'); 12 | 13 | var ActionStoreConstant = require('./constant'); 14 | 15 | /*:nodoc:* 16 | * new ActionStoreTrue(options) 17 | * - options (object): options hash see [[Action.new]] 18 | * 19 | **/ 20 | var ActionStoreTrue = module.exports = function ActionStoreTrue(options) { 21 | options = options || {}; 22 | options.constant = true; 23 | options.defaultValue = options.defaultValue !== null ? options.defaultValue: false; 24 | ActionStoreConstant.call(this, options); 25 | }; 26 | util.inherits(ActionStoreTrue, ActionStoreConstant); 27 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports.ArgumentParser = require('./argument_parser.js'); 4 | module.exports.Namespace = require('./namespace'); 5 | module.exports.Action = require('./action'); 6 | module.exports.HelpFormatter = require('./help/formatter.js'); 7 | module.exports.Const = require('./const.js'); 8 | 9 | module.exports.ArgumentDefaultsHelpFormatter = 10 | require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter; 11 | module.exports.RawDescriptionHelpFormatter = 12 | require('./help/added_formatters.js').RawDescriptionHelpFormatter; 13 | module.exports.RawTextHelpFormatter = 14 | require('./help/added_formatters.js').RawTextHelpFormatter; 15 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js: -------------------------------------------------------------------------------- 1 | // 2 | // Constants 3 | // 4 | module.exports.EOL = '\n'; 5 | 6 | module.exports.SUPPRESS = '==SUPPRESS=='; 7 | 8 | module.exports.OPTIONAL = '?'; 9 | 10 | module.exports.ZERO_OR_MORE = '*'; 11 | 12 | module.exports.ONE_OR_MORE = '+'; 13 | 14 | module.exports.PARSER = 'A...'; 15 | 16 | module.exports.REMAINDER = '...'; 17 | 18 | module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'; 19 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | dist 3 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.11" 4 | 5 | before_script: 6 | - "export DISPLAY=:99.0" 7 | - "sh -e /etc/init.d/xvfb start" 8 | - sleep 2 9 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "underscore.string", 3 | "repo": "epeli/underscore.string", 4 | "description": "String manipulation extensions for Underscore.js javascript library", 5 | "version": "2.4.0", 6 | "keywords": ["underscore", "string"], 7 | "dependencies": {}, 8 | "development": {}, 9 | "main": "lib/underscore.string.js", 10 | "scripts": ["lib/underscore.string.js"] 11 | } 12 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/foo.js: -------------------------------------------------------------------------------- 1 | 2 | function boolMatch(s, matchers) { 3 | var i, matcher, down = s.toLowerCase(); 4 | matchers = [].concat(matchers); 5 | for (i = 0; i < matchers.length; i += 1) { 6 | matcher = matchers[i]; 7 | if (matcher.test && matcher.test(s)) return true; 8 | if (matcher && matcher.toLowerCase() === down) return true; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/minimatch/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/.npmignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # Authors, sorted by whether or not they are me 2 | Isaac Z. Schlueter 3 | Brian Cottingham 4 | Carlos Brito Lage 5 | Jesse Dailey 6 | Kevin O'Hara 7 | Marco Rogers 8 | Mark Cavage 9 | Marko Mikulicic 10 | Nathan Rajlich 11 | Satheesh Natesan 12 | Trent Mick 13 | ashleybrener 14 | n4kz 15 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var sigmund = require('../sigmund.js') 3 | 4 | 5 | // occasionally there are duplicates 6 | // that's an acceptable edge-case. JSON.stringify and util.inspect 7 | // have some collision potential as well, though less, and collision 8 | // detection is expensive. 9 | var hash = '{abc/def/g{0h1i2{jkl' 10 | var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} 11 | var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} 12 | 13 | var obj3 = JSON.parse(JSON.stringify(obj1)) 14 | obj3.c = /def/ 15 | obj3.g[2].cycle = obj3 16 | var cycleHash = '{abc/def/g{0h1i2{jklcycle' 17 | 18 | test('basic', function (t) { 19 | t.equal(sigmund(obj1), hash) 20 | t.equal(sigmund(obj2), hash) 21 | t.equal(sigmund(obj3), cycleHash) 22 | t.end() 23 | }) 24 | 25 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/minimatch/test/brace-expand.js: -------------------------------------------------------------------------------- 1 | var tap = require("tap") 2 | , minimatch = require("../") 3 | 4 | tap.test("brace expansion", function (t) { 5 | // [ pattern, [expanded] ] 6 | ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" 7 | , [ "abxy" 8 | , "abxz" 9 | , "acdxy" 10 | , "acdxz" 11 | , "acexy" 12 | , "acexz" 13 | , "afhxy" 14 | , "afhxz" 15 | , "aghxy" 16 | , "aghxz" ] ] 17 | , [ "a{1..5}b" 18 | , [ "a1b" 19 | , "a2b" 20 | , "a3b" 21 | , "a4b" 22 | , "a5b" ] ] 23 | , [ "a{b}c", ["a{b}c"] ] 24 | ].forEach(function (tc) { 25 | var p = tc[0] 26 | , expect = tc[1] 27 | t.equivalent(minimatch.braceExpand(p), expect, p) 28 | }) 29 | console.error("ending") 30 | t.end() 31 | }) 32 | 33 | 34 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/minimatch/test/caching.js: -------------------------------------------------------------------------------- 1 | var Minimatch = require("../minimatch.js").Minimatch 2 | var tap = require("tap") 3 | tap.test("cache test", function (t) { 4 | var mm1 = new Minimatch("a?b") 5 | var mm2 = new Minimatch("a?b") 6 | t.equal(mm1, mm2, "should get the same object") 7 | // the lru should drop it after 100 entries 8 | for (var i = 0; i < 100; i ++) { 9 | new Minimatch("a"+i) 10 | } 11 | mm2 = new Minimatch("a?b") 12 | t.notEqual(mm1, mm2, "cache should have dropped") 13 | t.end() 14 | }) 15 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var minimatch = require('../') 3 | 4 | test('extglob ending with statechar', function(t) { 5 | t.notOk(minimatch('ax', 'a?(b*)')) 6 | t.ok(minimatch('ax', '?(a*|b)')) 7 | t.end() 8 | }) 9 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/nopt/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arthinking/Javascript/828e387f77a43b0430540944d9512edadd349f21/seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/nopt/.npmignore -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/nopt/node_modules/abbrev/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | To get started, sign the 3 | Contributor License Agreement. 4 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md: -------------------------------------------------------------------------------- 1 | # abbrev-js 2 | 3 | Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). 4 | 5 | Usage: 6 | 7 | var abbrev = require("abbrev"); 8 | abbrev("foo", "fool", "folding", "flop"); 9 | 10 | // returns: 11 | { fl: 'flop' 12 | , flo: 'flop' 13 | , flop: 'flop' 14 | , fol: 'folding' 15 | , fold: 'folding' 16 | , foldi: 'folding' 17 | , foldin: 'folding' 18 | , folding: 'folding' 19 | , foo: 'foo' 20 | , fool: 'fool' 21 | } 22 | 23 | This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. 24 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/rimraf/AUTHORS: -------------------------------------------------------------------------------- 1 | # Authors sorted by whether or not they're me. 2 | Isaac Z. Schlueter (http://blog.izs.me) 3 | Wayne Larsen (http://github.com/wvl) 4 | ritch 5 | Marcel Laverdet 6 | Yosef Dinerstein 7 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/rimraf/test/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | code=0 4 | for i in test-*.js; do 5 | echo -n $i ... 6 | bash setup.sh 7 | node $i 8 | if [ -d target ]; then 9 | echo "fail" 10 | code=1 11 | else 12 | echo "pass" 13 | fi 14 | done 15 | rm -rf target 16 | exit $code 17 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/rimraf/test/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | files=10 6 | folders=2 7 | depth=4 8 | target="$PWD/target" 9 | 10 | rm -rf target 11 | 12 | fill () { 13 | local depth=$1 14 | local files=$2 15 | local folders=$3 16 | local target=$4 17 | 18 | if ! [ -d $target ]; then 19 | mkdir -p $target 20 | fi 21 | 22 | local f 23 | 24 | f=$files 25 | while [ $f -gt 0 ]; do 26 | touch "$target/f-$depth-$f" 27 | let f-- 28 | done 29 | 30 | let depth-- 31 | 32 | if [ $depth -le 0 ]; then 33 | return 0 34 | fi 35 | 36 | f=$folders 37 | while [ $f -gt 0 ]; do 38 | mkdir "$target/folder-$depth-$f" 39 | fill $depth $files $folders "$target/d-$depth-$f" 40 | let f-- 41 | done 42 | } 43 | 44 | fill $depth $files $folders $target 45 | 46 | # sanity assert 47 | [ -d $target ] 48 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/rimraf/test/test-async.js: -------------------------------------------------------------------------------- 1 | var rimraf = require("../rimraf") 2 | , path = require("path") 3 | rimraf(path.join(__dirname, "target"), function (er) { 4 | if (er) throw er 5 | }) 6 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/rimraf/test/test-sync.js: -------------------------------------------------------------------------------- 1 | var rimraf = require("../rimraf") 2 | , path = require("path") 3 | rimraf.sync(path.join(__dirname, "target")) 4 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/underscore.string/.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | rvm: 3 | - 1.9.3 4 | 5 | before_script: 6 | - "export DISPLAY=:99.0" 7 | - "sh -e /etc/init.d/xvfb start" 8 | - sleep 2 -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/underscore.string/Gemfile: -------------------------------------------------------------------------------- 1 | source :rubygems 2 | 3 | gem 'serve' 4 | gem 'uglifier' 5 | gem 'rake' -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/underscore.string/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: http://rubygems.org/ 3 | specs: 4 | activesupport (3.2.3) 5 | i18n (~> 0.6) 6 | multi_json (~> 1.0) 7 | execjs (1.3.0) 8 | multi_json (~> 1.0) 9 | i18n (0.6.0) 10 | multi_json (1.2.0) 11 | rack (1.4.1) 12 | rack-test (0.6.1) 13 | rack (>= 1.0) 14 | rake (0.9.2.2) 15 | serve (1.5.1) 16 | activesupport (~> 3.0) 17 | i18n 18 | rack (~> 1.2) 19 | rack-test (~> 0.5) 20 | tilt (~> 1.3) 21 | tzinfo 22 | tilt (1.3.3) 23 | tzinfo (0.3.33) 24 | uglifier (1.2.4) 25 | execjs (>= 0.3.0) 26 | multi_json (>= 1.0.2) 27 | 28 | PLATFORMS 29 | ruby 30 | 31 | DEPENDENCIES 32 | rake 33 | serve 34 | uglifier 35 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/underscore.string/test/strings_standalone.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | 3 | module("String extensions"); 4 | 5 | test("underscore not included", function() { 6 | raises(function() { _("foo") }, /TypeError/); 7 | }); 8 | 9 | test("provides standalone functions", function() { 10 | equals(typeof _.str.trim, "function"); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/underscore.string/test/test_standalone.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Underscore.strings Test Suite 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

    Underscore.string Test Suite

    14 |

    15 |

    16 |
      17 | 18 | 19 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | var func = function(){}; 4 | var date = new Date(); 5 | var str = "a string"; 6 | var numbers = []; 7 | for (var i=0; i<1000; i++) numbers.push(i); 8 | var objects = _.map(numbers, function(n){ return {num : n}; }); 9 | var randomized = _.sortBy(numbers, function(){ return Math.random(); }); 10 | 11 | JSLitmus.test('_.isNumber', function() { 12 | return _.isNumber(1000) 13 | }); 14 | 15 | JSLitmus.test('_.newIsNumber', function() { 16 | return _.newIsNumber(1000) 17 | }); 18 | 19 | JSLitmus.test('_.isNumber(NaN)', function() { 20 | return _.isNumber(NaN) 21 | }); 22 | 23 | JSLitmus.test('_.newIsNumber(NaN)', function() { 24 | return _.newIsNumber(NaN) 25 | }); 26 | 27 | })(); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Underscore Temporary Tests 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

      Underscore Temporary Tests

      13 |

      14 | A page for temporary speed tests, used for developing faster implementations 15 | of existing Underscore methods. 16 |

      17 |
      18 | 19 | 20 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/which/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/which/README.md: -------------------------------------------------------------------------------- 1 | The "which" util from npm's guts. 2 | 3 | Finds the first instance of a specified executable in the PATH 4 | environment variable. Does not cache the results, so `hash -r` is not 5 | needed when the PATH changes. 6 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/grunt/node_modules/which/bin/which: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var which = require("../") 3 | if (process.argv.length < 3) { 4 | console.error("Usage: which ") 5 | process.exit(1) 6 | } 7 | 8 | which(process.argv[2], function (er, thing) { 9 | if (er) { 10 | console.error(er.message) 11 | process.exit(er.errno || 127) 12 | } 13 | console.log(thing) 14 | }) 15 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/spmrc/.npmignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .ipr 4 | .iws 5 | *~ 6 | ~* 7 | *.diff 8 | *.patch 9 | *.bak 10 | .DS_Store 11 | Thumbs.db 12 | .project 13 | .*proj 14 | .svn/ 15 | *.swp 16 | *.swo 17 | *.log 18 | *.sublime-project 19 | *.sublime-workspace 20 | node_modules/ 21 | dist/ 22 | tmp/ 23 | .spm-build 24 | .buildpath 25 | .settings 26 | .yml 27 | _site 28 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/spmrc/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/win-spawn/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | 14 | node_modules 15 | npm-debug.log -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/node_modules/win-spawn/bin/win-spawn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var spawn = require('../index1.js'); 4 | 5 | var args = process.argv.slice(2); 6 | var cmd = ''; 7 | while (/^[A-Z_]+\=[^ \=]+$/.test(args[0])) { 8 | cmd += args.shift() + ' '; 9 | } 10 | cmd += args.shift(); 11 | 12 | spawn(cmd, args, { stdio: 'inherit' }); -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/scripts/post-install.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var spmrc = require('spmrc'); 4 | var spawn = require('win-spawn'); 5 | var fs = require('fs'); 6 | var gitInstall = require('../lib/helper').gitInstall; 7 | 8 | try { 9 | var spm = require('spm'); 10 | spm.plugin.install({ 11 | name: 'init', 12 | binary: 'spm-init', 13 | description: 'init a template' 14 | }); 15 | } catch(e) { 16 | console.log(' you need install spm to register the program'); 17 | console.log(); 18 | console.log(' \x1b[31m$ npm install spm -g\x1b[39m'); 19 | console.log(); 20 | console.log(" if you have installed spm, it maybe you haven't set a NODE_PATH environment variable"); 21 | console.log(); 22 | } 23 | 24 | // install spm-init templates 25 | gitInstall('git://github.com/spmjs/template-cmd.git', '~/.spm/init/cmd'); 26 | -------------------------------------------------------------------------------- /seajs/static/node_modules/spm-init/scripts/uninstall.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | try { 4 | require('spm').plugin.uninstall('init'); 5 | } catch(e) {} -------------------------------------------------------------------------------- /seajs/static/now/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .ipr 4 | .iws 5 | *~ 6 | ~* 7 | *.diff 8 | *.patch 9 | *.bak 10 | .DS_Store 11 | Thumbs.db 12 | .project 13 | .*proj 14 | .svn/ 15 | *.swp 16 | *.swo 17 | *.pyc 18 | *.pyo 19 | .build 20 | node_modules 21 | _site 22 | sea-modules 23 | spm_modules 24 | .cache 25 | dist 26 | coverage 27 | -------------------------------------------------------------------------------- /seajs/static/now/.spmignore: -------------------------------------------------------------------------------- 1 | dist 2 | _site 3 | sea-modules 4 | spm_modules 5 | node_modules 6 | .git 7 | tests 8 | examples 9 | test 10 | coverage 11 | -------------------------------------------------------------------------------- /seajs/static/now/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.10" 5 | 6 | install: 7 | - npm install spm coveralls 8 | 9 | before_script: 10 | - node_modules/spm/bin/spm-install 11 | 12 | script: 13 | - node_modules/spm/bin/spm-test 14 | 15 | after_success: 16 | - node_modules/spm/bin/spm-test --coveralls | node_modules/.bin/coveralls 17 | -------------------------------------------------------------------------------- /seajs/static/now/HISTORY.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | --- 4 | 5 | ## 0.0.0 6 | 7 | `new` It is the first version of now. 8 | -------------------------------------------------------------------------------- /seajs/static/now/README.md: -------------------------------------------------------------------------------- 1 | # now [![spm version](http://spmjs.io/badge/now)](http://spmjs.io/package/now) 2 | 3 | --- 4 | 5 | 6 | 7 | ## Install 8 | 9 | ``` 10 | $ spm install now --save 11 | ``` 12 | 13 | ## Usage 14 | 15 | ```js 16 | var now = require('now'); 17 | // use now 18 | ``` 19 | -------------------------------------------------------------------------------- /seajs/static/now/examples/index.md: -------------------------------------------------------------------------------- 1 | # Demo 2 | 3 | --- 4 | 5 | ## Normal usage 6 | 7 | ````javascript 8 | var now = require('../index'); 9 | console.log(now); 10 | ```` -------------------------------------------------------------------------------- /seajs/static/now/index.js: -------------------------------------------------------------------------------- 1 | // require module in spm.dependencies 2 | var moment = require('moment'); 3 | 4 | // require relative file in you project 5 | // var util = require('./util'); 6 | 7 | var now = 'test'; // moment().format('MMMM Do YYYY, h:mm:ss a'); 8 | module.exports = now; -------------------------------------------------------------------------------- /seajs/static/now/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "now", 3 | "version": "0.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "homepage": "", 7 | "author": "arthinking <351108013@qq.com>", 8 | "repository": { 9 | "type": "git", 10 | "url": "" 11 | }, 12 | "bugs": { 13 | "url": "" 14 | }, 15 | "licenses": "MIT", 16 | "spm": { 17 | "main": "index.js", 18 | "dependencies": { 19 | "moment": "2.9.0" 20 | }, 21 | "devDependencies": { 22 | "expect.js": "0.3.1" 23 | } 24 | }, 25 | "devDependencies": { 26 | "spm": "3" 27 | }, 28 | "scripts": { 29 | "test": "spm test", 30 | "build": "spm build" 31 | } 32 | } -------------------------------------------------------------------------------- /seajs/static/now/tests/index-spec.js: -------------------------------------------------------------------------------- 1 | var expect = require('expect.js'); 2 | var now = require('../index'); 3 | 4 | describe('now', function() { 5 | 6 | it('normal usage', function() { 7 | expect(now).to.be.a('string'); // add this 8 | }); 9 | 10 | }); -------------------------------------------------------------------------------- /seajs/static/test/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea/ 3 | .ipr 4 | .iws 5 | *~ 6 | ~* 7 | *.diff 8 | *.patch 9 | *.bak 10 | .DS_Store 11 | Thumbs.db 12 | .project 13 | .*proj 14 | .svn/ 15 | *.swp 16 | *.swo 17 | *.pyc 18 | *.pyo 19 | .build 20 | node_modules 21 | _site 22 | sea-modules 23 | spm_modules 24 | .cache 25 | dist 26 | coverage 27 | -------------------------------------------------------------------------------- /seajs/static/test/.spmignore: -------------------------------------------------------------------------------- 1 | dist 2 | _site 3 | sea-modules 4 | spm_modules 5 | node_modules 6 | .git 7 | tests 8 | examples 9 | test 10 | coverage 11 | -------------------------------------------------------------------------------- /seajs/static/test/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.10" 5 | 6 | install: 7 | - npm install spm coveralls 8 | 9 | before_script: 10 | - node_modules/spm/bin/spm-install 11 | 12 | script: 13 | - node_modules/spm/bin/spm-test 14 | 15 | after_success: 16 | - node_modules/spm/bin/spm-test --coveralls | node_modules/.bin/coveralls 17 | -------------------------------------------------------------------------------- /seajs/static/test/HISTORY.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | --- 4 | 5 | ## 1.0.0 6 | 7 | `new` It is the first version of test. 8 | -------------------------------------------------------------------------------- /seajs/static/test/README.md: -------------------------------------------------------------------------------- 1 | # test [![spm version](http://spmjs.io/badge/test)](http://spmjs.io/package/test) 2 | 3 | --- 4 | 5 | just for test 6 | 7 | ## Install 8 | 9 | ``` 10 | $ spm install test --save 11 | ``` 12 | 13 | ## Usage 14 | 15 | ```js 16 | var test = require('test'); 17 | // use test 18 | ``` 19 | -------------------------------------------------------------------------------- /seajs/static/test/examples/index.md: -------------------------------------------------------------------------------- 1 | # Demo 2 | 3 | --- 4 | 5 | ## Normal usage 6 | 7 | ````javascript 8 | var now = require('../index'); 9 | console.log(now); 10 | ```` -------------------------------------------------------------------------------- /seajs/static/test/index.js: -------------------------------------------------------------------------------- 1 | define(function(require, exports, module) { 2 | 3 | var moment = require('moment'); 4 | var math = require('math'); 5 | 6 | console.log(moment); 7 | 8 | console.log(math); 9 | 10 | var now = "123"; // moment().format('MMMM Do YYYY, h:mm:ss a'); 11 | 12 | module.exports = { 13 | now: now, 14 | math: math 15 | }; 16 | 17 | }); 18 | 19 | -------------------------------------------------------------------------------- /seajs/static/test/math.js: -------------------------------------------------------------------------------- 1 | define('math', function(require, exports, module) { 2 | 3 | // var test; 4 | // 5 | // module.exports = test; 6 | 7 | // require relative file in you project 8 | // var util = require('./util'); 9 | 10 | var math = 'abc'; 11 | module.exports = math; 12 | 13 | }); 14 | 15 | -------------------------------------------------------------------------------- /seajs/static/test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "version": "1.0.0", 4 | "description": "just for test", 5 | "keywords": [], 6 | "homepage": "", 7 | "author": "arthinking", 8 | "repository": { 9 | "type": "git", 10 | "url": "" 11 | }, 12 | "bugs": { 13 | "url": "" 14 | }, 15 | "licenses": "MIT", 16 | "spm": { 17 | "main": "index.js", 18 | "dependencies": { 19 | "jquery": "2.1.3", 20 | "moment": "2.9.0" 21 | }, 22 | "devDependencies": { 23 | "expect.js": "0.3.1" 24 | } 25 | }, 26 | "devDependencies": { 27 | "spm": "3" 28 | }, 29 | "scripts": { 30 | "test": "spm test", 31 | "build": "spm build" 32 | } 33 | } -------------------------------------------------------------------------------- /seajs/static/test/tests/index-spec.js: -------------------------------------------------------------------------------- 1 | // var expect = require('expect.js'); 2 | // var test = require('../index'); 3 | // 4 | // describe('test', function() { 5 | // 6 | // it('normal usage', function() { 7 | // 8 | // }); 9 | // 10 | // }); 11 | 12 | var expect = require('expect.js'); 13 | var now = require('../index'); 14 | 15 | describe('now', function() { 16 | 17 | it('normal usage', function() { 18 | // expect(now).to.be.a('string'); // add this 19 | }); 20 | 21 | }); 22 | --------------------------------------------------------------------------------