Skip to content

Commit

Permalink
refactor: solidify the exported atlas file format (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Mar 21, 2024
1 parent 072cae3 commit 2a6d6f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -13,7 +13,7 @@ Install the `expo-atlas` package as (development) dependency to your project:
$ npx expo install expo-atlas
```

Configure your Metro config to emit a `.expo/stats.jsonl` file containing information about your bundles.
Configure your Metro config to emit an Atlas file containing information about your bundles.

```js metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
Expand All @@ -36,12 +36,12 @@ $ npx expo export --platform all
$ npx expo-atlas
```

## 🧑‍🤝‍🧑 Sharing stats files
## 🧑‍🤝‍🧑 Sharing the Atlas file

You can also open a previously created `stats.jsonl` file:
You can also open a previously created `atlas.jsonl` file:

```
$ npx expo-atlas ./path/to/stats.jsonl
$ npx expo-atlas ./path/to/atlas.jsonl
```

<div align="center">
Expand Down
4 changes: 2 additions & 2 deletions src/utils/__tests__/stats.test.ts
Expand Up @@ -7,8 +7,8 @@ import { AtlasValidationError } from '../errors';
import { getStatsPath, getStatsMetdata, createStatsFile, validateStatsFile } from '../stats';

describe('getStatsPath', () => {
it('returns default path `<project>/.expo/stats.jsonl`', () => {
expect(getStatsPath('<project>')).toBe('<project>/.expo/stats.jsonl');
it('returns default path `<project>/.expo/atlas.jsonl`', () => {
expect(getStatsPath('<project>')).toBe('<project>/.expo/atlas.jsonl');
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/utils/stats.ts
Expand Up @@ -10,7 +10,7 @@ export type StatsMetadata = { name: string; version: string };

/** The default location of the metro stats file */
export function getStatsPath(projectRoot: string) {
return path.join(projectRoot, '.expo/stats.jsonl');
return path.join(projectRoot, '.expo/atlas.jsonl');
}

/** The information to validate if a stats file is compatible with this library version */
Expand Down

0 comments on commit 2a6d6f4

Please sign in to comment.