Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/circular #27

Merged
merged 5 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,438 changes: 1,112 additions & 326 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-6b67494872-9.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions assets/assets-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-assets": "workspace:0.0.1",
"@atls/figma-file-loader": "workspace:0.0.1",
"@atls/figma-assets": "workspace:*",
"@atls/figma-file-loader": "workspace:*",
"commander": "9.5.0",
"figma-js": "1.16.0",
"npmlog": "6.0.2"
Expand Down
1 change: 0 additions & 1 deletion assets/assets-cli/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const run = async (fileId, documentId, output) => {
const loader = new FigmaFileLoader()

const node: Node = await loader.loadDocument(fileId, documentId)

const assets = new FigmaAssets(fileId, node, output)
assets.generate()
}
2 changes: 1 addition & 1 deletion assets/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-file-loader": "workspace:0.0.1",
"@atls/figma-file-loader": "workspace:*",
"figma-js": "1.16.0",
"fs-extra": "10.1.0",
"node-fetch": "2.7.0"
Expand Down
1 change: 1 addition & 0 deletions assets/assets/src/FigmaAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class FigmaAssets {

async generate() {
const { children } = this.node as any

const items: any[] = []

children
Expand Down
3 changes: 0 additions & 3 deletions loaders/file-loader/src/FigmaFileLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export class FigmaFileLoader {

async load(fileId: string): Promise<FileResponse> {
const { data } = await this.figma.file(fileId)

return data
}

Expand All @@ -26,7 +25,6 @@ export class FigmaFileLoader {
if (!node) {
throw new Error(`Document with id ${documentId} not found. Please try again`)
}

return node
}

Expand All @@ -36,7 +34,6 @@ export class FigmaFileLoader {
format: 'svg',
scale: 1,
})

return data.images
}
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"theme/*",
"utils/*"
],
"scripts": {
"detect-circular": "madge . -c"
},
"resolutions": {
"@types/node": "18"
},
Expand All @@ -20,6 +23,7 @@
"@types/node": "18.18.7",
"eslint": "8.8.0",
"husky": "8.0.1",
"madge": "6.1.0",
"typescript": "4.6.4"
},
"packageManager": "[email protected]"
Expand Down
5 changes: 2 additions & 3 deletions theme/theme-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-assets": "workspace:0.0.1",
"@atls/figma-file-loader": "workspace:0.0.1",
"@atls/figma-theme": "workspace:0.0.1",
"@atls/figma-file-loader": "workspace:*",
"@atls/figma-theme": "workspace:*",
"commander": "9.5.0",
"figma-js": "1.16.0",
"npmlog": "7.0.1"
Expand Down
5 changes: 2 additions & 3 deletions theme/theme-colors-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-theme": "workspace:0.0.1",
"@atls/figma-theme-generator-common": "workspace:0.0.1",
"@atls/figma-utils": "workspace:0.0.1",
"@atls/figma-theme-generator-common": "workspace:*",
"@atls/figma-utils": "workspace:*",
"camelcase": "6.3.0",
"color-namer": "1.4.0"
},
Expand Down
5 changes: 2 additions & 3 deletions theme/theme-font-sizes-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-theme": "workspace:0.0.1",
"@atls/figma-utils": "workspace:0.0.1"
"@atls/figma-utils": "workspace:*"
},
"devDependencies": {
"@atls/figma-theme-generator-common": "workspace:0.0.1",
"@atls/figma-theme-generator-common": "workspace:*",
"@types/node": "18.18.7",
"figma-js": "1.16.0"
},
Expand Down
5 changes: 2 additions & 3 deletions theme/theme-font-weights-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-theme": "workspace:0.0.1",
"@atls/figma-utils": "workspace:0.0.1"
"@atls/figma-utils": "workspace:*"
},
"devDependencies": {
"@atls/figma-theme-generator-common": "workspace:0.0.1",
"@atls/figma-theme-generator-common": "workspace:*",
"@types/node": "18.18.7",
"figma-js": "1.16.0"
},
Expand Down
5 changes: 2 additions & 3 deletions theme/theme-fonts-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-theme": "workspace:0.0.1",
"@atls/figma-utils": "workspace:0.0.1"
"@atls/figma-utils": "workspace:*"
},
"devDependencies": {
"@atls/figma-theme-generator-common": "workspace:0.0.1",
"@atls/figma-theme-generator-common": "workspace:*",
"@types/node": "18.18.7",
"figma-js": "1.16.0"
},
Expand Down
2 changes: 1 addition & 1 deletion theme/theme-generator-common/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FileResponse } from 'figma-js'

export interface FigmaThemeGeneratorValues {
content: string
name: string
content: string
}

export type FigmaThemeGeneratorResult =
Expand Down
5 changes: 2 additions & 3 deletions theme/theme-line-heights-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-theme": "workspace:0.0.1",
"@atls/figma-utils": "workspace:0.0.1"
"@atls/figma-utils": "workspace:*"
},
"devDependencies": {
"@atls/figma-theme-generator-common": "workspace:0.0.1",
"@atls/figma-theme-generator-common": "workspace:*",
"@types/node": "18.18.7",
"figma-js": "1.16.0"
},
Expand Down
5 changes: 2 additions & 3 deletions theme/theme-radii-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-theme": "workspace:0.0.1",
"@atls/figma-utils": "workspace:0.0.1"
"@atls/figma-utils": "workspace:*"
},
"devDependencies": {
"@atls/figma-theme-generator-common": "workspace:0.0.1",
"@atls/figma-theme-generator-common": "workspace:*",
"@types/node": "18.18.7",
"figma-js": "1.16.0"
},
Expand Down
5 changes: 2 additions & 3 deletions theme/theme-shadows-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-theme": "workspace:0.0.1",
"@atls/figma-utils": "workspace:0.0.1"
"@atls/figma-utils": "workspace:*"
},
"devDependencies": {
"@atls/figma-theme-generator-common": "workspace:0.0.1",
"@atls/figma-theme-generator-common": "workspace:*",
"@types/node": "18.18.7",
"figma-js": "1.16.0"
},
Expand Down
14 changes: 7 additions & 7 deletions theme/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"postpack": "rm -rf dist"
},
"dependencies": {
"@atls/figma-theme-colors-generator": "workspace:0.0.1",
"@atls/figma-theme-font-sizes-generator": "workspace:0.0.1",
"@atls/figma-theme-font-weights-generator": "workspace:0.0.1",
"@atls/figma-theme-fonts-generator": "workspace:0.0.1",
"@atls/figma-theme-line-heights-generator": "workspace:0.0.1",
"@atls/figma-theme-radii-generator": "workspace:0.0.1",
"@atls/figma-theme-shadows-generator": "workspace:0.0.1",
"@atls/figma-theme-colors-generator": "workspace:*",
"@atls/figma-theme-font-sizes-generator": "workspace:*",
"@atls/figma-theme-font-weights-generator": "workspace:*",
"@atls/figma-theme-fonts-generator": "workspace:*",
"@atls/figma-theme-line-heights-generator": "workspace:*",
"@atls/figma-theme-radii-generator": "workspace:*",
"@atls/figma-theme-shadows-generator": "workspace:*",
"figma-js": "1.16.0",
"prettier": "2.7.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { mkdirSync } from 'fs'
import { readFileSync } from 'fs'

import { FigmaTheme } from '@atls/figma-theme'

import { FigmaThemeColorsGenerator } from '../FigmaThemeColorsGenerator'
import { FigmaThemeColorsGenerator } from '@atls/figma-theme-colors-generator'

describe('colors generator', () => {
const file = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { existsSync } from 'fs'
import { mkdirSync } from 'fs'
import { readFileSync } from 'fs'

import { FigmaTheme } from '@atls/figma-theme'
import { FigmaThemeFontSizesGenerator } from '@atls/figma-theme-font-sizes-generator'

import { FigmaThemeFontSizesGenerator } from '../FigmaThemeFontSizesGenerator'
import { FigmaTheme } from '../index'

describe('font sizes generator', () => {
const file = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { readFileSync } from 'fs'
import { mkdirSync } from 'fs'
import { existsSync } from 'fs'

import { FigmaTheme } from '@atls/figma-theme'
import { FigmaThemeFontWeightsGenerator } from '@atls/figma-theme-font-weights-generator'

import { FigmaThemeFontWeightsGenerator } from '../FigmaThemeFontWeightsGenerator'
import { FigmaTheme } from '../index'

describe('font weights generator', () => {
const file = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { readFileSync } from 'fs'
import { mkdirSync } from 'fs'
import { existsSync } from 'fs'

import { FigmaTheme } from '@atls/figma-theme'
import { FigmaThemeFontsGenerator } from '@atls/figma-theme-fonts-generator'

import { FigmaThemeFontsGenerator } from '../FigmaThemeFontsGenerator'
import { FigmaTheme } from '../index'

describe('fonts generator', () => {
const file = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { existsSync } from 'fs'
import { mkdirSync } from 'fs'
import { readFileSync } from 'fs'

import { FigmaTheme } from '@atls/figma-theme'
import { FigmaThemeLineHeightsGenerator } from '@atls/figma-theme-line-heights-generator'

import { FigmaThemeLineHeightsGenerator } from '../FigmaThemeLineHeightsGenerator'
import { FigmaTheme } from '../index'

describe('lineHeights generator', () => {
const file = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { readFileSync } from 'fs'
import { mkdirSync } from 'fs'
import { existsSync } from 'fs'

import { FigmaTheme } from '@atls/figma-theme'
import { FigmaThemeRadiiGenerator } from '@atls/figma-theme-radii-generator'

import { FigmaThemeRadiiGenerator } from '../FigmaThemeRadiiGenerator'
import { FigmaTheme } from '../index'

describe('radii generator', () => {
const file = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { readFileSync } from 'fs'
import { mkdirSync } from 'fs'
import { existsSync } from 'fs'

import { FigmaTheme } from '@atls/figma-theme'
import { FigmaThemeShadowsGenerator } from '@atls/figma-theme-shadows-generator'

import { FigmaThemeShadowsGenerator } from '../FigmaThemeShadowsGenerator'
import { FigmaTheme } from '../index'

describe('shadows generator', () => {
const file = {
Expand Down
2 changes: 1 addition & 1 deletion utils/utils/src/radii.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const toRadiiString = (node: number[]): { token: string; radius: string }
}

return {
radius: '',
token: '',
radius: '',
}
}
Loading
Loading