-
Notifications
You must be signed in to change notification settings - Fork 209
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
Node.js sample (dev) #22
Conversation
The build fails on Travis as TravisCI uses an older version of the dependancies required by Sharp. |
hmm, can you specify the sharp version number more narrowly?
…On Mon, Apr 3, 2017 at 4:00 AM, Chinmay Pandhare (CCD) < ***@***.***> wrote:
The build fails on Travis as TravisCI uses an older version of the
dependancies required by Sharp.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ-fty8oUjEtWTjJlrcoDPcXwf1ykks5rsKckgaJpZM4MxI3f>
.
|
I tried doing that... Turns out it doesn't help. |
hmm, i'll take a look tonight or tomorrow night, i hope! Sorry, i'm a bit
behind on things since I just finished most of my travel, but will do my
best to catch up.
…On Tue, Apr 4, 2017 at 11:41 AM, Chinmay Pandhare (CCD) < ***@***.***> wrote:
I tried doing that... Turns out it doesn't help.
Any suggestions on how to overcome this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ8osDoHBtXvtIUQQNXRT_5AvtrM-ks5rsmS9gaJpZM4MxI3f>
.
|
Thanks a lot! |
@jywarren Could you have a look at this? Had University exams so couldn't have a look, sorry. |
sure, sorry -- been busy too! Will take a look today or tomorrow, thanks!
|
Still trying to find a moment, my sincere apologies! |
Hey! |
So, I think part of the problem may be that Sharp is not pure JavaScript, so I'm concerned that it bifurcates how things are run too much. I know that we can use the canvas for in-browser usage, but I do think we can bypass some of the problems with Sharp using Jimp. I know of other projects using Jimp too. I appreciate the analysis done in this comment, but do you think attempting a Jimp based solution would address some of the issues and need for native compilation in this pull request? |
Alternatively we could try to debug Sharp by searching for "Sharp in Travis" or looking closely at their documentation here: http://sharp.dimens.io/en/stable/install/ |
Hey @jywarren
|
Oh wow! Looking at the changes here now. |
@@ -0,0 +1,67 @@ | |||
# Do not edit. File was generated by node-gyp's "configure" step |
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 auto-generated file we should not be git tracking? Would you mind looking this up to see what the best practice is? Thanks!
@@ -0,0 +1,142 @@ | |||
ImageSequencer = function ImageSequencer(options) { |
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.
Hi, just checking - is this instead of another module, and how much redundancy is there? Or is this just a core module which is then included into another? I just want to be sure we don't replicate too much code if we could be using require()
-- and it's been a few weeks :-P -- can you help me understand? Thank you!! Exciting to see work starting up!
return 'Addded.'; | ||
} | ||
|
||
function removeStep (id) { |
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.
Yes, i'm concerned about redundancy -- isn't this the same code as this: https://github.com/publiclab/image-sequencer/pull/22/files#diff-f887b503b80e10727ac6cee436178fc5R83 ?
/* | ||
* Demo Module. Does nothing. | ||
*/ | ||
module.exports = function DoNothing(options) { |
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.
Hm, was this for testing purposes, or can we add a bit more to the description to explain why it's needed, so future programmers don't get confused? Thanks!
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.
Yes, this was for testing purposes... This is a demo module which gives the output image as it is...
I have shifted to a different branches and things have changed quite a lot. Also, as this was a demo, I wish to close this pull request. I am creating another pull request. |
Hey @jywarren, I made a small demo for the node.js implementation.
I'm not sure if it should be merged, but I wanted you to have a look at it.
To keep things clean, I have kept the Node.js version's code away from the working browser code. This is not how things will work out eventually, there will only be a single script. This is just for demonstration.
I am adding the suffix
Node
to all the new files generated in this PR. So there is an 'ImageSequencerNode.js', 'ModulesNode.js', etc. Also, I have added a demo module for Node, calledDoNothingNode
. It literally does nothing. just takes the input image and returns it as-is. This is all for testing purposes. So the only module which will currently work isDoNothingNode
.Also, this PR contains work from my other PR #17, the removeStep() one too.
First, get the additional dependancies installed (sharp and the likes)
Then run node terminal, requiring the index.js file beforehand.
Now the node terminal opens, with
index.js
already required.Type in the following in the node terminal to test ImageSequencer:
Note that the
removeStep
accepts theid
parameter, one which I have defined in PR #17 . It is a unique auto-incrementing key which starts from 0.