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

Typescript maps for debug/coverage #39

Closed
lathonez opened this issue Mar 9, 2016 · 13 comments
Closed

Typescript maps for debug/coverage #39

lathonez opened this issue Mar 9, 2016 · 13 comments

Comments

@lathonez
Copy link
Owner

lathonez commented Mar 9, 2016

No idea how to implement this!

@lathonez
Copy link
Owner Author

lathonez commented Mar 9, 2016

@marcmeans - any ides on this?

@marcmeans
Copy link
Contributor

let me take a peek and see.

@lathonez lathonez assigned lathonez and unassigned lathonez Mar 10, 2016
@lathonez
Copy link
Owner Author

lathonez commented Apr 4, 2016

@masimplo
Copy link

I so badly need this. Have you given karma-sourcemap-loader a try @lathonez and didn't work or are you just keeping notes?

@marcmeans
Copy link
Contributor

I started to look at it. But with the upgrade to beta4 in ionic2 I've gotten distracted. I have this on my list to look at in the next week still. If I can get it working I'll let you know.

@masimplo
Copy link

@marcmeans awesome, please keep us posted. Will take a look myself after I upgrade my project to the latest libraries to see if I can get any insights.

@lathonez
Copy link
Owner Author

@masimakopoulos - I forget where that reference come from, someone on this repo was using it but I don't know to what degree of success.

@marcmeans - appreciate that you're still trying to look at this. I've been busy recently. As of last night everything in this repo should be latest.

If you have no time let me know and I'll pick it up

@masimplo
Copy link

@lathonez I see the repo mentioned in #58 uses karma-sourcemap-loader here and here, but not sure if it actually works.

@lathonez
Copy link
Owner Author

I've just used it briefly tonight in the 'lightweightify' branch on this
repo. Nothing conclusive yet but the basic functionality seems to be there.
The missing piece of the puzzle for me is generating the .map files at
compile time. Presumably it's just an option to tsc, not looked yet.
On 14 Apr 2016 20:51, "Michael" [email protected] wrote:

@lathonez https://github.com/lathonez I see the repo
https://github.com/bengro/ionic-seed-example mentioned in #58
#58 uses karma-sourcemap-loader
here
https://github.com/bengro/ionic-seed-example/blob/master/package.json#L27
and here
https://github.com/bengro/ionic-seed-example/blob/master/karma.conf.js#L38,
but not sure if it actually works.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#39 (comment)

@lathonez
Copy link
Owner Author

@marcmeans - I'm kinda working on this as a by-product of #68

@masimplo
Copy link

@lathonez aren't the maps being generated by ionic-gulp-browserify-typescript? I see this in their source code:

var sourcemapPipe = lazypipe()
    .pipe(buffer)
    .pipe(sourcemaps.init, { loadMaps: true })
    .pipe(sourcemaps.write, './');

and a few lines later

return b.bundle()
      .on('error', options.onError)
      .pipe(source(options.outputFile))
      .pipe(gulpif(options.browserifyOptions.debug, sourcemapPipe()))
      .pipe(gulp.dest(options.outputPath));

So if I am understanding this correctly, source maps are generated if browserify debug mode is true. Which from the same file

  browserifyOptions: {
    cache: {},
    packageCache: {},
    debug: true
  },

seems to be true by default.

@lathonez
Copy link
Owner Author

Yeah this is fine when bundling the spec. Not sure if we're going down that
road yet.
On 15 Apr 2016 06:05, "Michael" [email protected] wrote:

@lathonez https://github.com/lathonez aren't the maps being generated
by ionic-gulp-browserify-typescript? I see this in their source code:

var sourcemapPipe = lazypipe()
.pipe(buffer)
.pipe(sourcemaps.init, { loadMaps: true })
.pipe(sourcemaps.write, './');

and a few lines later

return b.bundle()
.on('error', options.onError)
.pipe(source(options.outputFile))
.pipe(gulpif(options.browserifyOptions.debug, sourcemapPipe()))
.pipe(gulp.dest(options.outputPath));

So if I am understanding this correctly, source maps are generated if
browserify debug mode is true. Which from the same file

browserifyOptions: {
cache: {},
packageCache: {},
debug: true
},

seems to be true by default.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#39 (comment)

@lathonez
Copy link
Owner Author

As per #68 sourcemaps are now available @ test.bundle.js.map

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

No branches or pull requests

3 participants