swatchkit 0.0.9 → 0.0.10
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/README.md +1 -10
- package/build.js +1 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -191,15 +191,6 @@ module.exports = {
|
|
|
191
191
|
css: './assets/css',
|
|
192
192
|
|
|
193
193
|
// Exclude files (supports glob patterns)
|
|
194
|
-
exclude: ['*.test.js', 'temp*']
|
|
195
|
-
|
|
196
|
-
// Override token settings
|
|
197
|
-
tokens: {
|
|
198
|
-
input: './design-tokens', // Where token JSON files live
|
|
199
|
-
leading: {
|
|
200
|
-
ratio: 1.25, // Modular scale ratio
|
|
201
|
-
base: 1
|
|
202
|
-
}
|
|
203
|
-
}
|
|
194
|
+
exclude: ['*.test.js', 'temp*']
|
|
204
195
|
};
|
|
205
196
|
```
|
package/build.js
CHANGED
|
@@ -197,20 +197,7 @@ function runInit(settings, options) {
|
|
|
197
197
|
copyDefault('text-weights.json', 'text-weights.json');
|
|
198
198
|
|
|
199
199
|
// 3. Create Text Leading Token
|
|
200
|
-
|
|
201
|
-
if (!fs.existsSync(leadingFile)) {
|
|
202
|
-
const srcPath = path.join(__dirname, 'src/blueprints/text-leading.json');
|
|
203
|
-
let sampleLeading = JSON.parse(fs.readFileSync(srcPath, 'utf-8'));
|
|
204
|
-
|
|
205
|
-
// Get settings from config or defaults
|
|
206
|
-
const leadingConfig = settings.fileConfig?.tokens?.leading || {};
|
|
207
|
-
if (leadingConfig.base) sampleLeading.base = leadingConfig.base;
|
|
208
|
-
if (leadingConfig.ratio) sampleLeading.ratio = leadingConfig.ratio;
|
|
209
|
-
if (leadingConfig.items) sampleLeading.items = leadingConfig.items;
|
|
210
|
-
|
|
211
|
-
fs.writeFileSync(leadingFile, JSON.stringify(sampleLeading, null, 2));
|
|
212
|
-
console.log(`Created sample tokens file at ${leadingFile}`);
|
|
213
|
-
}
|
|
200
|
+
copyDefault('text-leading.json', 'text-leading.json');
|
|
214
201
|
|
|
215
202
|
// 4. Create Viewports Token
|
|
216
203
|
copyDefault('viewports.json', 'viewports.json');
|