Sha256: 3ae14841e1a4d14dc232ca631ccc4e274131434dc4d069adf0755c8187b98d68

Contents?: true

Size: 717 Bytes

Versions: 11

Compression:

Stored size: 717 Bytes

Contents

#!/usr/bin/env node

require("commoner").resolve(function(id) {
    var context = this;

    return context.getProvidedP().then(function(idToPath) {
        // If a module declares its own identifier using @providesModule
        // then that identifier will be a key in the idToPath object.
        if (idToPath.hasOwnProperty(id))
            return context.readFileP(idToPath[id]);
    });

}, function(id) {
    // Otherwise assume the identifier maps directly to a filesystem path.
    return this.readModuleP(id);

}).process(function(id, source) {
    // As a simple example of a processing step, make sure the file ends
    // with exactly one newline character.
    return source.replace(/\s+$/m, "\n");
});

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
ilog-0.4.1 node_modules/commoner/bin/commonize
ilog-0.4.0 node_modules/commoner/bin/commonize
ilog-0.3.3 node_modules/commoner/bin/commonize
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/commoner/bin/commonize
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/commoner/bin/commonize
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/commoner/bin/commonize
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/commoner/bin/commonize
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/commoner/bin/commonize
gulp_assets-1.0.0.pre.5 template/node_modules/babel-core/node_modules/regenerator/node_modules/commoner/bin/commonize
gulp_assets-1.0.0.pre.4 template/node_modules/babel-core/node_modules/regenerator/node_modules/commoner/bin/commonize
gulp_assets-1.0.0.pre.3 template/node_modules/babel-core/node_modules/regenerator/node_modules/commoner/bin/commonize