-
Notifications
You must be signed in to change notification settings - Fork 303
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
support umd #333
base: master
Are you sure you want to change the base?
support umd #333
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
/* for module loading using webpack or similar package bundlers */ | ||
window.Flow = require('./dist/ng-flow-standalone'); | ||
module.exports = 'flow'; | ||
/* backwards compatable with deprecated index.js*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this file is ignored by commonjs loaders because of the 'main' key in package.json so I log a warning. |
||
try { | ||
console.warn(new Error("use const ngFlow = require('@flowjs/ng-flow');")); | ||
} catch (e) { | ||
// do nothing | ||
} | ||
|
||
if (typeof window === 'object') { | ||
window.Flow = require('@flowjs/flow.js'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mutating window in a commonjs module is not acceptable, but I do it here for require('@flowjs/ng-flow/index') for backwards compatibility reasons. |
||
} | ||
module.exports = require('./src/ng-flow'); |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mutating window in a commonjs module is not acceptable.