question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

control the order of transforms

See original GitHub issue

use case:

var aliasify = require('aliasify');
var myTransform = require('my-custom-transform');
...
b.transform(aliasify);
b.transform(myTransform);

I expect that files being compiled go through aliasify before running through myTransform. I tried switching the order of lines 4 and 5, and i get the same result, which is myTransform is being applied first.

Is there a way to control this? if not, would you consider implementing it? Thanks

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
kentmwcommented, Apr 28, 2016

I modified jsFilesOnly in my downloaded node_modules/aliasify/aliasify.js, and it worked. At least, it worked in my case. I’ll try out the appliedTo option, and move this conversation over to the aliasify project. Thank you so much for your help!

EDIT: it works to use appliesTo and is most likely the preferred method.

  "aliasify": {
    "aliases": {
      "app": "./app",
    },
    "appliesTo": {"includeExtensions": [".js", ".hbs"]}
  }
1reaction
jmmcommented, Apr 28, 2016

Hi @kentmw, transforms are stream based so inherently async, but of course they run in sequence on a given file. Maybe it has something to do with this: options.jsFilesOnly. Anyway, I’m closing this issue because no one has provided a repro. I suspect your problem has to do with how those two transforms interact rather than something fundamental about how Browserify transforms work. Stackoverflow is one place you can try for help. If you’re able to isolate a bug in Browserify’s transform handling, please open a new issue with a minimal repro. If you need help getting started see miniminirepro/browserify. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Transformation Order Is Significant - Microsoft Learn
One way to reverse the order of individual transformations in a composite transformation is to reverse the order of a sequence of method...
Read more >
Control Systems/Transforms - Wikibooks, open books for an ...
Control Systems/Transforms · 1 Transforms. 1.1 Transform Basics · 2 Laplace Transform. 2.1 Inverse Laplace Transform; 2.2 Matrices and Vectors; 2.3 Example: RL ......
Read more >
What is the order sequence for Transformation Rotation and ...
The sequence is always: rotationZ, rotationY, rotationX, followed by translation.
Read more >
Finer grained control over CSS transforms with individual ...
With transform , the transformation functions get applied in the order they're written–from left (outside) to right (inside). With the ...
Read more >
What is the ORDER of transformations in OpenGL? - YouTube
In this video we will discuss a question that was posted on the OpenGL forum on Reddit - does glm::rotate rotates model matrices...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found