figma-library-analytics
Advanced tools
Comparing version 1.0.0 to 1.0.1
export declare const CONFIG: { | ||
START_DATE: string; | ||
END_DATE: string; | ||
START_DATE: string | undefined; | ||
END_DATE: string | undefined; | ||
}; |
@@ -7,4 +7,4 @@ import axios from 'axios'; | ||
const CONFIG = { | ||
START_DATE: process.env.START_DATE || '2024-01-01', | ||
END_DATE: process.env.END_DATE || '2024-10-10' | ||
START_DATE: process.env.START_DATE, | ||
END_DATE: process.env.END_DATE | ||
}; | ||
@@ -11,0 +11,0 @@ |
{ | ||
"name": "figma-library-analytics", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Figma library analytics.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
# Figma Library Analytics | ||
Library analytics. For the enterprise plan only :/ | ||
Figma library analytics. For the enterprise plan only. :/ | ||
### Installation | ||
```bash | ||
npm install figma-library-analytics | ||
``` | ||
Create a `.env` | ||
```bash | ||
FIGMA_ACCESS_TOKEN=your_figma_access_token | ||
FILE_KEY=your_figma_file_key | ||
START_DATE=YYYY-MM-DD | ||
END_DATE=YYYY-MM-DD | ||
``` | ||
### Usage | ||
As a module | ||
```typescript | ||
import { libraryAnalytics } from 'figma-library-analytics'; | ||
async function runAnalytics() { | ||
try { | ||
await libraryAnalytics(); | ||
console.log('Reports generated successfully!'); | ||
} catch (error) { | ||
console.error('Error generating reports:', error); | ||
} | ||
} | ||
runAnalytics(); | ||
``` | ||
As a CLI tool | ||
```bash | ||
figma-library-analytics | ||
``` | ||
### Output | ||
Generated in the `output` directory | ||
1. `actions_by_component.csv` — actions (detachments and insertions) grouped by component. | ||
2. `actions_by_team.csv` — actions grouped by team. | ||
3. `usages_by_component.csv` — component usage statistics. | ||
4. `usages_by_file.csv` — component usage grouped by file. |
export const CONFIG = { | ||
START_DATE: process.env.START_DATE || '2024-01-01', | ||
END_DATE: process.env.END_DATE || '2024-10-10' | ||
START_DATE: process.env.START_DATE, | ||
END_DATE: process.env.END_DATE | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
38552
50