Skip to content
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

Synchronous apis don't work correctly #172

Open
aandis opened this issue Jun 14, 2018 · 6 comments
Open

Synchronous apis don't work correctly #172

aandis opened this issue Jun 14, 2018 · 6 comments

Comments

@aandis
Copy link

aandis commented Jun 14, 2018

Async version

sorcery.load('app.min.js').then( function ( chain ) {
  chain.write( '/tmp/out.js', {
    includeContent: true
  });
});

Source Map:

  "sourcesContent":["\"use strict\";\n\n/..."]

Sync version

var chain = sorcery.loadSync('app.min.js');
var map = chain.apply();
chain.writeSync('/tmp/out.js', { includeContent: true });

Source map

"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]
@aandis
Copy link
Author

aandis commented Jun 14, 2018

Also, when using either apis, the sources generated are absolute paths.

"sources":["../../home/user/projects/app/assets/source.js"]

Any ideas why that is?

@aandis aandis changed the title Synchronous apis, don't work correctly Synchronous apis don't work correctly Jun 14, 2018
@aleclarson
Copy link

FWIW, my fork does not have these issues, but it also has an entirely new API. :)

@aandis
Copy link
Author

aandis commented Jun 14, 2018

@aleclarson thanks for the pointer. Does the fork retain synchrounous api functionalities from this?

@aleclarson
Copy link

@aandis Yeah. In fact, the async API has been discarded, since sorcery is typically used in development only (and it makes things a little easier for me to maintain).

@aandis
Copy link
Author

aandis commented Jun 14, 2018

Thank you. I'll check that out. I think this repo is mostly unmaintained now.

@aleclarson
Copy link

@aandis I think @Rich-Harris is just a really busy dude these days. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants