@atb-as/generate-assets 5.1.0-alpha.2 → 5.1.0-alpha.3
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/files/common/mono/ticketing/Receipt.svg +3 -0
- package/lib/bin.js +0 -0
- package/package.json +2 -2
- package/lib/list-files.d.ts +0 -9
- package/lib/list-files.js +0 -36
- package/lib/list-files.js.map +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4807 6.18946L30 5.89272V34.1073L29.4807 33.8105C27.9435 32.9322 26.0565 32.9322 24.5193 33.8105L23.5 34.393L22.4807 33.8105C20.9435 32.9322 19.0565 32.9322 17.5193 33.8105L16.5 34.393L15.4807 33.8105C13.9435 32.9322 12.0565 32.9322 10.5193 33.8105L10 34.1073V5.89272L10.5193 6.18946C12.0565 7.06784 13.9435 7.06784 15.4807 6.18946L16.5 5.607L17.5193 6.18946C19.0565 7.06784 20.9435 7.06784 22.4807 6.18946L23.5 5.607L24.5193 6.18946C26.0565 7.06784 27.9435 7.06784 29.4807 6.18946ZM6 2C6 1.44772 6.44772 1 7 1H9.23444C9.40846 1 9.57948 1.04542 9.73057 1.13176L12.5039 2.71649C12.8113 2.89217 13.1887 2.89217 13.4961 2.71649L16.0039 1.28351C16.3113 1.10783 16.6887 1.10783 16.9961 1.28351L19.5039 2.71649C19.8113 2.89217 20.1887 2.89217 20.4961 2.71649L23.0039 1.28351C23.3113 1.10783 23.6887 1.10783 23.9961 1.28351L26.5039 2.71649C26.8113 2.89217 27.1887 2.89217 27.4961 2.71649L30.2694 1.13176C30.4205 1.04542 30.5915 1 30.7656 1H33C33.5523 1 34 1.44772 34 2V38C34 38.5523 33.5523 39 33 39H30.7656C30.5915 39 30.4205 38.9546 30.2694 38.8682L27.4961 37.2835C27.1887 37.1078 26.8113 37.1078 26.5039 37.2835L23.9961 38.7165C23.6887 38.8922 23.3113 38.8922 23.0039 38.7165L20.4961 37.2835C20.1887 37.1078 19.8113 37.1078 19.5039 37.2835L16.9961 38.7165C16.6887 38.8922 16.3113 38.8922 16.0039 38.7165L13.4961 37.2835C13.1887 37.1078 12.8113 37.1078 12.5039 37.2835L9.73057 38.8682C9.57948 38.9546 9.40846 39 9.23444 39H7C6.44772 39 6 38.5523 6 38V2ZM16 11C14.8954 11 14 11.8954 14 13C14 14.1046 14.8954 15 16 15H24C25.1046 15 26 14.1046 26 13C26 11.8954 25.1046 11 24 11H16ZM14 19C14 17.8954 14.8954 17 16 17H24C25.1046 17 26 17.8954 26 19C26 20.1046 25.1046 21 24 21H16C14.8954 21 14 20.1046 14 19ZM16 23C14.8954 23 14 23.8954 14 25C14 26.1046 14.8954 27 16 27H20C21.1046 27 22 26.1046 22 25C22 23.8954 21.1046 23 20 23H16Z" fill="black"/>
|
|
3
|
+
</svg>
|
package/lib/bin.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atb-as/generate-assets",
|
|
3
|
-
"version": "5.1.0-alpha.
|
|
3
|
+
"version": "5.1.0-alpha.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "OOS Design System generate-assets",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"normalize-path": "^3.0.0",
|
|
35
35
|
"stream-editor": "^1.11.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "1c58d7c2b6bbbd10da2009a7d1a3a0f6dc601145"
|
|
38
38
|
}
|
package/lib/list-files.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ThemeVariant } from '@atb-as/theme/lib/';
|
|
2
|
-
import { AssetTypes } from './utils';
|
|
3
|
-
export declare const vaildOrgIds: ThemeVariant[];
|
|
4
|
-
export declare const searchGlob = "**/*.{svg,png,jpg,jpeg,ico}";
|
|
5
|
-
declare type Options = {
|
|
6
|
-
patterns?: string | readonly string[];
|
|
7
|
-
};
|
|
8
|
-
export declare function listAssets(orgId: ThemeVariant, assetType?: AssetTypes, opts?: Options): Promise<Promise<string>[]>;
|
|
9
|
-
export {};
|
package/lib/list-files.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.listAssets = exports.searchGlob = exports.vaildOrgIds = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const lib_1 = require("@atb-as/theme/lib/");
|
|
9
|
-
const micromatch_1 = __importDefault(require("micromatch"));
|
|
10
|
-
const utils_1 = require("./utils");
|
|
11
|
-
exports.vaildOrgIds = [lib_1.ThemeVariant.AtB, lib_1.ThemeVariant.Nfk];
|
|
12
|
-
exports.searchGlob = '**/*.{svg,png,jpg,jpeg,ico}';
|
|
13
|
-
const defaultOpts = {};
|
|
14
|
-
async function listAssets(orgId, assetType = 'all', opts = defaultOpts) {
|
|
15
|
-
const assetDir = assetType == 'all' ? '{colors,mono}' : assetType;
|
|
16
|
-
const fromBase = (...p) => {
|
|
17
|
-
const fullPath = path_1.default.join(__dirname, '..', 'files', ...p, assetDir, exports.searchGlob);
|
|
18
|
-
console.log(fullPath);
|
|
19
|
-
return (0, utils_1.fgNormalizedForUnix)(fullPath);
|
|
20
|
-
};
|
|
21
|
-
if (!exports.vaildOrgIds.includes(orgId))
|
|
22
|
-
throw new Error(`Invalid orgId provided, valid orgIds are ${exports.vaildOrgIds}`);
|
|
23
|
-
// File paths are returned as UNIX type separators.
|
|
24
|
-
const commonFiles = await fromBase('common');
|
|
25
|
-
const orgFiles = await fromBase((0, utils_1.themeVariantAsString)(orgId));
|
|
26
|
-
const allFilesToBeCopied = (0, utils_1.mergeFiles)(assetType, commonFiles, orgFiles);
|
|
27
|
-
const potentiallyFiltered = opts.patterns
|
|
28
|
-
? (0, micromatch_1.default)(allFilesToBeCopied, opts.patterns)
|
|
29
|
-
: allFilesToBeCopied;
|
|
30
|
-
let allFiles = potentiallyFiltered.map(async (absolutePath) => {
|
|
31
|
-
return path_1.default.normalize((0, utils_1.getGeneralNameWithoutFullPath)(assetType, absolutePath));
|
|
32
|
-
});
|
|
33
|
-
return allFiles;
|
|
34
|
-
}
|
|
35
|
-
exports.listAssets = listAssets;
|
|
36
|
-
//# sourceMappingURL=list-files.js.map
|
package/lib/list-files.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-files.js","sourceRoot":"","sources":["../src/list-files.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,4CAAgD;AAEhD,4DAAoC;AAEpC,mCAMiB;AAEJ,QAAA,WAAW,GAAG,CAAC,kBAAY,CAAC,GAAG,EAAE,kBAAY,CAAC,GAAG,CAAC,CAAC;AACnD,QAAA,UAAU,GAAG,6BAA6B,CAAC;AAKxD,MAAM,WAAW,GAAY,EAAE,CAAC;AAEzB,KAAK,UAAU,UAAU,CAC9B,KAAmB,EACnB,YAAwB,KAAK,EAC7B,OAAgB,WAAW;IAE3B,MAAM,QAAQ,GAAG,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;IAClE,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAW,EAAE,EAAE;QAClC,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CACxB,SAAS,EACT,IAAI,EACJ,OAAO,EACP,GAAG,CAAC,EACJ,QAAQ,EACR,kBAAU,CACX,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAEtB,OAAO,IAAA,2BAAmB,EAA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