jekyll-assets icon indicating copy to clipboard operation
jekyll-assets copied to clipboard

Source maps are sometimes compiled with wrong directory structure

Open 6twenty opened this issue 6 years ago • 2 comments

  • [x] I tried updating to the latest version.

    • [ ] I can't, there is an issue.
  • [ ] I Am on Windows

    • [ ] Ubuntu Bash on Windows
    • [ ] Fedora Bash on Windows
    • [ ] Other Bash on Windows
  • [ ] I Am on Linux

    • [ ] Ubuntu
    • [ ] Fedora
  • [x] I Am on macOS

  • [ ] I'm on Docker

    • [ ] I understand Docker may be unsupported.
  • jekyll-assets 3.0.11

  • sprockets 4.0.0.beta8

Description

When compiling assets using the directory name, source maps are not compiled to the correct location.

Unsure if this is an issue with jekyll-assets or with sprockets.

Steps

  • Create an asset folder, e.g. _assets/css/hello/
  • Create a file in that directory called index.scss
  • Reference that asset somewhere using {% asset hello.css %} - note that you're referencing the directory name, not the file name
  • Run jekyll build

Output

This will generate:

- _site/
  - assets/
    - source-maps/
      - _assets/
        - css/
          - hello/
            - hello/ # <-- directory is included again as a sub-directory
              - index.scss
      - hello/
        - index.scss.map

Expected

- _site/
  - assets/
    - source-maps/
      - _assets/
        - css/
          - hello/
            - index.scss
      - hello/
        - index.scss.map

6twenty avatar Jul 26 '18 22:07 6twenty

SourceMaps are undergoing a major rewrite for 4.0, thanks for the report, I'll make sure to check this out when I'm back in there working on 4.0.

envygeeks avatar Jul 26 '18 22:07 envygeeks

SourceMaps are undergoing a major rewrite for 4.0, thanks for the report, I'll make sure to check this out when I'm back in there working on 4.0.

Hey there! Just checking in on the above. I'm not sure how close we are to 4.0 and if this would make sense, but my team would love to try to fix the core issue reported here, sans-major-rewrite, and submit a pull request so we could get this feature sooner rather than later if possible.

Thanks much for the fantastic work either way!

johnhutch avatar Apr 10 '19 19:04 johnhutch