Giter Site home page Giter Site logo

module-define's Introduction

Build Status

Build Status

First repo of mine to do this - http://about.travis-ci.org/docs/user/getting-started/ - really like it so far

module-define

In PROGRESS JavaScript shim for cross-platform module.define() and importScripts() APIs.

describe

See my gist: importScripts proposal

justify

Stop using source transformation tools - they make the problem worse, not better.

Node.js part is boilerplate

The fact that the node test suite runs at all proves the concept that the module.define() and importScripts() boilerplate can be used to import files that don't use the boilerplate themselves (notably, the tape testing package itself), and can be used multiple times, in the same file, mimicking the script concatenation strategy used in browser web applications.

Code noise

  • importScripts() paths must either be npm module names or top-directory relative paths.
  • module.require() inside the the define callback can use module-relative paths.

Using tape to run tests from the node.js command line.

from node command line

cd ./module-define

any of these commands

npm test
node test/node
node test/node/index
node ./test/node/index.js

Browser tests with testem

I've used QUnit with testem to verify that the module var does not conflict with QUnit's module() function. Investigate the files in test/browser/ for example.

from node command line

cd ./module-define
testem

then open a browser at localhost:7357

or use this to run all browsers testem can find automatically

testem ci

The NPM part

TODO

module-define's People

Contributors

dfkaye avatar

Stargazers

timelyportfolio avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.