Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
Signed-off-by: Calderis <r.wetteren@gmail.com>
  • Loading branch information
Calderis committed Apr 13, 2018
1 parent 5f70d8e commit 8bd1522
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions packages/gatsby-cli/src/create-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ function buildLocalCommands(cli, isLocalSite) {
type: `boolean`,
describe: `Use HTTPS. See https://www.gatsbyjs.org/docs/local-https/ for an initial setup guide`,
})
.option(`output-dir`, {
.option(`build-dir`, {
type: `string`,
default: `public`,
describe: `Set output directory. Defaults to public`,
describe: `Set build directory. Defaults to public`,
}),
handler: handlerP(
getCommandHandler(`develop`, (args, cmd) => {
Expand All @@ -134,10 +134,10 @@ function buildLocalCommands(cli, isLocalSite) {
type: `boolean`,
default: false,
describe: `Build site without uglifying JS bundles (for debugging).`,
}).option(`output-dir`, {
}).option(`build-dir`, {
type: `string`,
default: `public`,
describe: `Set output directory. Defaults to public`,
describe: `Set build directory. Defaults to public`,
}),
handler: handlerP(
getCommandHandler(`build`, (args, cmd) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-netlify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ An example:
Link paths are specially handed by this plugin. Since most files are processed
and cache-busted through Gatsby (with a file hash), the plugin will transform
any base file names to the hashed variants. If the file is not hashed, it will
ensure the path is valid relative to the output `public` folder. You should be
ensure the path is valid relative to the build `public` folder. You should be
able to reference assets imported through javascript in the `static` folder.

Do not specify the public path in the config, as the plugin will provide it for
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-offline/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports.onPostBuild = (args, pluginOptions) => {
],
stripPrefix: rootDir,
// If `pathPrefix` is configured by user, we should replace
// the output directory (default: `public`) prefix with `pathPrefix`.
// the build directory (default: `public`) prefix with `pathPrefix`.
// See more at:
// https://github.com/GoogleChrome/sw-precache#replaceprefix-string
replacePrefix: args.pathPrefix || ``,
Expand Down
12 changes: 6 additions & 6 deletions packages/gatsby-plugin-sharp/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const processFile = (file, jobs, cb, reporter) => {
],
})
.then(imageminBuffer => {
fs.writeFile(job.outputPath, imageminBuffer, onFinish)
fs.writeFile(job.buildPath, imageminBuffer, onFinish)
})
.catch(onFinish)
)
Expand All @@ -191,14 +191,14 @@ const processFile = (file, jobs, cb, reporter) => {
plugins: [imageminWebp({ quality: args.quality })],
})
.then(imageminBuffer => {
fs.writeFile(job.outputPath, imageminBuffer, onFinish)
fs.writeFile(job.buildPath, imageminBuffer, onFinish)
})
.catch(onFinish)
)
.catch(onFinish)
// any other format (jpeg, tiff) - don't compress it just handle output
} else {
clonedPipeline.toFile(job.outputPath, onFinish)
clonedPipeline.toFile(job.buildPath, onFinish)
}
})
}
Expand All @@ -210,7 +210,7 @@ const q = queue((task, callback) => {

const queueJob = (job, reporter) => {
const inputFileKey = job.file.absolutePath.replace(/\./g, `%2E`)
const outputFileKey = job.outputPath.replace(/\./g, `%2E`)
const outputFileKey = job.buildPath.replace(/\./g, `%2E`)
const jobPath = `${inputFileKey}.${outputFileKey}`

// Check if the job has already been queued. If it has, there's nothing
Expand All @@ -220,7 +220,7 @@ const queueJob = (job, reporter) => {
}

// Check if the output file already exists so we don't redo work.
if (fs.existsSync(job.outputPath)) {
if (fs.existsSync(job.buildPath)) {
return
}

Expand Down Expand Up @@ -343,7 +343,7 @@ function queueImageResizing({ file, args = {}, reporter }) {
outsideResolve,
outsideReject,
inputPath: file.absolutePath,
outputPath: filePath,
buildPath: filePath,
}

queueJob(job, reporter)
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/bootstrap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = async (args: BootstrapArgs) => {
payload: program,
})

// Delete html and css files from the output directory (default: public) as we don't want
// Delete html and css files from the build directory (default: public) as we don't want
// deleted pages and styles from previous builds to stick around.
let activity = report.activityTimer(
`delete html and css files from previous builds`
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/commands/build-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = async (program: any) => {
// ignore.
}

// Ensure there's a styles.css file in output directory (default: public) so tools that expect it
// Ensure there's a styles.css file in build directory (default: public) so tools that expect it
// can find it.
fs.ensureFile(`${directory}/${buildDirectory}/styles.css`, err => {
resolve(err)
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = async function build(program: BuildArgs) {
await apiRunnerNode(`onPreBuild`, { graphql: graphqlRunner })

// Copy files from the static directory to
// an equivalent static directory within output directory (default: public).
// an equivalent static directory within build directory (default: public).
copyStaticDirectory()

let activity
Expand Down
6 changes: 3 additions & 3 deletions packages/gatsby/src/commands/develop-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ module.exports = async (program: any) => {
return reject(e)
}
const buildDirectory = process.env.GATSBY_BUILD_DIR || `public`
const outputFile = `${directory}/${buildDirectory}/render-page.js`
const buildFile = `${directory}/${buildDirectory}/render-page.js`
if (stats.hasErrors()) {
let webpackErrors = stats.toJson().errors
return reject(
createErrorFromString(webpackErrors[0], `${outputFile}.map`)
createErrorFromString(webpackErrors[0], `${buildFile}.map`)
)
}

// Remove the temp JS bundle file built for the static-site-generator-plugin
try {
fs.unlinkSync(outputFile)
fs.unlinkSync(buildFile)
} catch (e) {
// This function will fail on Windows with no further consequences.
}
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/commands/develop.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const getSslCert = require(`../utils/get-ssl-cert`)

// const isInteractive = process.stdout.isTTY

// Watch the static directory and copy files to output directory (default: public) as they're added or
// Watch the static directory and copy files to build directory (default: public) as they're added or
// changed. Wait 10 seconds so copying doesn't interfer with the regular
// bootstrap.
setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/utils/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ module.exports = async (
loaders: [`json`, `yaml`],
})

// "file" loader makes sure those assets end up in the output folder (default: public).
// "file" loader makes sure those assets end up in the build folder (default: public).
// When you `import` an asset, you get its filename.
config.loader(`file-loader`, {
test: /\.(ico|eot|otf|webp|pdf|ttf|woff(2)?)(\?.*)?$/,
Expand Down

0 comments on commit 8bd1522

Please sign in to comment.