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

Themekit in browser #126

Merged
merged 5 commits into from
Jun 23, 2021
Merged

Themekit in browser #126

merged 5 commits into from
Jun 23, 2021

Conversation

Nnigmat
Copy link
Contributor

@Nnigmat Nnigmat commented Jun 22, 2021

  1. fs, require('.yaml') и require(json5) подключаются только в node среде
  2. Добавил типы
  3. Вынес загрузку данных в отдельную функцию
  4. Логика для работы в браузере

}
}

to_ret.properties = deepExtend([{}, to_ret.properties, props]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хм, а deepExtend больше не нужен? Если да, то надо не забыть импорт удалить

let chalk = require('chalk')

let fs
if (typeof window === 'undefined') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давай вообще все дефолтные экшены удалим, мы нигде их не использовали и не будем

chalk = require('chalk');


let fs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А у тебя этот модуль где-то в браузере подключается?

chalk = require('chalk');

let fs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут тоже вопрос, подключается ли этот модуль в браузере?

chalk = require('chalk'),
filterProperties = require('./filterProperties'),
GroupMessages = require('./utils/groupMessages');

let fs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и тут

@@ -41,8 +48,10 @@ export function createStyleDictionaryConfig({ sources, entry, platform, output }
return acc
}, {})

// To work in browser we should pass `properties` and set `include` to []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что-то не понимаю, почему так, почему нельзя возвращать только одно свойство?

@Nnigmat Nnigmat merged commit 3118e00 into master Jun 23, 2021
@Nnigmat Nnigmat deleted the browser branch June 23, 2021 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants