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

added css and js sourcemaps #321

Merged
merged 2 commits into from
Sep 8, 2020
Merged

added css and js sourcemaps #321

merged 2 commits into from
Sep 8, 2020

Conversation

marxide
Copy link
Contributor

@marxide marxide commented Sep 7, 2020

No description provided.

@marxide marxide requested a review from srggrs September 7, 2020 22:03
@github-actions github-actions bot added this to In progress in Pipeline Backlog Sep 7, 2020
@marxide
Copy link
Contributor Author

marxide commented Sep 7, 2020

@srggrs this isn't my area of expertise, but this seemed to do the trick. The sourcemaps get written to files in a map/ directory within js/ and css/. Since they have .min in the filenames, they're caught by .gitignore and don't get added to the repo. That's what we want, right?

I appear to be able to debug the JS in my browser while using the minified files and npm watch seems to work as expected too.

srggrs
srggrs previously requested changes Sep 7, 2020
Copy link
Contributor

@srggrs srggrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! yes that's the idea! At the end we don't want to commit the .map files, as we would use them just for development. In the repo is included only the map file of bootstrap, because we don't want to compile it.

I think the indentation need to be adjusted, otherwise is good to go.
Also do the map files have a map in their name?

Pipeline Backlog automation moved this from In progress to Review in progress Sep 7, 2020
@marxide
Copy link
Contributor Author

marxide commented Sep 8, 2020

Yeah, the map files are named e.g. datatables-pipeline.min.js.map.

I followed the indentation used on the npm package examples https://www.npmjs.com/package/gulp-sourcemaps. I kind of liked it because it made it clear that tasks get wrapped by the sourcemap plugin, but I can change it if you prefer.

@marxide
Copy link
Contributor Author

marxide commented Sep 8, 2020

On second thought, I'll just yield to the auto-formatter :P

@marxide marxide requested a review from srggrs September 8, 2020 14:32
@marxide marxide dismissed srggrs’s stale review September 8, 2020 14:33

autoformatted gulpfile

@marxide marxide merged commit 980b59d into master Sep 8, 2020
Pipeline Backlog automation moved this from Review in progress to Done Sep 8, 2020
@marxide marxide deleted the sourcemaps branch September 8, 2020 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants