Giter Club home page Giter Club logo

Comments (11)

tbranyen avatar tbranyen commented on June 16, 2024

You'd use babelify first, deamdify doesn't need to know anything about ES6 in order to function.

from deamdify.

tbranyen avatar tbranyen commented on June 16, 2024

Just followed your link, are you not transpiling? If so, that's going to cause problems in more than just deamdify. We could definitely upgrade esprima, so long as tests still pass and it fixes your problem.

If tests break, or your use case isn't fixed I wouldn't bother upgrading it.

from deamdify.

loldrup avatar loldrup commented on June 16, 2024

That's right, no transpiling.. My app is a backend app (that runs in a
browser). It does a lot of math and 3D visualisation, in order to generate
drawings/specifications of curved playground houses. It's the future of
playground things :D
Because of all the computation, I'm fairly stretched on the
performance-budget when I'm working on the app day to day. That's why I
prefer to skip transpilation (and also for the sake of simplicity in
debugging. I'm very new to node and haven't looked at source maps yet).

I'll be glad if you would try to upgrade esprima. Wouldn't you need to do
so anyways, once ES6 becomes sufficiently widespread?
Den 12/01/2016 23.38 skrev "Tim Branyen" [email protected]:

Just followed your link, are you not transpiling? If so, that's going to
cause problems in more than just deamdify. We could definitely upgrade
esprima, so long as tests still pass and it fixes your problem.

If tests break, or your use case isn't fixed I wouldn't bother upgrading
it.


Reply to this email directly or view it on GitHub
#36 (comment)
.

from deamdify.

ariya avatar ariya commented on June 16, 2024

The published version of deamdify on npm is still using Esprima 1.x, hence why it wont' understand ES6 syntax.

Meanwhile, this master branch's package.json seems to indicate Esprima 2.x. So it's probably a matter of publishing a new version of deamdify?

from deamdify.

loldrup avatar loldrup commented on June 16, 2024

Hi Tim

Not to rush you, but do you have an estimate on the time frame needed for
trying to make deAMDify work with esprima 2.x?
I need to make a decision on whether to start converting my modules
manually, or wait it out.

/Jon

On 13 January 2016 at 01:30, Ariya Hidayat [email protected] wrote:

The published version of deamdify on npm is still using Esprima 1.x, hence
why it wont' understand ES6 syntax.

Meanwhile, this master branch's package.json seems to indicate Esprima
2.x. So it's probably a matter of publishing a new version of deamdify?


Reply to this email directly or view it on GitHub
#36 (comment)
.

from deamdify.

tbranyen avatar tbranyen commented on June 16, 2024

Can you test by installing the current master in your project to see if it will help first?

npm install jaredhanson/deamdify

Or put that in your package.json. That should pull from the latest master.

from deamdify.

loldrup avatar loldrup commented on June 16, 2024

It worked, in the sense that I now get a different error message:

jon@Lemur:~/frontend$ browserify -t deamdify js/test_browserify.js -o

js/test_bundle.js
Error: Cannot find module 'utils/approx' from
'/home/jon/frontend/js/cons/designs'
at
/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:46:17
at process
(/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:173:43)
at ondir
(/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:188:17)
at load
(/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
at onex
(/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
at
/usr/lib/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:82:15)

This massage indicates that the module references present in my
home/jon/frontend/js/cons/designs/SuperQuadric file are interpreted as
relative references, rather than as originating from my standard path
reference from my time with require.js (which is /home/jon/frontend/js).
The correct path to utils/approx is: /home/jon/frontend/js/utils/approx

Is there a way to tell this detail to deAMDify, or do I need to update the
paths manually?

Den 13/01/2016 20.07 skrev "Tim Branyen" [email protected]:

Can you test by installing the current master in your project to see if it
will help first?

npm install jaredhanson/deamdify

Or put that in your package.json. That should pull from the latest master.


Reply to this email directly or view it on GitHub
#36 (comment)
.

from deamdify.

tbranyen avatar tbranyen commented on June 16, 2024

@loldrup depending on your current project scale and your time requirements it might be better for you to prefix your require calls to use relative file pointers like ../ and ./ instead of relying on the global paths. This would most likely fix your problem and lend to closer parity with CommonJS. You could mess around with paths, but since you're compiling directly to CJS you may want to align your module requires closer to that.

from deamdify.

tbranyen avatar tbranyen commented on June 16, 2024

Okay cool, I'll push a new version!

from deamdify.

tbranyen avatar tbranyen commented on June 16, 2024

Updated the module in NPM to 0.2.0. Please give this a try and close the issue once you're good to go.

from deamdify.

loldrup avatar loldrup commented on June 16, 2024

It works! :D

from deamdify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.