-
Notifications
You must be signed in to change notification settings - Fork 145
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish as NPM package #28
Comments
+1 |
+1, would be useful, needs some UMD love. |
Agreed, just made 0.4.3 available on npm: https://www.npmjs.com/package/findandreplacedomtext |
Awesome, thanks! |
Can I suggest something along the lines of... (function (root, factory) {
if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = factory();
} else if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory);
} else {
// Browser globals
root.findAndReplaceDOMText = factory();
}
}(this, function factory() {
function exposed() {
}
return exposed;
})); .. along with a change to |
@padolsey yeah, one gripe remaining — it's only exported as a browser global, which makes it impossible to use with build systems like Browserify and Webpack. |
NPM is becoming the de-facto standard repository of JS modules, both browser and server. So it would be nice to have this published there.
The text was updated successfully, but these errors were encountered: