Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Jul 11, 2024
1 parent 88a6532 commit 0373ff4
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 21 deletions.
4 changes: 1 addition & 3 deletions packages/docs/docs/guide/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ First create a `.assetpack.js` file in the root of your project. This file shoul

```js
// .assetpack.js
import { compress } from '@assetpack/core';

export default {
entry: './raw-assets',
output: './public/assets',
Expand All @@ -60,7 +58,7 @@ If you are using AssetPack with PixiJS, you can use the `pixiPipes` function to

```js
// .assetpack.js
import { compress, pixiPipes } from '@assetpack/core';
import { pixiPipes } from '@assetpack/core/pixi';

export default {
entry: './raw-assets',
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/guide/getting-started/pixi.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This setup also abstracts away some of the more complex features of AssetPack, t
Please refer to the [API Reference](/docs/guide/configuration) for the full list of options.

```js
import { pixiPipes } from "@assetpack/core";
import { pixiPipes } from "@assetpack/core/pixi";

export default {
...
Expand Down
6 changes: 4 additions & 2 deletions packages/docs/docs/guide/pipes/cache-buster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ensure that the `cacheBuster` transformation occurs at the correct stage in your

```ts
// assetpack.config.ts
import { cacheBuster } from "@assetpack/core";
import { cacheBuster } from "@assetpack/core/cacheBuster";

export default {
...
Expand All @@ -44,7 +44,9 @@ The `spineAtlasCacheBuster` pipe performs a similar function for spine atlas fil

```ts
// assetpack.config.ts
import { cacheBuster, texturePackerCacheBuster, spineAtlasCacheBuster } from "@assetpack/core";
import { cacheBuster } from "@assetpack/core/cache-buster";
import { texturePackerCacheBuster } from "@assetpack/core/texture-packer";
import { spineAtlasCacheBuster } from "@assetpack/core/spine";

export default {
...
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/guide/pipes/compress.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The compress plugin uses the Sharp library to compress images into different for
<ImageToggle image={'compress/compress'} height={350} />

```js
import { compress } from "@assetpack/core";
import { compress } from "@assetpack/core/image";

export default {
...
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/docs/guide/pipes/ffmpeg.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The audio plugin converts and compresses audio files (`mp3`, `wav`, and `ogg`) t

```ts
// assetpack.config.ts
import { audio } from "@assetpack/core";
import { audio } from "@assetpack/core/ffmpeg";

export default {
...
Expand All @@ -36,7 +36,7 @@ The `ffmpeg` plugin exposes the full FFmpeg API, allowing for the conversion of

```ts
// assetpack.config.ts
import { ffmpeg } from "@assetpack/core";
import { ffmpeg } from "@assetpack/core/ffmpeg";

export default {
...
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/docs/guide/pipes/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AssetPack plugin for minifying JSON files. This plugin simplifies JSON files by
## Example

```js
import { json } from "@assetpack/core";
import { json } from "@assetpack/core/json";

export default {
...
Expand Down
5 changes: 3 additions & 2 deletions packages/docs/docs/guide/pipes/manifest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ We believe this plugin is a must-have for any PixiJS project, as it simplifies t
</div> */}

```js
import { pixiManifest } from "@assetpack/core";
import { pixiManifest } from "@assetpack/core/manifest";

export default {
...
Expand Down Expand Up @@ -68,7 +68,8 @@ export default {
When using the [Spine plugins](/docs/guide/pipes/spine), you should use the `spineAtlasManifestMod` plugin to augment the manifest file with the spine atlas files. This ensures that the spine atlas files are included in the manifest.

```js
import { pixiManifest, spineAtlasManifestMod } from "@assetpack/core";
import { pixiManifest } from "@assetpack/core/manifest";
import { spineAtlasManifestMod } from '@assetpack/core/spine'

export default {
...
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/docs/guide/pipes/mipmap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ When generating multiple resolutions, the plugin assumes that the original image
<ImageToggle image={'mipmap/mipmap'} height={350} />

```js
import { mipmap } from "@assetpack/core";
import { mipmap } from "@assetpack/core/image";

export default {
...
Expand All @@ -38,7 +38,7 @@ export default {
<ImageToggle image={'mipmap/mipmap-custom'} height={350} />

```js
import { mipmap } from "@assetpack/core";
import { mipmap } from "@assetpack/core/image";

export default {
...
Expand Down
9 changes: 6 additions & 3 deletions packages/docs/docs/guide/pipes/spine.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ This plugin should be used in conjunction with the [compress](/docs/guide/pipes/
<ImageToggle image={"spine/spine-atlas-compress"} />

```js
import { compress, spineAtlasCompress } from "@assetpack/core";
import { compress } from "@assetpack/core/image";
import { spineAtlasCompress } from "@assetpack/core/spine";

// these options are the default values, all options shown here are optional
const options = {
Expand Down Expand Up @@ -69,7 +70,8 @@ You will want to make sure you are passing the same options to the `mipmap` plug
<ImageToggle image={"spine/spine-atlas-mip"} />

```js
import { mipmap, spineAtlasMipmap } from "@assetpack/core";
import { mipmap } from "@assetpack/core/image";
import { spineAtlasMipmap } from "@assetpack/core/spine";

// these options are the default values, all options shown here are optional
const options = {
Expand Down Expand Up @@ -109,7 +111,8 @@ N/A for this plugin.
### Example

```js
import { pixiManifest, spineAtlasManifestMod } from "@assetpack/core";
import { pixiManifest } from "@assetpack/core/manifest";
import { spineAtlasManifestMod } from "@assetpack/core/spine";

export default {
...
Expand Down
5 changes: 3 additions & 2 deletions packages/docs/docs/guide/pipes/texture-packer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using a different library you may need to convert the output.
<ImageToggle image={'texture-packer/tps-mip'} />

```js
import { texturePacker } from "@assetpack/core";
import { texturePacker } from "@assetpack/core/texture-packer";

export default {
...
Expand Down Expand Up @@ -87,7 +87,8 @@ To compress the texture atlases you can use the `texturePackerCompress` plugin.
<ImageToggle image={'texture-packer/tps-compress'} />

```js
import { compress, texturePackerCompress } from "@assetpack/core";
import { compress } from "@assetpack/core/image";
import { compress } from "@assetpack/core/texture-packer";

// these options are the default values, all options shown here are optional
const options = {
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/docs/guide/pipes/webfont.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This plugin generates `woff2` fonts from `ttf`, `otf`, `woff`, and `svg` files.
<ImageToggle image={'webfonts/webfont'} />

```js
import { webfont } from "@assetpack/core";
import { webfont } from "@assetpack/core/webfont";

export default {
...
Expand Down Expand Up @@ -45,7 +45,7 @@ These plugins generate signed distance field (SDF) and multi-channel signed dist
<ImageToggle image={'webfonts/webfont-sdf'} />

```js
import { sdf, msdf } from "@assetpack/core";
import { sdf, msdf } from "@assetpack/core/webfont";

export default {
...
Expand Down

0 comments on commit 0373ff4

Please sign in to comment.