Sfoglia il codice sorgente

chore: add `design token` changelog type

走鹃 3 anni fa
parent
commit
4522b02dc9

+ 1 - 1
scripts/changelog.js

@@ -76,7 +76,7 @@ const TYPE_MAP = {
     styles: 'style',
 };
 
-const SUPPORT_TYPES = new Set(['feature', 'performance', 'style', 'new component', 'chore', 'docs', 'fix', 'refactor', 'breaking change']);
+const SUPPORT_TYPES = new Set(['feature', 'performance', 'style', 'new component', 'chore', 'docs', 'fix', 'refactor', 'breaking change', 'design token']);
 
 const UNKNOWN_COMPONENT_NAME = 'Other';
 const UNKNOWN_TYPE_NAME = 'chore';

+ 2 - 1
src/components/ChangeLogDiff/constant.js

@@ -7,5 +7,6 @@ export const CHANGELOG_TYPE_MAP = {
     performance: '🚀 Performance',
     chore: '🗃 Chore',
     docs: '✏️ Documentation',
-    'breaking change': '💥 Breaking Change'
+    'breaking change': '💥 Breaking Change',
+    'design token': '✨ Design Token',
 };

+ 4 - 0
src/templates/postTemplate.js

@@ -289,6 +289,10 @@ const components = {
             if (children[0] === '【Breaking Change】') {
                 children[0] = <div className={'changelog-title'}>💥【Breaking Change】</div>;
             }
+
+            if (children[0] === '【Design Token】') {
+                children[0] = <div className={'changelog-title'}>✨【Design Token】</div>;
+            }
         }
 
         return <li className={'gatsby-li'}>{children}</li>;