Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ensure asset directory exists #194

Merged
merged 2 commits into from
May 12, 2016
Merged

Ensure asset directory exists #194

merged 2 commits into from
May 12, 2016

Conversation

thebuilder
Copy link
Contributor

Creating a static build would fail (Error: ENOENT: no such file or directory) if it encountered an asset in a subdirectory.
Use mkdir to ensure the path exists, before writing the file.

For example, referencing fonts would fail:

@font-face {
  font-family: 'vaud';
  src: url('../fonts/vauddisplaybold-webfont.eot');
  src:
    url('../fonts/vauddisplaybold-webfont.eot?#iefix') format('embedded-opentype'),
    url('../fonts/vauddisplaybold-webfont.woff') format('woff'),
    url('../fonts/vauddisplaybold-webfont.ttf') format('truetype'),
    url('../fonts/vauddisplaybold-webfont.svg#vaud_displayregular') format('svg');
  font-weight: 700;
  font-style: normal;
}

Creating a static build would fail (Error: ENOENT: no such file or directory) if it encountered an asset in a subdirectory.
Use mkdir to ensure the path exists, before writing the file.

For example, referencing fonts would fail:
```
@font-face {
  font-family: 'vaud';
  src: url('../fonts/vauddisplaybold-webfont.eot');
  src:
    url('../fonts/vauddisplaybold-webfont.eot?#iefix') format('embedded-opentype'),
    url('../fonts/vauddisplaybold-webfont.woff') format('woff'),
    url('../fonts/vauddisplaybold-webfont.ttf') format('truetype'),
    url('../fonts/vauddisplaybold-webfont.svg#vaud_displayregular') format('svg');
  font-weight: 700;
  font-style: normal;
}
```
@arunoda arunoda merged commit 1d28610 into storybookjs:master May 12, 2016
@arunoda
Copy link
Member

arunoda commented May 12, 2016

Thanks.

@arunoda
Copy link
Member

arunoda commented May 12, 2016

Released as: v1.26.0

Copy link

nx-cloud bot commented May 31, 2024

View your CI Pipeline Execution ↗ for commit c842c3f.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 59s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-22 16:42:40 UTC

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

Successfully merging this pull request may close these issues.

3 participants