-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
For now... waiting for PR to be merged: guardian/scribe-common#2
@OliverJAsh ping |
Until guardian/scribe-common#2 gets merged and published to npm…
Hmm, I’m not sure whether we should do this, or update the RequireJS path to scribe-common in the other plugins: https://github.com/guardian/scribe-plugin-smart-lists/blob/master/Plumbing.js#L16 |
@OliverJAsh Ya I was contemplating that same dilemma. I decided to just fix it here since it would be just 1 pull request instead of n (there's at least 2 plugins using this modules that I can think of off the top of my head). If you'd rather fix at the plugin level then I'm fine with that as well, and we can send PRs to the individual plugins. Just let me know how you would like to proceed. |
Ping. With guardian/scribe#195 in the pipeline, I'm gonna need this working. |
Now that we have two files, it doesn't make sense to change to the What’s the alternative solution? |
The alternative is to just remove "main" completely. In all usage I've seen of this module so far, a sub-file is required directly instead of the main package ( |
I’m happy to do that if you are? |
@OliverJAsh Sure thing. PR updated. |
Bump. |
I'd like to promote #4 as a better alternative to this as it makes |
The The issue is that, with the current setup, the browserify require points to
I imagine there would be similar issues when scribe-plugin-sanitizer tries to load html-janitor: https://github.com/guardian/scribe-plugin-sanitizer/blob/master/src/scribe-plugin-sanitizer.js#L2 I propose that we:
Whatever solution we go with, we should use it consistently across the Scribe ecosystem. All of this sucks 😒 |
@OliverJAsh Albeit taking the most work, that does indeed sound like the best solution to me. |
Oliver, but some modules are using element that is directly is scribe repository. What's up with that? |
That's a different element module, so that's fine. |
The file `src/scribe-common.js` doesn't exist.
@OliverJAsh Ok, so this PR has been reduced to just removing the |
v0.0.5 is out! |
Other plugins are doing
define('scribe-common/element')
, so for this to work in npm/browserify then we need theelement.js
file to be located at the root of the repository.Also set the
package.json
's "main" toelement.js
, since there is noscribe-common.js
file, andelement.js
appears to be the only JS file in the repo at the moment.