-
Notifications
You must be signed in to change notification settings - Fork 68
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
[wip] Use yarn to manage frontend dependencies #314
base: develop
Are you sure you want to change the base?
[wip] Use yarn to manage frontend dependencies #314
Conversation
####################### | ||
|
||
node_modules | ||
node_modules/* |
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.
Don't want node_modules committed
RUN apt-get install nodejs \ | ||
apt-get install npm \ | ||
&& npm run build | ||
|
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.
Need to check, should install all deps and build everything into dist
```bash | ||
yarn | ||
yarn build | ||
``` |
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.
Some instructions
bla
Outdated
@@ -0,0 +1,92 @@ | |||
/* Copyright 2017 Mozilla Foundation |
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.
Need to confirm this is needed
@@ -3,5 +3,4 @@ | |||
Your browser does not support the audio tag. | |||
</audio> | |||
|
|||
<script src="/static/js/mfr.js"></script> | |||
<script src="/static/js/mfr.child.js"></script> | |||
<script src="/assets/mfr.child.js"></script> |
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.
Only reason mfr.js was included prior was to get pym.js library in the iframe. Webpack builds it in now.
src/mfr/mfr.child.js
Outdated
@@ -0,0 +1,32 @@ | |||
import {Child} from "pym.js"; |
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.
This file is exactly the same save for this import
@@ -0,0 +1,131 @@ | |||
// Mfr.js is a library which renders common file formats to be displayed in an iframe. |
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.
Removes inlined minified pym.js, the rest is the same
*/ | ||
/* globals module, __non_webpack_require__ */ | ||
|
||
module.exports = require('pdfjs/pdf'); |
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.
Re exports the pdfjs lib so the viewer can find it properly
"enablePrintAutoRotate": false, | ||
"disablePageMode": false, | ||
"disablePageLabels": false | ||
} |
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.
Not sure what to do with this yet. I don't like where it is but pdfjs looks for it in a very particular place.
}, | ||
{ | ||
test: /\.js$/i, | ||
loader: path.join(__dirname, 'node_modules/pdf.js/external/webpack/pdfjsdev-loader.js'), |
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.
Because pdfjs wrote their own loader
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.
Is this an active PR and what's the ticket? Looks like an incomplete or temporary PR to me from the commit messages lol. Is this partially replaced by the package managing PR or blocked by it?
Ticket
Purpose
Changes
Side effects
QA Notes
Deployment Notes