0.0.14 • Published 12 months ago

@skp-wpteam/json-dsl-parser v0.0.14

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

dsl-parser

디자이너 그룹에서 사용하는 DSL 토큰명을 값으로 치환해주는 웹팩 로더입니다.

Example

  • DSL 토큰 예시
// token.json

{
    "global": {
        "colors": {
            "Blue": {
                "100": {
                    value: "#000011",
                    type: "color"
                },
                "200": {
                    value: "#000022",
                    type: "color"
                },
                "300": {
                    value: "#000033"
                    type: "color"
                },
                // ...
            }
            // ...
        }

        "texts": {
            "t1": {
                type: "text"
            },
            "t2": {
                type: "text"
            }
            // ...
        }
    }
}

...
  • SCSS 스타일시트 예시
// styles.scss

.title-text {
    color: $global-colors-Blue-100;
    text: $global-text-t1;
}
  • 웹팩 번들링 결과물
// styles.css

.title-text {
    color: #000011;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.5;
}

Next.js 환경에서 사용할 때

yarn add -D @skp-wpteam/json-dsl-parser mini-css-extract-plugin css-loader sass-loader

패키지 배포

  • NPM 패키지를 배포할 때는 반드시 package.jsonversion 정보를 이전 버전보다 높여줘야 합니다.
(sudo) npm publish
0.0.14

12 months ago

0.0.13

12 months ago

0.0.12

12 months ago

0.0.11

12 months ago

0.0.10

12 months ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago