Skip to content

Commit 4c2dd17

Browse files
Technical/issue 404 netlify configuration (#408)
* netlify configuration and docs for asset optimization * link to Netlify docs for configuration * remove redundant yarn clean commands
1 parent 1ffdf14 commit 4c2dd17

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

netlify.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build]
2+
publish = "public/"
3+
command = "yarn build"
4+
5+
[build.processing]
6+
skip_processing = true

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
"clean": "rimraf ./**/.greenwood/** && rimraf ./**/public/** && rimraf ./coverage",
1818
"clean:deps": "rimraf **/node_modules/**",
1919
"lint": "ls-lint && eslint \"*.js\" \"./packages/**/**/*.js\" \"./test/*.js\" \"./www/**/**/*.js\"",
20-
"build": "yarn clean && node . build",
20+
"build": "node . build",
2121
"serve": "yarn build && cd ./public && ws",
22-
"develop": "yarn clean && node . develop",
23-
"test": "export BROWSERSLIST_IGNORE_OLD_DATA=true && yarn clean && nyc mocha",
22+
"develop": "node . develop",
23+
"test": "export BROWSERSLIST_IGNORE_OLD_DATA=true && nyc mocha",
2424
"test:tdd": "yarn test --watch"
2525
},
2626
"devDependencies": {

www/pages/guides/netlify-deploy.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ After you have created your Greenwood project and pushed your code to a GitHub r
2626
1. Click **deploy site**
2727

2828
Done. It will start building your first deployment and will update each time you make changes to the master branch of your repo.
29+
30+
> We recommend **_disabling_** Netlify [Asset Optimization](https://www.netlify.com/blog/2019/08/05/control-your-asset-optimization-settings-from-netlify.toml/) since it could lead to [duplicate asset serving](https://community.netlify.com/t/asset-optimization-preloading-fonts/3197/7). Greenwood will do all the bundling / minifying you need. You can review the [_netlify.toml_](https://github.com/ProjectEvergreen/greenwood/blob/master/netlify.toml) to see what configuration we're using for the Greenwood website. More information available [here](https://docs.netlify.com/configure-builds/file-based-configuration/) about Netlify configuration files.

0 commit comments

Comments
 (0)