Comments (11)
You'd use babelify first, deamdify doesn't need to know anything about ES6 in order to function.
from deamdify.
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.
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.
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.
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.
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.
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.
@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.
Okay cool, I'll push a new version!
from deamdify.
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.
It works! :D
from deamdify.
Related Issues (20)
- deamdified module get changed HOT 4
- support the concept of baseUrl
- Support modules that are defined put not passed into the function
- Should Not Crash HOT 1
- resolving dependencies HOT 2
- consider getting a new maintainer HOT 19
- Parsing exceptions with JSON format HOT 1
- Skip over dynamic require calls HOT 1
- support AMD Plugins HOT 2
- support dependencies declared with expressions HOT 3
- support dependencies declared with expressions HOT 1
- Support for UMD HOT 8
- Document how to use as global transform HOT 3
- New npm package HOT 2
- including global plugin imgAreaSelect breaks deamdify-ed modules which requires it
- Errors not emitted properly
- Allow application to extensions other than .js HOT 1
- Why removing 0s after decimal points?
- Gulp support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deamdify.