marko/ready.marko
Michael Rawlings 81f341fe6d
Improve deprecation locations (#1386)
* improve deprecation locations for marko/jquery and marko/ready

* improve location of non-promise await deprecation

* improve taglib deprecation location and add var/vars deprecation
2019-07-19 15:06:46 -05:00

15 lines
824 B
Plaintext

<module-code(function(require) {
var isDebug = require('./env').isDebug;
return `
var ready = require("./${isDebug ? 'src' : 'dist'}/runtime/components/ready");
${isDebug ? `var deprecatedReady = require("complain").fn(ready, "marko/ready is deprecated."); deprecatedReady.patchComponent = require("complain").fn(ready.patchComponent, "marko/ready is deprecated."); ready = deprecatedReady;` : ""}
module.exports = ready;
`;
})/>
// What's going on here? We are using Marko to do JavaScript code generation
// during the module bundling phase to conditionally export either the
// "src" or the "dist" folder based on whether or not we are doing a
// debug or non-debug build. We are using Marko since we know the Marko compiler
// is enabled already (no extra babel transform required).