-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Pull Request ## 🤨 Rationale Added a workaround that avoids forking the DSP generated config.js and enables TypeScript Type Definitions for the JS Build. Could remove after: AdobeXD/design-system-package-dsp#22 ## 👩💻 Implementation Specified a custom config file in the DSP configuration. The custom file loads the one generated by the design system and patches it for the TypeScript configuration changes. I noticed that even with a custom file specified the DSP plugin will still assume the original config.js exists and will always create or update it. The extend and patch workflow in `nimble-config.js` should allow us to leverage the GUI config for the DSP to generate a `config.js` and patch it for custom behavior in `nimble-config.js`. ## 🧪 Testing Tested with the XD extension locally. ## ✅ Checklist - [X] I have updated the project documentation to reflect my changes. Don't think any updates needed.
- Loading branch information
Showing
10 changed files
with
163 additions
and
9 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-components-4975e18f-998c-4d51-9de9-704256682473.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "Switch to token es6 module type declarations", | ||
"packageName": "@ni/nimble-components", | ||
"email": "[email protected]", | ||
"dependentChangeType": "prerelease" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-tokens-6bf3cf0d-5638-453b-ac9c-012aef61c63a.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "Generate es6 module type declarations", | ||
"packageName": "@ni/nimble-tokens", | ||
"email": "[email protected]", | ||
"dependentChangeType": "prerelease" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
129 changes: 129 additions & 0 deletions
129
packages/nimble-tokens/dist/styledictionary/js/tokens.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
/** | ||
* Do not edit directly | ||
* Generated on Fri, 16 Jul 2021 22:14:11 GMT | ||
*/ | ||
|
||
export const Black7 : string; | ||
export const Black40 : string; | ||
export const Warning85 : string; | ||
export const Black75 : string; | ||
export const Black88 : string; | ||
export const Black15 : string; | ||
export const Development32Bit : string; | ||
export const Selection100 : string; | ||
export const Selection15 : string; | ||
export const Black85 : string; | ||
export const Brand100 : string; | ||
export const Brand15 : string; | ||
export const Brand30 : string; | ||
export const Brand50 : string; | ||
export const Brand75 : string; | ||
export const Brand85 : string; | ||
export const Application32Bit : string; | ||
export const Application64Bit : string; | ||
export const Development64Bit : string; | ||
export const Warning100 : string; | ||
export const Pass100 : string; | ||
export const Fail100 : string; | ||
export const Information75 : string; | ||
export const Information50 : string; | ||
export const Information30 : string; | ||
export const Information15 : string; | ||
export const Information85 : string; | ||
export const Information100 : string; | ||
export const Black30 : string; | ||
export const Brand : string; | ||
export const Enterprise : string; | ||
export const ThirdParty : string; | ||
export const RDRgbNiGreen : string; | ||
export const White : string; | ||
export const Black80 : string; | ||
export const Black91 : string; | ||
export const Black : string; | ||
export const Black50 : string; | ||
export const Black95 : string; | ||
export const RgbNiHoney : string; | ||
export const Plot6 : string; | ||
export const Plot5 : string; | ||
export const Plot4 : string; | ||
export const Plot3 : string; | ||
export const Plot2 : string; | ||
export const Plot1 : string; | ||
export const Fail85 : string; | ||
export const Fail75 : string; | ||
export const Pass15 : string; | ||
export const Pass30 : string; | ||
export const Pass50 : string; | ||
export const Pass75 : string; | ||
export const Pass85 : string; | ||
export const Fail50 : string; | ||
export const Fail30 : string; | ||
export const Fail15 : string; | ||
export const Warning75 : string; | ||
export const Warning50 : string; | ||
export const Warning30 : string; | ||
export const Warning15 : string; | ||
export const RgbNiPaleGreen : string; | ||
export const RgbNiOffWhite : string; | ||
export const RgbNiFernDark3 : string; | ||
export const RgbNiFernDark2 : string; | ||
export const RgbNiFernDark1 : string; | ||
export const RgbNiFern : string; | ||
export const RgbNiFernLight : string; | ||
export const RgbNiPlumDark3 : string; | ||
export const RgbNiPlumDark2 : string; | ||
export const RgbNiPlumDark1 : string; | ||
export const RgbNiPlum : string; | ||
export const RgbNiPlumLight : string; | ||
export const RgbNiIndigoDark3 : string; | ||
export const RgbNiIndigoDark2 : string; | ||
export const RgbNiIndigoDark1 : string; | ||
export const RgbNiIndigo : string; | ||
export const RgbNiIndigoLight : string; | ||
export const RgbNiSeaDark3 : string; | ||
export const RgbNiSeaDark2 : string; | ||
export const RgbNiSeaDark1 : string; | ||
export const RgbNiSea : string; | ||
export const RgbNiSeaLight : string; | ||
export const RgbNiTulipDark3 : string; | ||
export const RgbNiTulipDark2 : string; | ||
export const RgbNiTulipDark1 : string; | ||
export const RgbNiTulip : string; | ||
export const RgbNiTulipLight : string; | ||
export const RgbNiScarletDark3 : string; | ||
export const RgbNiScarletDark2 : string; | ||
export const RgbNiScarletDark1 : string; | ||
export const RgbNiScarlet : string; | ||
export const RgbNiScarletLight : string; | ||
export const RgbNiHoneyDark3 : string; | ||
export const RgbNiHoneyDark2 : string; | ||
export const RgbNiHoneyDark1 : string; | ||
export const RgbNiHoneyLight : string; | ||
export const RgbNiSkyDark3 : string; | ||
export const RgbNiSkyDark2 : string; | ||
export const RgbNiSkyDark1 : string; | ||
export const RgbNiSky : string; | ||
export const RgbNiSkyLight : string; | ||
export const RgbNiPowerGreen : string; | ||
export const RgbNiForestGreen : string; | ||
export const ButtonFamily : string; | ||
export const ButtonWeight : string; | ||
export const OverlineCapsFamily : string; | ||
export const OverlineCapsWeight : string; | ||
export const BodyFamily : string; | ||
export const BodyWeight : string; | ||
export const SubtitleFamily : string; | ||
export const SubtitleWeight : string; | ||
export const H2Family : string; | ||
export const H2Weight : string; | ||
export const H1Family : string; | ||
export const H1Weight : string; | ||
export const H0Family : string; | ||
export const H0Weight : string; | ||
export const ButtonSize : string; | ||
export const OverlineCapsSize : string; | ||
export const BodySize : string; | ||
export const SubtitleSize : string; | ||
export const H2Size : string; | ||
export const H1Size : string; | ||
export const H0Size : string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/nimble-tokens/dist/styledictionary/nimble-extensions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const config = require('./config'); | ||
|
||
// Workaround to include TypeScript definitions in output. | ||
// See: https://github.com/AdobeXD/design-system-package-dsp/issues/22 | ||
|
||
config.platforms.js.files.push({ | ||
"destination": "tokens.d.ts", | ||
"format": "typescript/es6-declarations" | ||
}); | ||
|
||
module.exports = config; |
2 changes: 1 addition & 1 deletion
2
packages/nimble-tokens/dist/styledictionary/scss/variables.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters