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

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

☁️ Nx Cloud Report

CI is running/has finished running commands for commit c842c3f. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

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

Successfully merging this pull request may close these issues.

3 participants