Skip to content

Commit

Permalink
update documentation for v3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
raurir committed May 18, 2020
1 parent 27880ad commit 1801581
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# gatsby-plugin-asset-path

Move all of your JS and CSS build files, as well as the static folder into a subdirectory of your choice.
Copy all of your JS and CSS build files, as well as the static folder into a subdirectory of your choice.

## Breaking change in v1
## Breaking change in v3

Use `assetPrefix` instead of `pathPrefix`
No longer moves files due to gatsby's internal cache management. Copying files instead!

## Breaking change in v2

Expand All @@ -21,6 +21,10 @@ options: {

Also note that `sitemap.xml` and the `page-data` folder were copied to assets folder before, now they are moved just as all other files this plugin handles.

## Breaking change in v1

Use `assetPrefix` instead of `pathPrefix`

## Our use case

Gatsby by default will generate all of the assets and put them directly at the root level:
Expand Down Expand Up @@ -135,7 +139,7 @@ Stops Webpack from generating the .js.map files

Default: `["static", "page-data"]`

The paths of files/folders to be moved to the asset directory. Do not add `icons` since these are copied and duplicated across `/public/icons/` and `/public/${assetPrefix}/`.
The paths of files/folders to be copied to the asset directory. Do not add `icons` since these are copied and duplicated across `/public/icons/` and `/public/${assetPrefix}/`.

```javascript
// Your gatsby-config.js
Expand All @@ -155,7 +159,7 @@ The paths of files/folders to be moved to the asset directory. Do not add `icons

Default: `["js", "css"]`

The types of files in the root `publicFolder` to be moved to the asset directory.
The types of files in the root `publicFolder` to be copied to the asset directory.

```javascript
// Your gatsby-config.js
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-plugin-asset-path",
"version": "2.0.2",
"description": "Gatsby plugin that moves JS and CSS files and static folder to a custom folder",
"description": "Gatsby plugin that copies JS and CSS files and static folder to a custom folder",
"main": "index.js",
"scripts": {
"build": "babel src --out-dir .",
Expand Down

0 comments on commit 1801581

Please sign in to comment.