@storm-software/workspace-tools 1.31.0 → 1.31.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.31.1](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.31.0...workspace-tools-v1.31.1) (2023-12-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **git-tools:** Update the env names to align with config parameters ([f7438f0](https://github.com/storm-software/storm-ops/commit/f7438f048d52a598bb11e742b1549153e58237c8))
7
+
8
+ # [1.31.0](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.30.14...workspace-tools-v1.31.0) (2023-12-15)
9
+
10
+
11
+ ### Features
12
+
13
+ * **design-tools:** Added design tools package to support storm design systems ([187a38f](https://github.com/storm-software/storm-ops/commit/187a38fc7ce8f992ff96ad210058089da909f1b6))
14
+
1
15
  ## [1.30.14](https://github.com/storm-software/storm-ops/compare/workspace-tools-v1.30.13...workspace-tools-v1.30.14) (2023-12-15)
2
16
 
3
17
 
package/README.md CHANGED
@@ -16,7 +16,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
16
16
 
17
17
  <h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
18
18
 
19
- [![Version](https://img.shields.io/badge/version-1.29.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Version](https://img.shields.io/badge/version-1.31.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
20
20
  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
21
21
 
22
22
  <h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️ This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.</h3><br />
@@ -103,7 +103,7 @@ The following executor options are available:
103
103
  | assets | `array` | List of static assets. | `[]` |
104
104
  | clean | `boolean` | Remove previous output before build. | `true` |
105
105
  | includeSrc | `boolean` | Should the source files be added to the distribution folder in an \`src\` directory. | |
106
- | packageAll | `boolean` | Should the build run for each file contained in the package individually. | `true` |
106
+ | emitOnAll | `boolean` | Should each file contained in the package be emitted individually. | `true` |
107
107
  | generatePackageJson | `boolean` | Should a package.json file be generated in the output folder or should the existing one be copied in. | `true` |
108
108
  | splitting | `boolean` | Should the build process preform \*code-splitting\*? | `true` |
109
109
  | treeshake | `boolean` | Should the build process \*tree-shake\* to remove unused code? | `true` |
@@ -182,6 +182,45 @@ nx run my-project:tsup-browser
182
182
 
183
183
 
184
184
 
185
+ ## Design Tokens Code Builder
186
+
187
+ Create styling source code from design tokens json file(s) exported from Figma Tokens Studio
188
+
189
+ ### Example
190
+
191
+ This executor can be used by executing the following in a command line utility:
192
+
193
+ ```cmd
194
+ nx run my-project:design-tokens
195
+ ```
196
+
197
+ **Please note:** _The design-tokens executor should be included in the desired projects's `project.json` file.All required options must be included in the `options` property of the json._
198
+
199
+ ### Options
200
+
201
+ The following executor options are available:
202
+
203
+ | Option | Type | Description | Default |
204
+ | --------- | ------ | ------------- | --------- |
205
+ | **inputPath \*** | `string` | The path to the tokens json file(s) exported from Figma Tokens Studio. | |
206
+ | **type \*** | "tailwindcss" \| "tamagui" \| "all" | The type of code to generate based on the supplied tokens (TailWind CSS, Tamagui, etc.). | "tailwindcss" |
207
+ | **tsConfig \*** | `string` | Path to the typescript config file. | |
208
+ | customActions | `string` | Path to the ts file exporting the custom actions to register. | |
209
+ | customFileHeaders | `string` | Path to the ts file exporting the custom file headers to register. | |
210
+ | customFilters | `string` | Path to the ts file exporting the custom filters to register. | |
211
+ | customFormats | `string` | Path to the ts file exporting the custom formats to register. | |
212
+ | customParsers | `string` | Path to the ts file exporting the custom parsers to register. | |
213
+ | customTransformGroups | `string` | Path to the ts file exporting the custom transform groups to register. | |
214
+ | customTransforms | `string` | Path to the ts file exporting the custom transform to register. | |
215
+ | outputPath | `string` | The output path of the generated files. | |
216
+ | deleteOutputPath | `boolean` | Delete the output path before building. | `true` |
217
+ | platform | `string` | Build only the passed platform defined in the configuration. | |
218
+
219
+
220
+ **Please note:** _Option names followed by \* above are required, and must be provided to run the executor._
221
+
222
+
223
+
185
224
  <!-- markdownlint-restore -->
186
225
  <!-- prettier-ignore-end -->
187
226
 
package/index.js CHANGED
@@ -117111,6 +117111,8 @@ ${Object.keys(options).map(
117111
117111
  if (!result.success) {
117112
117112
  throw new Error("The Build process failed trying to copy assets");
117113
117113
  }
117114
+ const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
117115
+ const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
117114
117116
  const workspacePackageJson = (0, import_devkit2.readJsonFile)(
117115
117117
  (0, import_path3.join)(workspaceRoot, "package.json")
117116
117118
  );
@@ -117118,7 +117120,7 @@ ${Object.keys(options).map(
117118
117120
  if (workspacePackageJson?.dependencies) {
117119
117121
  options.external = Object.keys(workspacePackageJson?.dependencies).reduce(
117120
117122
  (ret, key) => {
117121
- if (!options.external.includes(key)) {
117123
+ if (!ret.includes(key)) {
117122
117124
  ret.push(key);
117123
117125
  }
117124
117126
  return ret;
@@ -117126,16 +117128,18 @@ ${Object.keys(options).map(
117126
117128
  options.external
117127
117129
  );
117128
117130
  }
117129
- let externalDependencies = options.external.reduce((acc, name) => {
117130
- const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
117131
- if (externalNode) {
117132
- acc.push({
117133
- name,
117134
- outputs: [],
117135
- node: externalNode
117136
- });
117131
+ let externalDependencies = options.external.reduce((ret, name) => {
117132
+ if (!packageJson?.devDependencies?.[name]) {
117133
+ const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
117134
+ if (externalNode) {
117135
+ ret.push({
117136
+ name,
117137
+ outputs: [],
117138
+ node: externalNode
117139
+ });
117140
+ }
117137
117141
  }
117138
- return acc;
117142
+ return ret;
117139
117143
  }, []);
117140
117144
  const implicitDependencies = context.projectsConfigurations.projects[context.projectName].implicitDependencies;
117141
117145
  const internalDependencies = [];
@@ -117148,12 +117152,12 @@ ${Object.keys(options).map(
117148
117152
  console.log(`\u26A1 Adding implicit dependency: ${key}`);
117149
117153
  const projectConfig = projectConfigs[key];
117150
117154
  if (projectConfig?.targets?.build) {
117151
- const packageJson = (0, import_devkit2.readJsonFile)(
117155
+ const projectPackageJson = (0, import_devkit2.readJsonFile)(
117152
117156
  projectConfig.targets?.build.options.project
117153
117157
  );
117154
- if (packageJson?.name && !options.external.includes(packageJson.name)) {
117155
- ret.push(packageJson.name);
117156
- internalDependencies.push(packageJson.name);
117158
+ if (projectPackageJson?.name && !options.external.includes(projectPackageJson.name)) {
117159
+ ret.push(projectPackageJson.name);
117160
+ internalDependencies.push(projectPackageJson.name);
117157
117161
  }
117158
117162
  }
117159
117163
  return ret;
@@ -117169,7 +117173,9 @@ ${Object.keys(options).map(
117169
117173
  const packageConfig = thirdPartyDependency.node.data;
117170
117174
  if (packageConfig?.packageName) {
117171
117175
  options.external.push(packageConfig.packageName);
117172
- externalDependencies.push(thirdPartyDependency);
117176
+ if (!packageJson?.devDependencies?.[packageConfig.packageName]) {
117177
+ externalDependencies.push(thirdPartyDependency);
117178
+ }
117173
117179
  }
117174
117180
  }
117175
117181
  }
@@ -117230,14 +117236,12 @@ ${externalDependencies.map((dep) => {
117230
117236
  }, {});
117231
117237
  if (options.generatePackageJson !== false) {
117232
117238
  const projectGraph = (0, import_devkit2.readCachedProjectGraph)();
117233
- const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
117234
- const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
117235
117239
  delete packageJson.dependencies;
117236
117240
  externalDependencies.forEach((externalDependency) => {
117237
117241
  const packageConfig = externalDependency.node.data;
117238
117242
  if (packageConfig?.packageName && !!(projectGraph.externalNodes[externalDependency.node.name]?.type === "npm")) {
117239
117243
  const { packageName, version } = packageConfig;
117240
- if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName]) {
117244
+ if (workspacePackageJson.dependencies?.[packageName] || workspacePackageJson.devDependencies?.[packageName] || packageJson?.devDependencies?.[packageName]) {
117241
117245
  return;
117242
117246
  }
117243
117247
  packageJson.dependencies ??= {};
@@ -117245,8 +117249,10 @@ ${externalDependencies.map((dep) => {
117245
117249
  }
117246
117250
  });
117247
117251
  internalDependencies.forEach((packageName) => {
117248
- packageJson.dependencies ??= {};
117249
- packageJson.dependencies[packageName] = "latest";
117252
+ if (!packageJson?.devDependencies?.[packageName]) {
117253
+ packageJson.dependencies ??= {};
117254
+ packageJson.dependencies[packageName] = "latest";
117255
+ }
117250
117256
  });
117251
117257
  packageJson.type = "module";
117252
117258
  packageJson.exports ??= {