Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4803d61
First try at cleaning up build output
brotzky Jul 4, 2018
582fb41
Fix typo in type annotations (#6288)
sudodoki Jul 4, 2018
50dd934
Fix broken images (#6282)
giraffesyo Jul 4, 2018
0986a67
add first draft of API Lifecycle docs (#6229)
tsiq-swyx Jul 4, 2018
7ed8da9
Update adding-tags-and-categories-to-blog-posts.md (#6294)
XHMM Jul 4, 2018
e1b8be9
Adding flag to build, ordering pathPrefix correctly, and cleaned up s…
brotzky Jul 4, 2018
77371b9
Removing the deletion of files as referenced by m-allanson and pieh
brotzky Jul 4, 2018
59cf18a
Adding support for styles grouping
brotzky Jul 4, 2018
a9bc9b8
Update site-showcase-submissions.md concerning featured sites (#6281)
Jul 5, 2018
fdcf23a
final draft ready for review
Jul 5, 2018
2acc8b9
[www] Fix #6295 (#6312)
fk Jul 6, 2018
912751e
Fix typo (#6296)
giraffesyo Jul 6, 2018
0513a6c
Pass apiRunner into loader (#6272)
m-allanson Jul 6, 2018
1041f85
Fix tracedSVG fragment support in Gatsby 2.0 (#6297)
tylermenezes Jul 6, 2018
50cb0bb
Add empty pages.json. (#5824) (#6304)
ascorbic Jul 6, 2018
37d007a
switch components reducer to use Map for state (#6307)
pieh Jul 6, 2018
0add064
return null object for ssr pageRenderer - fixes importing gatsby-brow…
pieh Jul 6, 2018
f5d143b
Track queries between builds (#6322)
pieh Jul 6, 2018
eb17042
edits suggested by Phil
shannonbux Jul 6, 2018
b8c8040
add blog showcase (#6287)
zerosoul Jul 6, 2018
f9f4cd6
Adding hyperlinks to images
shannonbux Jul 6, 2018
06e7360
Made gatsby-plugin-netlify-cms work with gatsby v2 (#6292)
emanueleperuffo Jul 6, 2018
93c3554
Added site titles
shannonbux Jul 6, 2018
e02df8f
added tags
shannonbux Jul 6, 2018
6ec8c70
minor edits
shannonbux Jul 6, 2018
11206e4
chore(release): Publish
m-allanson Jul 6, 2018
150d862
other minor edits
shannonbux Jul 6, 2018
3637083
Merge pull request #6317 from gatsbyjs/graphic-design-blogpost
shannonbux Jul 6, 2018
c2bdb2d
[gatsby-plugin-offline] Add criticlal scripts and links to static fil…
kkemple Jul 6, 2018
6f789f6
chore(release): Publish
m-allanson Jul 6, 2018
366bd97
renaming output directories to js and css
brotzky Jul 6, 2018
972fb6b
First try at cleaning up build output
brotzky Jul 4, 2018
4042ae1
Adding flag to build, ordering pathPrefix correctly, and cleaned up s…
brotzky Jul 4, 2018
695cb68
Removing the deletion of files as referenced by m-allanson and pieh
brotzky Jul 4, 2018
699e5ca
Adding support for styles grouping
brotzky Jul 4, 2018
eed6616
renaming output directories to js and css
brotzky Jul 6, 2018
d8a8377
Merge branch 'topics/regroup-non-static-files' of github.com:narative…
brotzky Jul 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/gatsby/cache-dir/static-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export default (pagePath, callback) => {

// If enabled, group files in their respective folders otherwise generated
// non-static files will be left in the root of the output directory.
const pathToGroupStyles = __GROUP_FILES__ ? `styles/` : ``
const pathToGroupScripts = __GROUP_FILES__ ? `scripts/` : ``
const pathToGroupStyles = __GROUP_FILES__ ? `css/` : ``
Copy link
Contributor Author

@brotzky brotzky Jul 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KyleAMathews renamed to css and js

Here's the output now

screen shot 2018-07-06 at 10 18 33 am

edit: just noticed deploy failed. Going to fix that.

const pathToGroupScripts = __GROUP_FILES__ ? `js/` : ``

let bodyHtml = ``
let headComponents = []
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/commands/build-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = async (program: any) => {
}

const outputFile = groupFiles
? `${directory}/public/scripts/render-page.js`
? `${directory}/public/js/render-page.js`
: `${directory}/public/render-page.js`

if (stats.hasErrors()) {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/commands/develop-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = async (program: any) => {
}

const outputFile = groupFiles
? `${directory}/public/scripts/render-page.js`
? `${directory}/public/js/render-page.js`
: `${directory}/public/render-page.js`

if (stats.hasErrors()) {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/utils/webpack-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ module.exports = async ({
* includes some reasonable defaults
*/
plugins.extractText = options => {
const pathToGroupStyles = program.groupFiles ? `../styles/` : ``
const pathToGroupStyles = program.groupFiles ? `../css/` : ``

return new MiniCssExtractPlugin({
filename: `${pathToGroupStyles}[name].[contenthash].css`,
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby/src/utils/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ module.exports = async (

function getOutputPaths() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was duplicate code in the webpack output configs, so I moved it into a function that also handles the grouping of files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

const path = program.groupFiles
? directoryPath(`public/scripts`)
? directoryPath(`public/js`)
: directoryPath(`public`)

let publicPath = program.prefixPaths
? `${store.getState().config.pathPrefix}/`
: `/`

if (program.groupFiles) {
publicPath = `${publicPath}scripts/`
publicPath = `${publicPath}js/`
}

return {
Expand Down