Last active
July 23, 2019 14:34
-
-
Save anandthakker/db15280ebaa8a0b1434d692385d7a3bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(["require", "exports", "tslib", "lib/animation-frame", "jquery"], function (require, exports, tslib_1, AnimationFrame, $) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.testFixture = {}; | |
function checkAllWatchingDetectors() { | |
console.log('foo'); | |
} | |
exports.checkAllWatchingDetectors = checkAllWatchingDetectors; | |
var DOMChangeDetector = /** @class */ (function () { | |
function DOMChangeDetector(elt, cb) { | |
console.log('foo'); | |
} | |
DOMChangeDetector.prototype.stopWatching = function () { | |
delete this.watchingDetectors[this.id]; | |
}; | |
return DOMChangeDetector; | |
}()); | |
exports.default = DOMChangeDetector; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'tslib'; | |
import 'lib/animation-frame'; | |
import 'jquery'; | |
var DOMChangeDetector = (function () { | |
function DOMChangeDetector(elt, cb) { | |
console.log("foo"); | |
} | |
DOMChangeDetector.prototype.stopWatching = function () { | |
delete this.watchingDetectors[this.id]; | |
}; | |
return DOMChangeDetector; | |
})(); | |
var c = DOMChangeDetector; | |
new c(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['require'], function (require) { | |
const DOMChangeDetector = require('./amdmodule.js'); | |
new DOMChangeDetector(); | |
}) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "rollup", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"@buxlabs/amd-to-es6": "^0.13.3", | |
"module-lookup-amd": "^6.2.0", | |
"rollup": "^1.17.0", | |
"rollup-plugin-amd": "^4.0.0", | |
"rollup-plugin-postcss": "^2.0.3", | |
"rollup-plugin-typescript": "^1.0.1" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
baseUrl: '.', | |
waitSeconds: 0, | |
paths: { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import amd from 'rollup-plugin-amd'; | |
import lookup from 'module-lookup-amd'; | |
import config from './require-config'; | |
export default { | |
input: 'index.js', | |
output: { | |
file: 'bundle.js', | |
format: 'es' | |
}, | |
plugins: [ | |
//ts(), | |
// resolveRequireJSPaths(), | |
// coffee(), | |
amd({ | |
rewire: function(moduleId, parentPath) { | |
var lookupResult = lookup({ | |
partial: moduleId, | |
filename: parentPath, | |
config: config, | |
directory: __dirname | |
}); | |
if (lookupResult.endsWith('.d.ts')) { | |
lookupResult = lookupResult.replace('.d.ts', '.js'); | |
} | |
console.log('lookup result: ', lookupResult); | |
return lookupResult; | |
} | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment