Skip to content

Commit d521c19

Browse files
committed
Revert "Topics/output dir (#4756)"
This reverts commit 9fa8cd3.
1 parent c50e875 commit d521c19

File tree

35 files changed

+71
-125
lines changed

35 files changed

+71
-125
lines changed

docs/docs/building-with-components.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,9 @@ import React from "react";
161161
import favicon from "./favicon.png";
162162

163163
let inlinedStyles = "";
164-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
165164
if (process.env.NODE_ENV === "production") {
166165
try {
167-
inlinedStyles = require(`!raw-loader!../${buildDirectory}/styles.css`);
166+
inlinedStyles = require("!raw-loader!../public/styles.css");
168167
} catch (e) {
169168
console.log(e);
170169
}

examples/client-only-paths/src/html.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import { TypographyStyle } from "react-typography"
44
import typography from "./utils/typography"
55

66
let stylesStr
7-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
87
if (process.env.NODE_ENV === `production`) {
98
try {
10-
stylesStr = require(`!raw-loader!../${buildDirectory}/styles.css`)
9+
stylesStr = require(`!raw-loader!../public/styles.css`)
1110
} catch (e) {
1211
console.log(e)
1312
}

examples/using-postcss-sass/src/html.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import { TypographyStyle } from "react-typography"
66
const typography = new Typography()
77

88
let stylesStr
9-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
109
if (process.env.NODE_ENV === `production`) {
1110
try {
12-
stylesStr = require(`!raw-loader!../${buildDirectory}/styles.css`)
11+
stylesStr = require(`!raw-loader!../public/styles.css`)
1312
} catch (e) {
1413
console.log(e)
1514
}

examples/using-remark/src/html.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import { TypographyStyle } from "react-typography"
44
import typography from "./utils/typography"
55

66
let stylesStr
7-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
87
if (process.env.NODE_ENV === `production`) {
98
try {
10-
stylesStr = require(`!raw-loader!../${buildDirectory}/styles.css`)
9+
stylesStr = require(`!raw-loader!../public/styles.css`)
1110
} catch (e) {
1211
console.log(e)
1312
}

examples/using-sass/src/html.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import { TypographyStyle } from "react-typography"
66
const typography = new Typography()
77

88
let stylesStr
9-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
109
if (process.env.NODE_ENV === `production`) {
1110
try {
12-
stylesStr = require(`!raw-loader!../${buildDirectory}/styles.css`)
11+
stylesStr = require(`!raw-loader!../public/styles.css`)
1312
} catch (e) {
1413
console.log(e)
1514
}

examples/using-styled-components/src/html.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import typography from "./utils/typography"
66
let stylesStr
77
if (process.env.NODE_ENV === `production`) {
88
try {
9-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
10-
stylesStr = require(`!raw-loader!../${buildDirectory}/styles.css`)
9+
stylesStr = require(`!raw-loader!../public/styles.css`)
1110
} catch (e) {
1211
console.log(e)
1312
}

examples/using-styletron/src/html.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import { TypographyStyle } from "react-typography"
44
import typography from "./utils/typography"
55

66
let stylesStr
7-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
87
if (process.env.NODE_ENV === `production`) {
98
try {
10-
stylesStr = require(`!raw-loader!../${buildDirectory}/styles.css`)
9+
stylesStr = require(`!raw-loader!../public/styles.css`)
1110
} catch (e) {
1211
console.log(e)
1312
}

examples/using-stylus/src/html.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import { TypographyStyle } from "react-typography"
66
const typography = new Typography()
77

88
let stylesStr
9-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
109
if (process.env.NODE_ENV === `production`) {
1110
try {
12-
stylesStr = require(`!raw-loader!../${buildDirectory}/styles.css`)
11+
stylesStr = require(`!raw-loader!../public/styles.css`)
1312
} catch (e) {
1413
console.log(e)
1514
}

examples/using-typescript/src/html.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import * as React from "react";
55

66
// Load production style
77
let styles: string;
8-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
98
if (process.env.NODE_ENV === `production`) {
109
try {
11-
styles = require(`!raw-loader!../${buildDirectory}/styles.css`);
10+
styles = require("!raw-loader!../public/styles.css");
1211
} catch (err) {
1312
console.log(err);
1413
}

infrastructure/build-site.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ const Main = async () => {
142142
updateBuild(buildId, "FAILURE")
143143
process.exit(code)
144144
}
145-
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
146-
const publicDir = `${pathToSite}/${buildDirectory}`
145+
const publicDir = `${pathToSite}/public`
147146
console.log(`uploading files from ${publicDir}`)
148147

149148
// 1. Push built files to s3 bucket

0 commit comments

Comments
 (0)