Skip to content

Commit

Permalink
fix(design tokens properties ): vivid properties path reference
Browse files Browse the repository at this point in the history
  • Loading branch information
yinonov committed Sep 24, 2020
1 parent b5c14cb commit 60ac4ef
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
3 changes: 2 additions & 1 deletion common/design-tokens/package.json
Expand Up @@ -28,6 +28,7 @@
"devDependencies": {
"lodash": "^4.17.20",
"ramda": "^0.27.1",
"style-dictionary": "^2.10.1"
"style-dictionary": "^2.10.1",
"@vonage/vvd-design-tokens-properties": "^0.1.7"
}
}
12 changes: 5 additions & 7 deletions common/design-tokens/src/render-schemes.js
@@ -1,15 +1,13 @@
import { dirname } from 'path';
import { fileURLToPath } from 'url';
import { resolve } from 'path';

import StyleDictionaryPackage from 'style-dictionary';
import fs from 'fs';
import _ from 'lodash';
import R from 'ramda';

const __dirname = dirname(fileURLToPath(import.meta.url));

const propertiesPath = `/node_modules/@vonage/vvd-design-tokens-properties`;

const propertiesPath = resolve('../../node_modules/@vonage/vvd-design-tokens-properties');
console.log(propertiesPath);
// StyleDictionaryPackage.registerFilter({
// name: "filter-alias",
// matcher: function (prop) {
Expand All @@ -21,7 +19,7 @@ const propertiesPath = `/node_modules/@vonage/vvd-design-tokens-properties`;
StyleDictionaryPackage.registerFormat({
name: 'custom/format/scss',
formatter: _.template(
fs.readFileSync(__dirname + '/../templates/web-scss.template')
fs.readFileSync(resolve('templates/web-scss.template'))
),
});

Expand All @@ -40,7 +38,7 @@ function getStyleDictionaryConfig(scheme, scope) {
web: {
prefix: 'vvd',
transformGroup: 'css', // 'web'
buildPath: `${__dirname}/../build/scss/`,
buildPath: `${resolve('build/scss')}/`,
files: [
{
destination: `schemes/${scheme}/${scope}.scss`,
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -66,7 +66,6 @@
"@storybook/web-components": "^6.0.13",
"@typescript-eslint/eslint-plugin": "^3.10.1",
"@typescript-eslint/parser": "^3.10.1",
"@vonage/vivid-design-tokens-properties": "^0.1.5",
"@webcomponents/webcomponentsjs": "^2.4.3",
"babel-loader": "^8.1.0",
"chai": "^4.2.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -4697,10 +4697,10 @@
dependencies:
eslint-visitor-keys "^1.1.0"

"@vonage/vivid-design-tokens-properties@^0.1.5":
version "0.1.5"
resolved "https://vonagecc.jfrog.io/vonagecc/api/npm/npm/download/@vonage/vivid-design-tokens-properties/0.1.5/0d6f294451bba39c76559da28f4f54b22d0c802de44c1d8cf21829fc7b0636b1#1a398e7c093fc0271cfec73d396159511b0b58b5"
integrity sha1-GjmOfAk/wCcc/sc9OWFZURsLWLU=
"@vonage/vvd-design-tokens-properties@^0.1.7":
version "0.1.7"
resolved "https://npm.pkg.github.com/download/@vonage/vvd-design-tokens-properties/0.1.7/2be5fa99695d7af301f886a765eac3669e2f19725d4ae09460eff2a0d7ac26f9#abeca0b21f0f429e00ea48cffb2818f40c6ecdae"
integrity sha512-xQWKktOr2dRzeXqraMp3seMiBI0gVfdf5aROYHW2UH4ctBYwX2iUP00FUj9mWUq66UOau83yc2IRmBCCFLPlOg==

"@webassemblyjs/ast@1.9.0":
version "1.9.0"
Expand Down

0 comments on commit 60ac4ef

Please sign in to comment.