pass command line options to plotly-dash-preview#191
Conversation
package-lock.json
Outdated
| "version": "3.0.2", | ||
| "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.0.2.tgz", | ||
| "integrity": "sha512-m08g4CS3J6lwRQk1pj1EO+KEVWbrbXsmi9Pw0ySmrIbcVxVaedoFgLvFsV8wHLwh01EpROVz3KvVcD1Jmks9FQ==", | ||
| "integrity": "sha1-ME+zO9VYWgst+KTIAfy0f6hNjkM=", |
There was a problem hiding this comment.
This stuff here shouldn't happen.
Which npm version are you using?
There was a problem hiding this comment.
I'm using 6.4.1... Sorry about that. Using 6.5.0 gives me sha512 hashes as expected.
What do you think of the idea of adding "npm": "^6.5.0" in devDependencies?
There was a problem hiding this comment.
I didn't add npm in devDependencies but used a newer npm version to update package-lock.json in commit 78f3dd8.
Putting npm in devDependencies would make sense to me. That way we would all use the exact same version by running ./node_modules/.bin/npm. We can discuss that later :)
There was a problem hiding this comment.
Hmm. You're suggesting listing npm as a dependency of things to install with npm? That's sounds strange. I've never seen that before. Maybe it's a thing though.
There was a problem hiding this comment.
You're suggesting listing
npmas a dependency of things to install withnpm?
Said that way it sounds kinda stupid indeed 😆. We could instead update the CONTRIBUTING.md to state what version of npm is required.
There was a problem hiding this comment.
We use the engines property in package.json for this in Dash:
There was a problem hiding this comment.
Actually, it doesn't really behave the way I was hoping for.
| const numberOfComponents = 6 | ||
| const axios = require('axios') | ||
| const fs = require('fs') | ||
| const pathToPlotlyJS = '/tmp/plotly-latest.min.js' |
There was a problem hiding this comment.
Let's put that in ./build aka paths.build and use path.join so that your path is compatible on Windows:
const = path.join(paths.build, 'plotly-latest.min.js')|
|
||
| const { paths } = require('../common') | ||
|
|
||
| const PORT = 9109 + 2 |
| values.forEach(result => { | ||
| var urls = result.value | ||
| urls.forEach(url => { | ||
| t.notOk(url.match('http'), `A script tag refers to an HTTP resource ${url}`) |
There was a problem hiding this comment.
Shouldn't we test https also?
There was a problem hiding this comment.
I think this works since https will match http!
There was a problem hiding this comment.
Ah I see. Could you change the assert msg to
`A script tag refers to an HTTP(S) resource ${url}`
then to avoid any potential confusion.
|
💃 |
Prior to this PR, the HTML file used by
plotly-dash-previewwould ALWAYS link to plotly.js on the CDN even when the command-line arguments--plotlyjsis used.