anubis-ui 1.2.20 → 1.2.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anubis-ui",
3
- "version": "1.2.20",
3
+ "version": "1.2.21",
4
4
  "description": "Class-based css generator",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "scripts": {
18
18
  "dev": "rm -rf dist; npm run prepare; node src/manual/build.js",
19
- "build": "tsc && tsc-alias",
19
+ "build": "node scripts/generate-version.js && tsc && tsc-alias",
20
20
  "preinstall": "npm run build",
21
21
  "prepare": "npm run build",
22
22
  "test": "vitest",
@@ -0,0 +1,15 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const packageJsonPath = path.join(__dirname, '..', 'package.json');
5
+ const versionFilePath = path.join(__dirname, '..', 'src', 'version.ts');
6
+
7
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
8
+ const versionCode = `// This file is auto-generated by scripts/generate-version.js
9
+ // Do not edit this file manually
10
+
11
+ export const version = '${packageJson.version}';
12
+ export default { version };
13
+ `;
14
+
15
+ fs.writeFileSync(versionFilePath, versionCode, 'utf-8');
@@ -1,4 +1,4 @@
1
- import packageJson from '../../package.json';
1
+ import { version } from '../version';
2
2
 
3
3
  const logPrefix = '☯︎ [ANUBIS]'
4
4
  const log = (str: string) => console.log(`${logPrefix} ${str}`)
@@ -10,7 +10,7 @@ const logo = () => {
10
10
  log(' / ___ |/ /| / /_/ / /_/ // / ___/ /')
11
11
  log('/_/ |_/_/ |_/\\____/_____/___//____/')
12
12
  log('')
13
- log(`Welcome to Anubis v${packageJson.version}`)
13
+ log(`Welcome to Anubis v${version}`)
14
14
  log('Autonomous Nominative Utility Based Intuitive Styler')
15
15
  log('---')
16
16
  }
@@ -165,7 +165,7 @@ const getUtilityInfos = ({
165
165
  }
166
166
 
167
167
  if (!matchingUtility) {
168
- log(`No utility found for ${cleanedColor || prefix}`);
168
+ // log(`No utility found for ${cleanedColor || prefix}`);
169
169
 
170
170
  return {
171
171
  matchingUtility,
@@ -174,7 +174,7 @@ const getUtilityInfos = ({
174
174
  }
175
175
 
176
176
  if (!colorExists && !matchingUtility.variations) {
177
- log(`Unknow stuff -> ${[prefix, cleanedColor].join('-')}`);
177
+ // log(`Unknow stuff -> ${[prefix, cleanedColor].join('-')}`);
178
178
 
179
179
  return {
180
180
  matchingUtility,
@@ -328,7 +328,6 @@ const getColorInfos = (color: string) => {
328
328
  const colorExists = Object.keys(config.colors).some(
329
329
  configColor => configColor === baseColor
330
330
  );
331
- color === 'primary-10' && console.log({ colorExists, baseColor })
332
331
 
333
332
  return {
334
333
  colorExists,
@@ -1,5 +1,4 @@
1
- import packageJson from '../../../package.json';
2
- const { version } = packageJson;
1
+ import { version } from '../../version';
3
2
 
4
3
  const header = `/**
5
4
  * Anubis v.${version}
package/tsconfig.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "outDir": "./dist",
4
+ "rootDir": "./src",
4
5
  "declaration": true,
5
6
  "module": "commonjs",
6
7
  "target": "es2019",
@@ -16,6 +17,6 @@
16
17
  "@validation/*": ["./tools/validation/*"]
17
18
  }
18
19
  },
19
- "include": ["src/**/*", "package.json"],
20
+ "include": ["src/**/*"],
20
21
  "exclude": ["node_modules", "dist"]
21
22
  }