diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b6708b8b5..544c5dacf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,6 +24,11 @@ We are always happy to receive code and documentation contributions to the frame 3. Adding to the included transforms, transformGroups, and formats, please read [this section](#what-should-be-included). +## Package Manager and dependencies + +We use npm as our package manager. After downloading the repo, please use the command "npm ci" to ensure you use the package-lock dependency tree. Note that you need NPM 5.7.0 or higher to use this command. + + ## Code Style We use ESLint on the code to ensure a consistent style. Any new code committed must pass our ESLint tests. Take a look at our [ESLint file][eslint]. @@ -49,7 +54,7 @@ We separate each function/method into its own file and group them into directori ## Testing -Any new features should implement the proper unit tests. We use mocha and chai to test our framework. +Any new features should implement the proper unit tests. We use Jest to test our framework. If you are adding a new transform, action, or format: please add new unit tests. You can see examples in test/formats. diff --git a/__tests__/formats/__snapshots__/all.test.js.snap b/__tests__/formats/__snapshots__/all.test.js.snap index 44e2328bf..de6b8e471 100644 --- a/__tests__/formats/__snapshots__/all.test.js.snap +++ b/__tests__/formats/__snapshots__/all.test.js.snap @@ -8,7 +8,7 @@ exports[`formats all should return android/colors as a string 1`] = ` Generated on Sat, 01 Jan 2000 00:00:00 GMT --> - #FF0000 + #FF0000 " @@ -78,7 +78,7 @@ exports[`formats all should return css/variables as a string 1`] = ` */ :root { - --color_red: #FF0000; + --color_red: #FF0000; /* comment */ } " `; @@ -181,7 +181,7 @@ exports[`formats all should return ios/plist as a string 1`] = ` a 1 - + " @@ -357,7 +357,7 @@ exports[`formats all should return javascript/es6 as a string 1`] = ` * Generated on Sat, 01 Jan 2000 00:00:00 GMT */ -export const color_red = \\"#FF0000\\";" +export const color_red = \\"#FF0000\\"; // comment" `; exports[`formats all should return javascript/module as a string 1`] = ` @@ -374,6 +374,7 @@ module.exports = { \\"value\\": \\"#FF0000\\" }, \\"name\\": \\"color_red\\", + \\"comment\\": \\"comment\\", \\"attributes\\": { \\"category\\": \\"color\\", \\"type\\": \\"red\\" @@ -401,6 +402,7 @@ var _styleDictionary = { \\"value\\": \\"#FF0000\\" }, \\"name\\": \\"color_red\\", + \\"comment\\": \\"comment\\", \\"attributes\\": { \\"category\\": \\"color\\", \\"type\\": \\"red\\" @@ -439,6 +441,7 @@ exports[`formats all should return javascript/umd as a string 1`] = ` \\"value\\": \\"#FF0000\\" }, \\"name\\": \\"color_red\\", + \\"comment\\": \\"comment\\", \\"attributes\\": { \\"category\\": \\"color\\", \\"type\\": \\"red\\" @@ -463,6 +466,7 @@ exports[`formats all should return json as a string 1`] = ` \\"value\\": \\"#FF0000\\" }, \\"name\\": \\"color_red\\", + \\"comment\\": \\"comment\\", \\"attributes\\": { \\"category\\": \\"color\\", \\"type\\": \\"red\\" @@ -478,6 +482,12 @@ exports[`formats all should return json as a string 1`] = ` exports[`formats all should return json/asset as a string 1`] = `"{}"`; +exports[`formats all should return json/flat as a string 1`] = ` +"{ + \\"color_red\\": \\"#FF0000\\" +}" +`; + exports[`formats all should return json/nested as a string 1`] = ` "{ \\"color\\": { @@ -501,7 +511,38 @@ exports[`formats all should return less/variables as a string 1`] = ` * Generated on Sat, 01 Jan 2000 00:00:00 GMT */ -@color_red: #FF0000;" +@color_red: #FF0000; /* comment */" +`; + +exports[`formats all should return sass/map-deep as a string 1`] = ` +" +/* + Do not edit directly + Generated on Sat, 01 Jan 2000 00:00:00 GMT +*/ + +$color_red: #FF0000 !default; // comment + +$tokens: ( + 'color': ( + 'red': $color_red + ) +); +" +`; + +exports[`formats all should return sass/map-flat as a string 1`] = ` +" +/* + Do not edit directly + Generated on Sat, 01 Jan 2000 00:00:00 GMT +*/ + +$tokens: ( + // comment + 'color_red': #FF0000 +); +" `; exports[`formats all should return scss/icons as a string 1`] = ` @@ -519,7 +560,7 @@ exports[`formats all should return scss/variables as a string 1`] = ` * Generated on Sat, 01 Jan 2000 00:00:00 GMT */ -$color_red: #FF0000;" +$color_red: #FF0000; /* comment */" `; exports[`formats all should return sketch/palette as a string 1`] = ` diff --git a/__tests__/formats/__snapshots__/scssMaps.test.js.snap b/__tests__/formats/__snapshots__/scssMaps.test.js.snap new file mode 100644 index 000000000..af61b5e61 --- /dev/null +++ b/__tests__/formats/__snapshots__/scssMaps.test.js.snap @@ -0,0 +1,47 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`formats sass/map-deep sass/map-deep snapshot 1`] = ` +" +/* + Do not edit directly + Generated on Sat, 01 Jan 2000 00:00:00 GMT +*/ + +$size-font-small: 12rem !default; +$size-font-large: 18rem !default; +$color-base-red: #ff0000 !default; // comment +$color-white: #ffffff !default; + +$tokens: ( + 'size': ( + 'font': ( + 'small': $size-font-small, + 'large': $size-font-large + ) + ), + 'color': ( + 'base': ( + 'red': $color-base-red + ), + 'white': $color-white + ) +); +" +`; + +exports[`formats sass/map-flat sass/map-flat snapshot 1`] = ` +" +/* + Do not edit directly + Generated on Sat, 01 Jan 2000 00:00:00 GMT +*/ + +$tokens: ( + 'size-font-small': 12rem, + 'size-font-large': 18rem, + // comment + 'color-base-red': #ff0000, + 'color-white': #ffffff +); +" +`; diff --git a/__tests__/formats/all.test.js b/__tests__/formats/all.test.js index 8958587cc..07d28f179 100644 --- a/__tests__/formats/all.test.js +++ b/__tests__/formats/all.test.js @@ -30,6 +30,7 @@ var dictionary = { value: '#FF0000', original: { value: '#FF0000' }, name: 'color_red', + comment: 'comment', attributes: { category: 'color', type: 'red', @@ -45,6 +46,7 @@ var dictionary = { value: '#FF0000', original: { value: '#FF0000' }, name: 'color_red', + comment: 'comment', attributes: { category: 'color', type: 'red', diff --git a/__tests__/formats/jsonFlat.test.js b/__tests__/formats/jsonFlat.test.js new file mode 100644 index 000000000..2bf19a0e6 --- /dev/null +++ b/__tests__/formats/jsonFlat.test.js @@ -0,0 +1,63 @@ +/* + * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with + * the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions + * and limitations under the License. + */ + +var formats = require('../../lib/common/formats'); +var fs = require('fs-extra'); +var helpers = require('../__helpers'); + +var file = { + "destination": "__output/", + "format": "json/flat" +}; + +var dictionary = { + "allProperties": [{ + "name": "color-base-red", + "value": "#EF5350", + "original": { + "value": "#EF5350" + }, + "attributes": { + "category": "color", + "type": "base", + "item": "red" + }, + "path": [ + "color", + "base", + "red" + ] + }] +}; + +var formatter = formats['json/flat'].bind(file); + +describe('formats', () => { + describe('json/flat', () => { + + beforeEach(() => { + helpers.clearOutput(); + }); + + afterEach(() => { + helpers.clearOutput(); + }); + + it('should be a valid JSON file', () => { + fs.writeFileSync('./__tests__/__output/output.flat.json', formatter(dictionary) ); + var test = require('../__output/output.flat.json'); + expect(test['color-base-red']).toEqual(dictionary.allProperties[0].value); + }); + }); + +}); diff --git a/__tests__/formats/scssMaps.test.js b/__tests__/formats/scssMaps.test.js new file mode 100644 index 000000000..684ca8d6a --- /dev/null +++ b/__tests__/formats/scssMaps.test.js @@ -0,0 +1,213 @@ +/* + * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with + * the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions + * and limitations under the License. + */ + +var formats = require('../../lib/common/formats'); +var scss = require('node-sass'); +var _ = require('lodash'); + +var dictionary = { + "properties": { + "size": { + "font": { + "small": { + "value": "12rem", + "original": { + "value": "12px" + }, + "name": "size-font-small", + "attributes": { + "category": "size", + "type": "font", + "item": "small" + }, + "path": [ + "size", + "font", + "small" + ] + }, + "large": { + "value": "18rem", + "original": { + "value": "18px" + }, + "name": "size-font-large", + "attributes": { + "category": "size", + "type": "font", + "item": "large" + }, + "path": [ + "size", + "font", + "large" + ] + } + } + }, + "color": { + "base": { + "red": { + "value": "#ff0000", + "comment": "comment", + "original": { + "value": "#FF0000", + "comment": "comment" + }, + "name": "color-base-red", + "attributes": { + "category": "color", + "type": "base", + "item": "red" + }, + "path": [ + "color", + "base", + "red" + ] + } + }, + "white": { + "value": "#ffffff", + "original": { + "value": "#ffffff" + }, + "name": "color-white", + "attributes": { + "category": "color", + "type": "white" + }, + "path": [ + "color", + "white" + ] + } + } + }, + "allProperties": [ + { + "value": "12rem", + "original": { + "value": "12px" + }, + "name": "size-font-small", + "attributes": { + "category": "size", + "type": "font", + "item": "small" + }, + "path": [ + "size", + "font", + "small" + ] + }, + { + "value": "18rem", + "original": { + "value": "18px" + }, + "name": "size-font-large", + "attributes": { + "category": "size", + "type": "font", + "item": "large" + }, + "path": [ + "size", + "font", + "large" + ] + }, + { + "value": "#ff0000", + "comment": "comment", + "original": { + "value": "#FF0000", + "comment": "comment" + }, + "name": "color-base-red", + "attributes": { + "category": "color", + "type": "base", + "item": "red" + }, + "path": [ + "color", + "base", + "red" + ] + }, + { + "value": "#ffffff", + "original": { + "value": "#ffffff" + }, + "name": "color-white", + "attributes": { + "category": "color", + "type": "white" + }, + "path": [ + "color", + "white" + ] + } + ] +}; + +describe('formats', () => { + _.each(['sass/map-flat', 'sass/map-deep'], function(key) { + + describe(key, () => { + + var file = { + "destination": "__output/", + "format": key + }; + + // mock the Date.now() call to a fixed value + const constantDate = new Date('2000-01-01'); + const globalDate = global.Date; + global.Date = function() { return constantDate }; + + var formatter = formats[key].bind(file); + var output = formatter(dictionary, file); + + // reset the global Date object (or node-sass will complain!) + global.Date = globalDate; + + it('should return ' + key + ' as a string', () => { + expect(typeof output).toBe('string'); + }); + + it('should have a valid scss syntax', done => { + scss.render({ + data: output, + }, function(err, result) { + if(err) { + return done(new Error(err)); + } + expect(result.css).toBeDefined(); + return done(); + }); + }); + + it(key + ' snapshot', () => { + expect(output).toMatchSnapshot(); + }); + + }); + + }); +}); diff --git a/bin/style-dictionary b/bin/style-dictionary index 128e27eae..27a1a7b97 100755 --- a/bin/style-dictionary +++ b/bin/style-dictionary @@ -29,7 +29,7 @@ program program .command('clean') - .description('Removes files specificed in the config of the style dictionary package of the current directory.') + .description('Removes files specified in the config of the style dictionary package of the current directory.') .option('-c, --config ', 'set config path. defaults to ./config.json') .option('-p, --platform [platform]', 'only clean specific platform(s). Must be defined in the config', collect, []) .action(styleDictionaryClean); @@ -38,7 +38,7 @@ program .command('init ') .description('Generates a starter style dictionary') .action(function(type){ - var types = ['s3', 'npm', 'complete', 'basic']; + var types = ['basic', 'complete']; if (types.indexOf(type) < 0) { console.error('Please supply 1 type of project from: ' + types.join(', ')); process.exit(1); diff --git a/docs/README.md b/docs/README.md index a22ff11ff..a61e9d902 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,102 +8,37 @@ # Style Dictionary > *Style once, use everywhere.* -A Style Dictionary is a system that allows you to define styles once, in a way for any platform or language to consume. A single place to create and edit your styles, and a single command exports these rules to all the places you need them - iOS, Android, CSS, JS, HTML, sketch files, style documentation, etc. It is available as a CLI through npm, but can also be used like any normal node module if you want to extend its functionality. +A Style Dictionary is a system that allows you to define styles once, in a way for any platform or language to consume. A single place to create and edit your styles, and a single command exports these rules to all the places you need them - iOS, Android, CSS, JS, HTML, sketch files, style documentation, etc. It is available as a [CLI](using_the_cli.md) through npm, but can also be used like any normal [npm module](using_the_npm_module.md) if you want to [extend](extending.md) its functionality. When you are managing user experiences, it can be quite challenging to keep styles consistent and synchronized across multiple development platforms and devices. At the same time, designers, developers, PMs and others must be able to have consistent and up-to-date style documentation to enable effective work and communication. Even then, mistakes inevitably happen and the design may not be implemented accurately. StyleDictionary solves this by automatically generating style definitions across all platforms from a single source - removing roadblocks, errors, and inefficiencies across your workflow. ## Watch the Demo on Youtube [![Watch the video](assets/fake_player.png)](http://youtu.be/1HREvonfqhY) -## The basics +## Examples +[See examples of Style Dictionary here](examples.md) + +## The Basics __A style dictionary consists of:__ -1. [Style properties](#style-properties) organized in JSON files -1. Static assets that can be used across platforms +1. [Style properties](properties.md), organized in JSON files +1. Static assets (e.g. fonts, icons, images, sounds, etc.), organized into folders +1. [Configuration](config.md), defining the transformation of the properties and assets for each output platform __What a style dictionary does:__ -1. Allows the style properties and assets to be consumed in any platform or language - -Let's take a look at a very basic example. - -```json -{ - "size": { - "font": { - "small" : { "value": "10px" }, - "medium": { "value": "16px" }, - "large" : { "value": "24px" }, - "base" : { "value": "{size.font.medium.value}" } - } - } -} -``` - -Here we are creating some basic font size properties. The style property `size.font.small` is "10px" for example. The style definition size.font.base.value is automatically aliased to the value found in size.font.medium.value, so both of those resolve to "16px". - -Now what the style dictionary build system will do with this information is convert it to different formats so that you can use these values in any type of codebase. From this one file you can generate any number of files like: - -```scss -$size-font-small: 10px; -$size-font-medium: 16px; -$size-font-large: 24px; -$size-font-base: 16px; -``` - -```xml -10sp -16sp -24sp -16sp -``` - -```objectivec -float const SizeFontSmall = 10.00f; -float const SizeFontMedium = 16.00f; -float const SizeFontLarge = 24.00f; -float const SizeFontBase = 16.00f; -``` - -This is a very simple example, take a deeper dive into the style dictionary framework in - -The style dictionary framework is completely extensible and modular so you can create any type of file from a style dictionary. -If there is a new language, platform, file type, you can extend the style dictionary framework to create the files you need. - -__Some other things you can build with a style dictionary__ +1. Transforms style properties and assets into platform specific deliverables +1. Creates human readable artifacts (e.g. documentation, design libraries, etc) + +__Things you can build with a style dictionary:__ +1. Styling files for any platform 1. Images and graphics 1. Sketch files -1. Documentation site -1. _Literally anything_ - - -## Style Properties - -> Synonyms: design token, design variable, design constant, atom - -A style property is a key/value data to describe any fundamental/atomic visual properties. This information is stored in a canonical -source, the style dictionary, and transformed for use in different platforms, languages, and contexts. A simple example is a color. -A color can be represented in many ways, all of these are the same color: `#ffffff`, `rgb(255,255,255)`, `hsl(0,0,1)`. - -A style dictionary organizes style properties in a structured way for easy access. Style properties are organized as a deep object -with the leaf nodes being the style properties. - -```json -{ - "color": { - "font": { - "base": { "value": "#111111" }, - "secondary": { "value": "#333333" }, - "tertiary": { "value": "#666666" }, - "inverse": { - "base": { "value": "#ffffff" } - } - } - } -} -``` - -In this example there are 4 style properties: `color.font.base`, `color.font.secondary`, `color.font.tertiary`, and `color.font.inverse.base`. -A style property is any object in the JSON that has a `value` attribute on it. In this way you can nest properties at different levels. -This allows you to easily access the property as well as do things like get all the inverse font colors. +1. Documentation website +1. _Literally anything you want styles or style data in_ + +**The value of using Style Dictionary to build all of these is that they are all consistent and up to date.** + +The Style Dictionary framework is fully extensible and modular so you can create any type of file from a style dictionary. +If there is a new language, platform, or file type you need, you can easily [extend](extending.md) the style dictionary framework to create the necessary files. ## Contributing diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 32a62fae1..0cac1f3b6 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -2,14 +2,19 @@ - [Overview](README.md) - [Quick Start](quick_start.md) - [Examples](examples.md) + - [Config](config.md) + - [Properties](properties.md) - [Package structure](package_structure.md) - [Extending](extending.md) - Reference + - [Architecture](architecture.md) + - [Build Process](build_process.md) + - [Using the CLI](using_the_cli.md) + - [Using the NPM Module](using_the_npm_module.md) - [API](api.md) - [Transforms](transforms.md) - [Transform groups](transform_groups.md) - [Formats](formats.md) - [Templates](templates.md) - [Actions](actions.md) - - [Build process](build_process.md) diff --git a/docs/actions.md b/docs/actions.md index 1fe90a010..7f8a0ec88 100644 --- a/docs/actions.md +++ b/docs/actions.md @@ -2,7 +2,7 @@ Actions provide a way to run custom build code such as generating binary assets like images. -Here are all the actions that come with the Style Dictionary build system. We try to include what most people might need. You can define custom actions with the [`registerAction`](api.md#registeraction). If you think we are missing some things, take a look at our [contributing docs](https://github.com/amzn/style-dictionary/blob/master/CONTRIBUTING.md) and send us a pull request! If you have a specific need for your project, you can always write your own [custom actions](#adding-custom-actions). +Here are all the actions that come with the Style Dictionary build system. We try to include what most people might need. If you think we are missing some things, take a look at our [contributing docs](https://github.com/amzn/style-dictionary/blob/master/CONTRIBUTING.md) and send us a pull request! If you have a specific need for your project, you can always create your own custom action with [`registerAction`](api.md?id=registeraction). You use actions in your config file under platforms > [platform] > actions @@ -26,7 +26,7 @@ You use actions in your config file under platforms > [platform] > actions [lib/common/actions.js](https://github.com/amzn/style-dictionary/blob/master/lib/common/actions.js) -### android/copyImages +### android/copyImages Action to copy images into appropriate android directories. @@ -34,11 +34,10 @@ Action to copy images into appropriate android directories. * * * -### copy_assets +### copy_assets Action that copies everything in the assets directory to a new assets directory in the build path of the platform. * * * - diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 000000000..8d35eb9db --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,37 @@ +# Architecture Overview + +This is how Style Dictionary works under the hood. + +![build structure](assets/build-diagram.png) + +Let's take a closer look into each of these steps. + +## 1. Parse the config + +Style Dictionary is a configuration based framework, you tell it what to do in a configuration file. Style Dictionary first parses this configuration to know what to do. + +## 2. Find all token files + +In your [config](config.md) file you define a `source`, which is an array of file paths. This tells Style Dictionary where to find your token files. You can have them anywhere and in any folder structure as long as you tell Style Dictionary where to find them. + +## 3. Deep merge token files + +Style Dictionary takes all the files it found and performs a deep merge. This allows you to split your token files in any way you like, without worrying about accidentally overriding groups of tokens. This gives Style Dictionary a single, complete token object to work from. + +## 4. Iterate over the platforms + +For each platform defined in your [config](config.md), Style Dictionary will do a few steps to get it ready to be consumed on that platform. Everything that happens in a platform is non-destructive so you don't need to worry about one platform affecting another. + +## 4a. Transform the tokens + +Style Dictionary now traverses over the whole token object and looks for design tokens. It does this by looking for anything with a `value` key. When it comes across a design token, it then performs all the [transforms](transforms.md) defined in your [config](config.md) in order. + +## 4b. Resolve aliases / references to other values + +After all the tokens have been transformed, it then does another pass over the token object looking for aliases, which look like `"{size.font.base.value}"`. When it finds these, it then replaces the reference with the transformed value. As we have a single complete token object, aliases can be in any token file and still work. + +## 4c. Format the tokens into files + +Now all the design tokens are ready to be written to a file. Style Dictionary takes the whole transformed and resolved token object and for each file defined in the platform it [formats](formats.md) the token object and write the output to a file. Internally, Style Dictionary creates a flat array of all the design tokens it finds in addition to the token object. This is how you can output a flat SCSS variables file. + +After Style Dictionary does steps 4-6 for each platform, now you have all your output files that are ready to consume in each platform and codebase. diff --git a/docs/assets/build-diagram.png b/docs/assets/build-diagram.png index 7400fc3f9..80dd14f17 100644 Binary files a/docs/assets/build-diagram.png and b/docs/assets/build-diagram.png differ diff --git a/docs/assets/property-definitions.png b/docs/assets/property-definitions.png new file mode 100644 index 000000000..e6b103656 Binary files /dev/null and b/docs/assets/property-definitions.png differ diff --git a/docs/build_process.md b/docs/build_process.md index b7b2e3fd5..95936a01d 100644 --- a/docs/build_process.md +++ b/docs/build_process.md @@ -4,39 +4,13 @@ Here is what the build system is doing under the hood. ![build structure](assets/build-diagram.png) -## CLI - -1. The build system looks for a config file. By default it looks for config.json in the current directory, or you can specify the config path with the `-c --config` flag. -1. If there is an `includes` attribute in the config, it will take those JSON files and deep merge them into the `properties` object. -1. It then takes all the JSON files in the `source` attribute in the config and performs a deep merge onto the `properties` object. +1. The build system reads in a configuration +1. If there is an `includes` attribute in the config, it will take those files and deep merge them into the `properties` object +1. It takes all the JSON files in the `source` attribute in the config and performs a deep merge onto the `properties` object 1. Then it iterates over the platforms in the config and: - 1. Perform all transforms, in order, defined in the transforms attribute or transformGroup. - 1. Build all files defined in the files array - 1. Perform any actions defined in the actions attribute - - -## Node - -If you use this as a node module, the steps are slightly different, but the overall. - -1. When you call the [`extend`](api.md#extend) method, you can either pass it a path to a JSON or JS config file, or give it a plain object that has the configuration. This will perform steps 1-3 above. -1. Then you can now call `buildAllPlatforms` or other methods like `buildPlatform('scss')` or `exportPlatform('javascript')`. This is equivalent to step 4 above. - -```javascript -const StyleDictionary = require('style-dictionary'); - -const styleDictionary = StyleDictionary.extend( 'config.json' ); -// is equivalent to this: -// const styleDictionary = StyleDictionary.extend( -// JSON.parse( fs.readFileSync( 'config.json' ) ) -// ) - -// You can also extend with an object -// const styleDictionary = StyleDictionary.extend({ /* config options */ }); + 1. Performs all transforms, in order, defined in the transforms attribute or transformGroup + 1. Builds all files defined in the files array + 1. Performs any actions defined in the actions attribute -// This will perform step 3 above, for each platform: -// 1. Apply transforms -// 2. Build files -// 3. Perform actions -styleDictionary.buildAllPlatforms(); -``` +# How to Build +You can build a style dictionary [using the cli](using_the_cli.md) or [using the npm module](using_the_npm_module.md). diff --git a/docs/config.md b/docs/config.md new file mode 100644 index 000000000..659d52adb --- /dev/null +++ b/docs/config.md @@ -0,0 +1,51 @@ +# Configuration + +Style dictionaries are configuration driven. Your config file defines what executes and what to output when the style dictionary builds. + +By default, Style Dictionary looks for a `config.json` file in the root of your package. You can also specify a custom location when you use the [CLI](using_the_cli.md). If you want a custom build system using the [npm module](using_the_npm_module.md), you can specify a custom location for a configuration file or use a plain Javascript object. + +## config.json + Here is a quick example: +```json +{ + "source": ["properties/**/*.json"], + "platforms": { + "scss": { + "transformGroup": "scss", + "prefix": "sd", + "buildPath": "build/scss/", + "files": [{ + "destination": "_variables.scss", + "format": "scss/variables" + }], + "actions": ["copy_assets"] + }, + "android": { + "transforms": ["attribute/cti", "name/cti/snake", "color/hex", "size/remToSp", "size/remToDp"], + "buildPath": "build/android/src/main/res/values/", + "files": [{ + "destination": "style_dictionary_colors.xml", + "format": "android/colors" + }] + } + } +} +``` + +| Attribute | Type | Description | +| :--- | :--- | :--- | +| includes | Array[String] (optional) | An array of paths to Style Dictionary property files that contain default styles. The Style Dictionary uses this as a base collection of properties. The properties found using the "source" attribute will overwrite properties found using includes. | +| source | Array[String] | An array of paths to JSON files that contain style properties. The Style Dictionary will do a deep merge of all of the JSON files so you can separate your properties into multiple files. | +| platforms | Object | An object containing platform config objects that describe how the Style Dictionary should build for that platform. You can add any arbitrary attributes on this object that will get passed to formats and actions (more on these in a bit). This is useful for things like build paths, name prefixes, variable names, etc. | +| platform.transforms | Array[String] (optional) | An array of [transforms](transforms.md) to be performed on the style properties object. These will transform the properties in a non-destructive way so each platform can transform the properties. Transforms to apply sequentially to all properties. Can be a built-in one or you can create your own. | +| platform.transformGroup | String (optional) | A string that maps to an array of transforms. This makes it easier to reference transforms by grouping them together. You must either define this or `transforms`. | +| platform.buildPath | String (optional) | Base path to build the files, must end with a trailing slash. | +| platform.files | Array (optional) | Files to be generated for this platform. | +| platform.file.destination | String (optional) | Location to build the file, will be appended to the buildPath. | +| platform.file.format | String (optional) | [Format](formats.md) used to generate the file. Can be a built-in one or you can create your own. | +| platform.file.filter | Function/Object (optional) | A function or object used to filter the properties that will be included in the file. If a function is provided, each property will be passed to the function and the result (true or false) will determine whether the property is included. If an object is provided, each property will be matched against the object using a partial deep comparison. If a match is found, the property is included. | +| platform.file.options | Object (optional) | A set of extra options associated with the file. Only includes 'showFileHeader' at this time. | +| platform.file.options.showFileHeader | Boolean | If the generated file should have a "Do not edit + Timestamp" header (where the format supports it). By default is "true". | +| platform.actions | Array[String] (optional) | [Actions](actions.md) to be performed after the files are built for that platform. Actions can be any arbitrary code you want to run like copying files, generating assets, etc. You can use pre-defined actions or create custom actions. | + +---- diff --git a/docs/examples.md b/docs/examples.md index 3fc4b9728..5e66ade9b 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -1,39 +1,43 @@ # Examples -To get you started, there are some example packages included that you can use. You can take a look at the code on Github or you -can use the CLI included to generate a new package using these examples. Here is how you can do that: +To get you started, there are some example packages included that you can use. You can [take a look at the code on Github](https://github.com/amzn/style-dictionary/tree/master/example/) or you can use the CLI included to generate a new package using some of these examples. Here is how you can do that: + ```bash -$ mkdir MyStyleD -$ cd MyStyleD +$ mkdir MyFolder +$ cd MyFolder $ style-dictionary init [example] ``` -Where `[example]` is one of: `basic`, `complete`, `npm`, `s3` + +Where `[example]` is one of: `basic`, `complete`. ## Basic [View on Github](https://github.com/amzn/style-dictionary/tree/master/example/basic) -This example code is bare-bones to show you what this framework can do. Use this if you want to play around with what the Style Dictionary -can do. +This example code is bare-bones to show you what this framework can do. Use this if you want to play around with what the Style Dictionary can do. ## Complete [View on Github](https://github.com/amzn/style-dictionary/tree/master/example/complete) -This is a more complete package and should have everything you need to get started. This package can be consumed as a Cocoapod on iOS, -as a node module for web, and as a local library for Android. +This is a more complete package and should have everything you need to get started. This package can be consumed as a Cocoapod on iOS, as a node module for web, and as a local library for Android. -## npm -[View on Github](https://github.com/amzn/style-dictionary/tree/master/example/npm) +## Advanced +[View the folder](https://github.com/amzn/style-dictionary/tree/master/example/advanced) -This example shows how to set up a style dictionary as an npm module, either to publish to a local npm service or to publish externally. +If you want to look at more advanced examples of possible applications and customisations of Style Dictionary, the `examples/advanced` folder on GitHub contains these extra folders: -When you publish this npm module, the prepublish hook will run, calling the style dictionary build system to create the necessary files. You can also just run `npm run build` to generate the files to see what it is creating. +* [**assets-base64-embed**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/assets-base64-embed) shows how it's possible to embed and distribute assets – like images, icons and fonts – directly as design tokens. +* [**auto-rebuild-watcher**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/auto-rebuild-watcher) shows how to setup a "watcher" that auto-rebuilds the tokens every time there is a change in the properties. +* [**custom-templates**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/custom-templates/custom-templates) shows how to use "custom" templates to generate design tokens files with custom formats, useful when you need to distribute your design tokens and integrate them with custom pipelines or scripts. +* [**custom-transforms**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/custom-templates/custom-transforms) shows how to use custom tranforms (and transformGroups) to apply custom "tranformations" to the properties when converted to design tokens. +* [**multi-brand-multi-platform**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/multi-brand-multi-platform) shows how to set up Style Dictionary to support a multi-brand (for brand theming) and multi-platform (web, iOS, Android) solution, with property values depending on brand and plaforms. +* [**npm-module**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/npm-module) shows how to set up a style dictionary as an npm module, either to publish to a local npm service or to publish externally. +* [**s3**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/s3) shows how to set up a style dictionary to build files for different platforms (web, iOS, Android) and upload those build artifacts, together with a group of assets, to an S3 bucket. +* [**referencing_aliasing**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/referencing_aliasing) shows how to use referencing (or "aliasing") to reference a value -or an attribute– of a property and assign it to the value –or attribute– of another property. -## s3 -[View on Github](https://github.com/amzn/style-dictionary/tree/master/example/s3) -One way to use the style dictionary framework is to build files for each platform and upload those build artifacts to an s3 bucket. The platforms can pull these files down during their build process. +--- ----- +#### Do you think an example is missing?
Do you want to see another example added to the project?
Do you have a working example that we can add to the list? -> More coming soon... +Fantastic! Let us know by [filing an issue](https://github.com/amzn/style-dictionary/issues) or sending us an email: style-dictionary@amazon.com. diff --git a/docs/extending.md b/docs/extending.md index e3ed1904e..d0d8e9e5c 100644 --- a/docs/extending.md +++ b/docs/extending.md @@ -1,13 +1,17 @@ # Extending -The style dictionary build system is made to be extended. We don't know exactly how everyone will want to use style dictionaries in their project, which is why it is easy to create custom transforms and formats. +The style dictionary build system is easily extended. We don't know exactly how everyone will want to use style dictionaries in their project, which is why we made it easy to create custom transforms and formats. +## Extension Functions in the API * [registerTransform](api.md#registertransform) * [registerTransformGroup](api.md#registertransformgroup) * [registerFormat](api.md#registerformat) * [registerTemplate](api.md#registertemplate) * [registerAction](api.md#registeraction) +## Extension Examples +Importing a configuration, defining a new `time/seconds` transform, and building the style dictionary. + ```javascript const StyleDictionary = require('style-dictionary').extend('config.json'); @@ -25,7 +29,8 @@ StyleDictionary.registerTransform({ StyleDictionary.buildAllPlatforms(); ``` -You can also export your extended style dictionary as a node module if you need other projects to depend on it. + +Export your extended style dictionary as a node module (without building) if you need other projects to depend on it. ```javascript // package a diff --git a/docs/formats.md b/docs/formats.md index 7d5233e30..b2d109e26 100644 --- a/docs/formats.md +++ b/docs/formats.md @@ -6,7 +6,7 @@ your style dictionary. ### Using formats -You use formats in your config file under platforms > [platform] > files > [file] +You use formats in your config file under platforms > [platform] > files > [file] > format ```json { @@ -28,7 +28,7 @@ You use formats in your config file under platforms > [platform] > files > [file There is an extensive (but not exhaustive) list of [included formats](#pre-defined-formats) available in Style Dictionary. -### Creating Formats +### Creating formats You can create custom formats using the [`registerFormat`](api.md#registerformat) function. @@ -102,6 +102,43 @@ Creates a CSS file with variable definitions based on the style dictionary * * * +### sass/map-flat + + +Creates a Sass file with a flat map based on the style dictionary + +**Example** +```scss +$tokens: ( + $color-background-base: #f0f0f0; + $color-background-alt: #eeeeee; +) +``` + +* * * + +### sass/map-deep + + +Creates a Sass file with a deep map based on the style dictionary + +**Example** +```scss +$color-background-base: #f0f0f0 !default; +$color-background-alt: #eeeeee !default; + +$tokens: { + 'color': ( + 'background': ( + 'base': $color-background-base, + 'alt': $color-background-alt + ) + ) +) +``` + +* * * + ### scss/variables @@ -541,6 +578,20 @@ Creates a JSON nested file of the style dictionary. * * * +### json/flat + + +Creates a JSON flat file of the style dictionary. + +**Example** +```json +{ + "color-base-red": "#ff000" +} +``` + +* * * + ### sketch/palette @@ -560,5 +611,3 @@ Creates a sketchpalette file of all the base colors ``` * * * - - diff --git a/docs/package_structure.md b/docs/package_structure.md index 95babcf1d..e84f69c91 100644 --- a/docs/package_structure.md +++ b/docs/package_structure.md @@ -1,6 +1,6 @@ # Package Structure -Style dictionaries are configuration driven. +Style dictionaries are configuration driven. A style dictionary package must contain a configuration and reference a path to property files. You can optionally include assets in your package. Here is a basic example of what a style dictionary package looks like. @@ -18,123 +18,12 @@ Here is a basic example of what a style dictionary package looks like. ``` -## config.json -The default way is to use a config.json file in the root of your package. Here is a quick example: -```json -{ - "source": ["properties/**/*.json"], - "platforms": { - "scss": { - "transformGroup": "scss", - "prefix": "sd", - "buildPath": "build/scss/", - "files": [{ - "destination": "_variables.scss", - "format": "scss/variables" - }], - "actions": ["copy_assets"] - }, - "android": { - "transforms": ["attribute/cti", "name/cti/snake", "color/hex", "size/remToSp", "size/remToDp"], - "buildPath": "build/android/src/main/res/values/", - "files": [{ - "filter": { "category": "color" }, - "destination": "style_dictionary_colors.xml", - "format": "android/colors" - }] - } - } -} -``` - -| Attribute | Type | Description | -| :--- | :--- | :--- | -| source | Array[String] | An array of paths to JSON files that contain style properties. The Style Dictionary will do a deep merge of all of the JSON files so you can separate your properties into multiple files. | -| platforms | Object | An object containing platform config objects that describe how the Style Dictionary should build for that platform. You can add any arbitrary attributes on this object that will get passed to formats and actions (more on these in a bit). This is useful for things like build paths, name prefixes, variable names, etc. | -| platform.transforms | Array[String] (optional) | An array of [transforms](transforms.md) to be performed on the style properties object. These will transform the properties in a non-desctructive way so each platform can transform the properties. Transforms to apply sequentially to all properties. Can be a built-in one or you can create your own. | -| platform.transformGroup | String (optional) | A string that maps to an array of transforms. This makes it easier to reference transforms by grouping them together. You must either define this or `transforms`. | -| platform.buildPath | String (optional) | Base path to build the files, must end with a trailing slash. | -| platform.files | Array (optional) | Files to be generated for this platform. | -| platform.file.destination | String (optional) | Location to build the file, will be appended to the buildPath. | -| platform.file.format | String (optional) | [Format](formats.md) used to generate the file. Can be a built-in one or you can create your own. | -| platform.file.filter | Function/Object (optional) | A function or object used to filter the properties that will be included in the file. If a function is provided, each property will be passed to the function and the result (true or false) will determine whether the property is included. If an object is provided, each property will be matched against the object using a partial deep comparison to determine whether the property is included. | -| platform.file.options | Object (optional) | A set of extra options associated with the file. | -| platform.file.options.showFileHeader | Boolean | If the generated file should have a "Do not edit + Timestamp" header (where the format supports it). By default is "true". | -| platform.actions | Array[String] (optional) | [Actions](actions.md) to be performed after the files are built for that platform. Actions can be any arbitrary code you want to run like copying files, generating assets, etc. You can use pre-defined actions or create custom actions. | - ----- - -## Properties - -Style properties are a collection of JSON files. We usually keep them in a `properties` directory, but you can put them wherever you like, -they just need to be referenced in the `source` attribute on your `config.json` file. - -Style properties are what make up a style dictionary. You can structure your properties however you want to, the only requirement is the property contains a "value" attribute. This is how the build system knows which nodes are properties as opposed to structure. This allows you to have different levels of nesting. - -```json -{ - "color": { - "font": { - "base": { "value": "#111111" }, - "inverse": { - "base": { "value": "#EEEEEE" } - } - } - } -} -``` - -The above JSON snippet has 2 style properties, `color.font.base` and `color.font.inverse.base`. So you can have style properties defined at any level in the JSON structure. - -#### Category / Type / Item - -This is not required by any means, but we feel this classification structure of style properties makes the most sense semantically. Style properties can be organized into a hierarchical tree structure with the top level, category, defining the primitive nature of the property. For example, we have the color category and every property underneath is always a color. As you proceed down the tree, you get more specific about what that color is. Is it a background color, a text color, or a border color? What kind of text color is it? You get the point. It's like the animal kingdom classification: - -![](assets/cti.png) - -Now you can structure your property json files like simple objects: - -```json -{ - "size": { - "font": { - "base": { "value": "16" }, - "large": { "value": "20" } - } - } -} -``` - -The CTI is implicit in the structure, the category is 'size' and the type is 'font', and there are 2 properties 'base' and 'large'. - -Structuring style properties in this manner gives us consistent naming and accessing of these properties. You don't need to remember if it is button_color_error or error_button_color, it is color_background_button_error! - -You can organize and name your style properties however you want, there are no restrictions. But there are a good amount of helpers if you do use this structure, like the 'attribute/cti' transform which adds attributes to the property of its CTI based on the path in the object. There are a lot of name transforms as well for when you want a flat structure like for sass variables. - -Also, the CTI structure provides a good mechanism to target transforms for specific kinds of properties. All of the transforms provided by the framework use the CTI structure to know if it should be applied. For instance, the 'color/hex' transform only applies to properties of the category 'color'. - -You can also add a _comment_ to a style property: - -``` -{ - "size": { - "font": { - "base": { - "value": "16", - "comment": "the base size of the font" - }, - "large": { - "value": "20", - "comment": "the large size of the font" - } - } - } -} -``` - -The comment will appear in the output files, where relevant or the output format supports comments. +| Name | Description | +| :--- | :--- | +| config.json | This is where the [configuration](config.md) for the style dictionary lives, where you define what happens when Style Dictionary runs | +| property files | [Properties](properties.md) are saved as a collection of JSON or JS module files. We usually keep them in a `properties` directory, but you can put them wherever you like - the path to them should be in the `source` attribute on your `config.json` file. | +| assets (optional) | Assets can be included in your style dictionary package, allowing you to keep them in your style dictionary as a single source of truth. | ----- ## Assets diff --git a/docs/properties.md b/docs/properties.md new file mode 100644 index 000000000..b37248ca8 --- /dev/null +++ b/docs/properties.md @@ -0,0 +1,112 @@ +# Properties + +> Synonyms: design tokens, design variables, design constants, atoms + +Style properties are stored in a collection of JSON or JS module files. We usually keep them in a `properties` directory, but you can put them wherever you like, they just need to be referenced in the `source` attribute on your `config.json` file. + +A property is a collection of attributes that describe any fundamental/atomic visual style. Each attribute is a `key:value` pair. A property name and its value are considered a design token (or design variable/constant/atom). + +![Terminology for different parts of a JSON property](assets/property-definitions.png) + +A property is transformed for use in different platforms, languages, and contexts. A simple example is a color. A color can be represented in many ways, all of these are the same color: `#ffffff`, `rgb(255,255,255)`, `hsl(0,0,1)`. + +A property file organizes properties in a structured way for easy access. Property files are organized as a deep object with the leaf nodes being the style key:value pairs. + +## Examples + +```json +{ + "color": { + "font": { + "base": { "value": "#111111" }, + "secondary": { "value": "#333333" }, + "tertiary": { "value": "#666666" }, + "inverse": { + "base": { "value": "#ffffff" } + } + } + } +} +``` + +Any object in the JSON that has a `value` attribute on it is a property, so in this example there are 4 style properties: `color.font.base`, `color.font.secondary`, `color.font.tertiary`, and `color.font.inverse.base`. + +For any properties you wish to output, the "value" attribute is required. This provides the data that will be used throughout the build process (and ultimately used for styling in your deliverables). You can optionally include any custom attributes you would like (e.g. "comment" with a string or "metadata" as an object with its own attributes). + +### Example Property +Here you can see a property of "size.font.small" with two attributes: +1. the required "value" attribute, set to "10" +1. the optional "comment" attribute (The "comment" attribute is treated in a special way - the comment will appear in output files when the output format supports comments.) +```json +{ + "size": { + "font": { + "small" : { + "value": "10", + "comment": "the smallest font allowed for readability" + }, + } + } +} +``` + +### Multiple Properties +Multiple properties in a single file are simple to read and understand using the recommended [`Category / Type / Item (CTI)`](#category-type-item-(cti)) method +```json +{ + "size": { + "font": { + "small" : { "value": "10" }, + "medium": { "value": "16" }, + "large" : { "value": "24" }, + } + } +} +``` + +### Attribute reference / alias +You can reference (alias) existing values by using the dot-notation object path (the fully articulated property name) in brackets. Note that this only applies to values; referencing a non-value property will cause unexpected results in your output. +```json +{ + "size": { + "font": { + "small" : { "value": "10" }, + "medium": { "value": "16" }, + "large" : { "value": "24" }, + "base" : { "value": "{size.font.medium.value}" } + } + } +} +``` + + +## Category / Type / Item + +This CTI structure is not required. However, we feel this classification structure makes the most sense semantically. + +Style properties are organized into a hierarchical tree structure with 'category' defining the primitive nature of the property. For example, we have the color category and every property underneath is always a color. As you proceed down the tree, you get more specific about what that color is. Is it a background color, a text color, or a border color? What kind of text color is it? You get the point. It's like the animal kingdom classification: + +![](assets/cti.png) + +Now you can structure your property json files like simple objects: + +```json +{ + "size": { + "font": { + "base": { "value": "16" }, + "large": { "value": "20" } + } + } +} +``` + +The CTI is implicit in the structure, the category is 'size' and the type is 'font', and there are 2 properties 'base' and 'large'. + +Structuring style properties in this manner gives us consistent naming and accessing of these properties. You don't need to remember if it is `button_color_error` or `error_button_color`, it is `color_background_button_error`! + +You can organize and name your style properties however you want, **there are no restrictions**. But there are a good amount of helpers if you do use this structure, like the 'attribute/cti' transform which adds attributes to the property of its CTI based on the path in the object. There are a lot of name transforms as well for when you want a flat structure like for sass variables. + +Also, the CTI structure provides a good mechanism to target transforms for specific kinds of properties. All of the transforms provided by the framework use the CTI structure to know if it should be applied. For instance, the 'color/hex' transform only applies to properties of the category 'color'. + +---- diff --git a/docs/quick_start.md b/docs/quick_start.md index e12fcbcf8..ee2fe9d61 100644 --- a/docs/quick_start.md +++ b/docs/quick_start.md @@ -1,22 +1,18 @@ # Quick Start ## Installation -*Note that you must have node (and npm) installed.* +*Note that you must have [node (and npm) installed](https://www.npmjs.com/get-npm) before you can follow this guide.* If you want to use the CLI, you can install it globally via npm: ```bash $ npm install -g style-dictionary ``` -Or you can install it like a normal npm dependency. This is a build tool so you are most likely going to want to save it as a dev dependency: +Or you can install it like a normal npm dependency. Style Dictionary is a build tool, so you are most likely to use it as a dev dependency: ```bash $ npm install -D style-dictionary ``` -If you want to install it with yarn: -```bash -$ yarn add style-dictionary --dev -``` ## Creating a New Project The CLI comes with some starter code to get a new project started easily. @@ -26,7 +22,7 @@ $ cd MyStyleD $ style-dictionary init basic ``` -This command will copy over the example files found in example in this repo and then run the `style-dictionary build` command to generate the build artifacts. You should see something like this output: +This command will copy over the example files found in the [basic example](https://github.com/amzn/style-dictionary/tree/master/examples/basic) in this repo and then run the `style-dictionary build` command to generate the build artifacts. You should see something like this output: ``` Reading config file from ./config.json Building all platforms @@ -132,9 +128,9 @@ $size-font-base: 1rem; Pretty nifty! This shows a few things happening: 1. The build system does a deep merge of all the property JSON files defined in the `source` attribute of `config.json`. This allows you to split up the property JSON files however you want. There are 2 JSON files with `color` as the top level key, but they get merged properly. -1. The build system resolves references to other style properties. `{size.font.medium.value}` gets resolved properly -1. The build system handles references to property values in other files as well as you can see in `properties/color/font.json` -1. Values get transformed differently depending on the platform they are built to +1. The build system resolves references to other style property values. `{size.font.medium.value}` is resolved properly +1. The build system handles references to property values in other files as well (as you can see in `properties/color/font.json`) +1. Values are transformed specifically for each platform ## Making a change @@ -174,18 +170,13 @@ That's it! There is a lot more you can do with your style dictionary than just g at some [examples](examples.md) or take a deeper dive into [package structure](package_structure.md), [extending](extending.md), or how the [build process](build_process.md) works. ## Basic Usage -### CLI +### Command Line Interface (CLI) ```bash $ style-dictionary build ``` -Call this in the root directory of your project. The only thing needed is a `config.json` file. There are also arguments: +Call this in the root directory of your project, which must include a [configuration](config.md) file. -| Flag | Short Flag | Description | -| --- | --- | --- | -| --config \[path\] | -h | Set the config file to use. Must be a .json file | -| --platform \[platform\] | -p | Only build a specific platform defined in the config file. | -| --help | -h | Display help content | -| --version | -v | Display the version | +More detailed information about [using the Style Dictionary CLI is available here](using_the_cli.md). ### Node You can also use the style dictionary build system in node if you want to [extend](extending.md) the functionality or use it in another build system like Grunt or Gulp. @@ -195,7 +186,7 @@ const StyleDictionary = require('style-dictionary').extend('config.json'); StyleDictionary.buildAllPlatforms(); ``` -The `.extend()` method is an overloaded method that can also take an object with the configuration in the same format as a config.json file. +The `.extend()` method is an overloaded method that can also take a [configuration](config.md) object. ```javascript const StyleDictionary = require('style-dictionary').extend({ source: ['properties/**/*.json'], @@ -214,3 +205,5 @@ const StyleDictionary = require('style-dictionary').extend({ StyleDictionary.buildAllPlatforms(); ``` + +More detailed information about [using the Style Dictionary npm module is available here](using_the_npm_module.md). diff --git a/docs/templates.md b/docs/templates.md index b60932215..1f7bd1095 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -1,7 +1,7 @@ # Templates -Templates are deprecated in favor of [Formats](formats.md) and will be removed in the future. If you want to create a custom template, create a [Format that uses templating](formats.md#using-a-template-templating-engine-to-create-a-format). +Templates are deprecated in favor of [Formats](formats.md) and will be removed in the future. If you want to use a template, create a [Format that uses templating](formats.md?id=using-a-template-templating-engine-to-create-a-format). >*__Why are Templates being deprecated in favor of Formats?__* ->It is a simplification for users, no power is being removed. Templates were syntactic sugar; anything you could do in a Template you can do in a Format. Since they both did the same thing people became confused on which method they were supposed to use for output. Even worse, we actually required you to know if the output you wanted was created as a format or as a template, even for those formats and template included in Style Dictionary by default. This was a bad plan and caused problems. Additionally, Style Dictionary aims to provide power and flexibility without forcing you to use any particular system and only Lodash Templates were supported under the old system. Using formats, you can use any Templating engine you would like. +>It is a simplification for users, no power is being removed. Anything you could do in a Template you can do in a Format. Since they both did the same thing people became confused on which method they were supposed to use for output. Even worse, we actually required you to specify if the output you wanted was defined as a format or as a template, even for those formats and templates included in Style Dictionary by default. This was a bad plan and caused problems for many users. Lastly, Style Dictionary aims to provide power and flexibility without forcing you to use any particular system, but only Lodash Templates were supported under the old template system. Using formats, you can use any templating engine you would like. diff --git a/docs/transform_groups.md b/docs/transform_groups.md index 393c4ae91..f44b94278 100644 --- a/docs/transform_groups.md +++ b/docs/transform_groups.md @@ -1,6 +1,6 @@ # Transform Groups -Transform Groups are a way to easily define and use groups of transforms. They are an array of transforms. You can define custom transform groups with the [`registerTransformGroup`](api.md#registertransformgroup). +Transform Groups are a way to easily use multiple transforms at once. They are an array of transforms. You can define a custom transform group with the [`registerTransformGroup`](api.md#registertransformgroup). You use transformGroups in your config file under platforms > [platform] > transformGroup diff --git a/docs/transforms.md b/docs/transforms.md index 49c70d914..a6f872faf 100644 --- a/docs/transforms.md +++ b/docs/transforms.md @@ -1,7 +1,8 @@ # Transforms -Transforms are functions that transform a property so that each platform can consume the property in different ways. A simple example is changing pixel values to point values for iOS and dp or sp for Android. Transforms are applied in a non-destructive way so each platform can transform the properties. Transforms are performed sequentially, so the order you use transforms matters. You can define custom transforms with the [`registerTransform`](api.md#registertransform). +Transforms are functions that transform a property so that each platform can consume the property in different ways. A simple example is changing pixel values to point values for iOS and dp or sp for Android. Transforms are applied in a non-destructive way so each platform can transform the properties. Transforms are performed sequentially, so the order you use transforms matters. Transforms are used in your [configuration](config.md), and can be either [pre-defined transforms](transforms.md?id=defining-custom-transforms) supplied by Style Dictionary or [custom transforms](transforms.md?id=defining-custom-transforms). +## Using Transforms You use transforms in your config file under platforms > [platform] > transforms ```json @@ -17,7 +18,7 @@ You use transforms in your config file under platforms > [platform] > transforms A transform consists of 4 parts: type, name, matcher, and transformer. Transforms are run on all properties where the matcher returns true. *NOTE: if you don't provide a matcher function, it will match all properties.* -### Transform Types +## Transform Types There are 3 types of transforms: attribute, name, and value. **Attribute:** An attribute transform adds to the attributes object on a property. This is for including any meta-data about a property such as it's CTI or other information. @@ -26,15 +27,18 @@ There are 3 types of transforms: attribute, name, and value. **Value:** The value transform is the most important as this is the one that changes the representation of the value. Colors can be turned into hex values, rgb, hsl, hsv, etc. Value transforms have a matcher function so that they only get run on certain properties. This allows us to only run a color transform on just the colors and not every property. ----- + +## Defining Custom Transforms +You can define custom transforms with the [`registerTransform`](api.md#registertransform). + ## Pre-defined Transforms [lib/common/transforms.js](https://github.com/amzn/style-dictionary/blob/master/lib/common/transforms.js) -> All the pre-defined transforms included use the [CTI structure](package_structure.md#properties) for the match properties. If you structure your style properties differently you will need to write [custom transforms](#custom-transforms) or make sure the property CTIs are on the attributes of your properties. +> All the pre-defined transforms included use the [CTI structure](properties.md?id=category-type-item) for the match properties. If you structure your style properties differently you will need to write [custom transforms](transforms.md?id=defining-custom-transforms) or make sure the property CTIs are on the attributes of your properties. -### attribute/cti +### attribute/cti Adds: category, type, item, subitem, and state on the attributes object based on the location in the style dictionary. @@ -54,7 +58,7 @@ Adds: category, type, item, subitem, and state on the attributes object based on * * * -### attribute/color +### attribute/color Adds: hex, hsl, hsv, rgb, red, blue, green. @@ -73,7 +77,7 @@ Adds: hex, hsl, hsv, rgb, red, blue, green. * * * -### name/human +### name/human Creates a human-friendly name @@ -87,7 +91,7 @@ Creates a human-friendly name * * * -### name/cti/camel +### name/cti/camel Creates a camel case name. If you define a prefix on the platform in your config, it will prepend with your prefix @@ -102,7 +106,7 @@ Creates a camel case name. If you define a prefix on the platform in your config * * * -### name/cti/kebab +### name/cti/kebab Creates a kebab case name. If you define a prefix on the platform in your config, it will prepend with your prefix @@ -117,7 +121,7 @@ Creates a kebab case name. If you define a prefix on the platform in your config * * * -### name/cti/snake +### name/cti/snake Creates a snake case name. If you define a prefix on the platform in your config, it will prepend with your prefix @@ -132,7 +136,7 @@ Creates a snake case name. If you define a prefix on the platform in your config * * * -### name/cti/constant +### name/cti/constant Creates a constant-style name based on the full CTI of the property. If you define a prefix on the platform in your config, it will prepend with your prefix @@ -147,7 +151,7 @@ Creates a constant-style name based on the full CTI of the property. If you defi * * * -### name/ti/constant +### name/ti/constant Creates a constant-style name on just the type and item of the property. This is useful if you want to create different static classes/files for categories like `Color.BACKGROUND_BASE`. If you define a prefix on the platform in your config, it will prepend with your prefix. @@ -162,7 +166,7 @@ Creates a constant-style name on just the type and item of the property. This is * * * -### name/cti/pascal +### name/cti/pascal Creates a Pascal case name. If you define a prefix on the platform in your config, it will prepend with your prefix @@ -177,7 +181,7 @@ Creates a Pascal case name. If you define a prefix on the platform in your confi * * * -### color/rgb +### color/rgb Transforms the value into an RGB string @@ -191,7 +195,7 @@ Transforms the value into an RGB string * * * -### color/hex +### color/hex Transforms the value into an 6-digit hex string @@ -205,7 +209,7 @@ Transforms the value into an 6-digit hex string * * * -### color/hex8 +### color/hex8 Transforms the value into an 8-digit hex string @@ -219,7 +223,7 @@ Transforms the value into an 8-digit hex string * * * -### color/hex8android +### color/hex8android Transforms the value into an 8-digit hex string for Android because they put the alpha channel first @@ -233,7 +237,7 @@ Transforms the value into an 8-digit hex string for Android because they put the * * * -### color/UIColor +### color/UIColor Transforms the value into an UIColor class for iOS @@ -247,7 +251,7 @@ Transforms the value into an UIColor class for iOS * * * -### color/css +### color/css Transforms the value into a hex or rgb string depending on if it has transparency @@ -262,7 +266,7 @@ rgba(0,0,0,0.5) * * * -### size/sp +### size/sp Transforms the value into a scale-independent pixel (sp) value for font sizes on Android. It will not scale the number. @@ -276,7 +280,7 @@ Transforms the value into a scale-independent pixel (sp) value for font sizes on * * * -### size/dp +### size/dp Transforms the value into a density-independent pixel (dp) value for non-font sizes on Android. It will not scale the number. @@ -290,7 +294,7 @@ Transforms the value into a density-independent pixel (dp) value for non-font si * * * -### size/remToSp +### size/remToSp Transforms the value from a REM size on web into a scale-independent pixel (sp) value for font sizes on Android. It WILL scale the number by a factor of 16 (common base font size on web). @@ -304,7 +308,7 @@ Transforms the value from a REM size on web into a scale-independent pixel (sp) * * * -### size/remToDp +### size/remToDp Transforms the value from a REM size on web into a density-independent pixel (dp) value for font sizes on Android. It WILL scale the number by a factor of 16 (common base font size on web). @@ -318,7 +322,7 @@ Transforms the value from a REM size on web into a density-independent pixel (dp * * * -### size/px +### size/px Adds 'px' to the end of the number. Does not scale the number @@ -332,7 +336,7 @@ Adds 'px' to the end of the number. Does not scale the number * * * -### size/rem +### size/rem Adds 'rem' to the end of the number. Does not scale the number @@ -346,7 +350,7 @@ Adds 'rem' to the end of the number. Does not scale the number * * * -### size/remToPt +### size/remToPt Scales the number by 16 (default web font size) and adds 'pt' to the end. @@ -360,7 +364,7 @@ Scales the number by 16 (default web font size) and adds 'pt' to the end. * * * -### size/remToPx +### size/remToPx Scales the number by 16 (default web font size) and adds 'px' to the end. @@ -374,7 +378,7 @@ Scales the number by 16 (default web font size) and adds 'px' to the end. * * * -### content/icon +### content/icon Takes a unicode point and transforms it into a form CSS can use. @@ -388,7 +392,7 @@ Takes a unicode point and transforms it into a form CSS can use. * * * -### content/quote +### content/quote Wraps the value in a single quoted string @@ -402,7 +406,7 @@ Wraps the value in a single quoted string * * * -### content/objC/literal +### content/objC/literal Wraps the value in a double-quoted string and prepends an '@' to make a string literal. @@ -415,7 +419,7 @@ Wraps the value in a double-quoted string and prepends an '@' to make a string l * * * -### font/objC/literal +### font/objC/literal Wraps the value in a double-quoted string and prepends an '@' to make a string literal. @@ -428,7 +432,7 @@ Wraps the value in a double-quoted string and prepends an '@' to make a string l * * * -### time/seconds +### time/seconds Assumes a time in miliseconds and transforms it into a decimal @@ -442,7 +446,7 @@ Assumes a time in miliseconds and transforms it into a decimal * * * -### asset/base64 +### asset/base64 Wraps the value in a double-quoted string and prepends an '@' to make a string literal. @@ -456,7 +460,7 @@ Wraps the value in a double-quoted string and prepends an '@' to make a string l * * * -### asset/path +### asset/path Prepends the local file path @@ -470,7 +474,7 @@ Prepends the local file path * * * -### asset/objC/literal +### asset/objC/literal Wraps the value in a double-quoted string and prepends an '@' to make a string literal. @@ -482,4 +486,3 @@ Wraps the value in a double-quoted string and prepends an '@' to make a string l * * * - diff --git a/docs/using_the_cli.md b/docs/using_the_cli.md new file mode 100644 index 000000000..37ba9e143 --- /dev/null +++ b/docs/using_the_cli.md @@ -0,0 +1,77 @@ +# Using the CLI + +The Style Dictionary command line interface (CLI) provides an executable system to create and act upon style dictionaries. + + +# Installation +To use the CLI, you can install it globally via npm: +```bash +$ npm install -g style-dictionary +``` + + +# CLI Quick Start +This will create a new folder called 'quick-start' and populate it with a Style Dictionary configuration and properties. +```bash +$ mkdir quick-start && cd quick-start +$ style-dictionary init basic +``` +You can then modify the properties in the properties directory and run the build command below. See the changes in the output generated in the build folder. +```bash +$ style-dictionary build +``` + + +# Commands +The CLI provides three basic commands: +* [build](using_the_cli.md?id=build) Builds a style dictionary package from the current directory. +* [clean](using_the_cli.md?id=clean) Removes files specified in the config of the style dictionary package of the current directory. +* [init](using_the_cli.md?id=init) Generates a starter style dictionary + +These commands can be run using: +```bash +$ style-dictionary [command] [options] +``` + + +# build +Builds a style dictionary package from the current directory. Usage: +```bash +$ style-dictionary build [options] +``` +Options: +| Name | Usage | Description | +| :--- | :--- | :--- | +| Configuration Path | -c , --config | Set the path to the configuration file. Defaults to './config.json'. | +| Platform | -p , --platform | Only build a specific platform. If not supplied, builds all platform found in the configuration file. | + + +# clean +Removes files and folders generated by a previously run 'build' command. Usage: +```bash +$ style-dictionary clean [options] +``` +Options: +| Name | Usage | Description | +| :--- | :--- | :--- | +| Configuration Path | -c , --config | Set the path to the configuration file. Defaults to './config.json'. | +| Platform | -p , --platform | Only clean a specific platform. If not supplied, cleans all platform found in the configuration file. | + + +# init +Generates a starter style dictionary, based on the supplied example type. Usage: +```bash +$ style-dictionary init +``` +Where example-type is one of: +* `basic` +* `complete` + + + + +# Version +To see what version of Style Dictionary you have, run this command: +```bash +$ style-dictionary --version +``` diff --git a/docs/using_the_npm_module.md b/docs/using_the_npm_module.md new file mode 100644 index 000000000..4f495b88f --- /dev/null +++ b/docs/using_the_npm_module.md @@ -0,0 +1,48 @@ +# Using the NPM Module + +The Style Dictionary npm module exposes an [API](api.md) to interact with style dictionaries. + + +# Installation +To use the npm module, install it like a normal npm dependency. This is a build tool so you are most likely going to want to save it as a dev dependency (The -D option): +```bash +$ npm install -D style-dictionary +``` + + +# NPM Module Quick Start +To use the style dictionary build system in node, there are generally three steps: +1. Require/import the StyleDictionary module +1. Extend the module with a configuration, creating the fully defined dictionary (importing all properties and intended outputs) +1. Call one or more build calls for various platforms + +Using a JSON [configuration](config.md) file, that looks like this: +```javascript +const StyleDictionary = require('style-dictionary').extend('config.json'); + +StyleDictionary.buildAllPlatforms(); +``` + +Alternatively, you can pass in a [configuration](config.md) object to the extend call. The buildAllPlatforms call is the same. +```javascript +const StyleDictionary = require('style-dictionary').extend({ + source: ['properties/**/*.json'], + platforms: { + scss: { + transformGroup: 'scss', + buildPath: 'build/', + files: [{ + destination: 'variables.scss', + format: 'scss/variables' + }] + } + // ... + } +}); + +StyleDictionary.buildAllPlatforms(); +``` + + +# NPM Module API +The [complete npm module API is documented here](api.md). diff --git a/example/README.md b/example/README.md deleted file mode 100644 index 99eb70be2..000000000 --- a/example/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Style Dictionary logo - -# Examples - -Here you can find some sample projects to get started. You can start a new project from these examples using the CLI: -```bash -$ mkdir MyStyleD -$ cd MyStyleD -$ style-dictionary init basic -``` - -## Do you have another way to use a style dictionary? - -Let us know by [filing an issue](https://github.com/amzn/style-dictionary/issues) or sending us an email: style-dictionary@amazon.com. diff --git a/example/basic/properties/color/font.json b/example/basic/properties/color/font.json deleted file mode 100644 index 2beb5aa38..000000000 --- a/example/basic/properties/color/font.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "color": { - "font": { - "base" : { "value": "{color.base.gray.dark.value}" }, - "secondary": { "value": "{color.base.gray.medium.value}" }, - "tertiary" : { "value": "{color.base.gray.light.value}" } - } - } -} diff --git a/example/npm/LICENSE b/example/npm/LICENSE deleted file mode 100644 index 937e96972..000000000 --- a/example/npm/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/example/npm/README.md b/example/npm/README.md deleted file mode 100644 index fd533f082..000000000 --- a/example/npm/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## Style Dictionary as an npm module - -This example shows how to set up a style dictionary as an npm module, either to publish to a local npm service or to publish externally. - -When you publish this npm module, the prepublish hook will run, calling the style dictionary build system to create the necessary files. You can also just run `npm run build` to generate the files to see what it is creating. diff --git a/example/npm/properties/color.json b/example/npm/properties/color.json deleted file mode 100644 index 67f1994bf..000000000 --- a/example/npm/properties/color.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "color": { - "base": { - "red": { - "50" : { "value": "#000000", "attributes": {"font": "base"}}, - "100" : { "value": "#FFCDD2", "attributes": {"font": "base"}}, - "200" : { "value": "#EF9A9A", "attributes": {"font": "base"}}, - "300" : { "value": "#E57373", "attributes": {"font": "base"}}, - "400" : { "value": "#EF5350", "attributes": {"font": "inverse"}}, - "500" : { "value": "#F44336", "attributes": {"font": "inverse"}}, - "600" : { "value": "#E53935", "attributes": {"font": "inverse"}}, - "700" : { "value": "#D32F2F", "attributes": {"font": "inverse"}}, - "800" : { "value": "#C62828", "attributes": {"font": "inverse"}}, - "900" : { "value": "#B71C1C", "attributes": {"font": "inverse"}}, - "A100": { "value": "#FF8A80", "attributes": {"font": "base"}}, - "A200": { "value": "#FF5252", "attributes": {"font": "inverse"}}, - "A400": { "value": "#FF1744", "attributes": {"font": "inverse"}}, - "A700": { "value": "#D50000", "attributes": {"font": "inverse"}} - }, - "pink": { - "50" : { "value": "#FCE4EC", "attributes": {"font": "base"}}, - "100" : { "value": "#F8BBD0", "attributes": {"font": "base"}}, - "200" : { "value": "#F48FB1", "attributes": {"font": "base"}}, - "300" : { "value": "#F06292", "attributes": {"font": "inverse"}}, - "400" : { "value": "#EC407A", "attributes": {"font": "inverse"}}, - "500" : { "value": "#E91E63", "attributes": {"font": "inverse"}}, - "600" : { "value": "#D81B60", "attributes": {"font": "inverse"}}, - "700" : { "value": "#C2185B", "attributes": {"font": "inverse"}}, - "800" : { "value": "#AD1457", "attributes": {"font": "inverse"}}, - "900" : { "value": "#880E4F", "attributes": {"font": "inverse"}}, - "A100": { "value": "#FF80AB", "attributes": {"font": "base"}}, - "A200": { "value": "#FF4081", "attributes": {"font": "inverse"}}, - "A400": { "value": "#F50057", "attributes": {"font": "inverse"}}, - "A700": { "value": "#C51162", "attributes": {"font": "inverse"}} - }, - "purple": { - "50" : { "value": "#F3E5F5", "attributes": {"font": "base"}}, - "100" : { "value": "#E1BEE7", "attributes": {"font": "base"}}, - "200" : { "value": "#CE93D8", "attributes": {"font": "base"}}, - "300" : { "value": "#BA68C8", "attributes": {"font": "inverse"}}, - "400" : { "value": "#AB47BC", "attributes": {"font": "inverse"}}, - "500" : { "value": "#9C27B0", "attributes": {"font": "inverse"}}, - "600" : { "value": "#8E24AA", "attributes": {"font": "inverse"}}, - "700" : { "value": "#7B1FA2", "attributes": {"font": "inverse"}}, - "800" : { "value": "#6A1B9A", "attributes": {"font": "inverse"}}, - "900" : { "value": "#4A148C", "attributes": {"font": "inverse"}}, - "A100": { "value": "#EA80FC", "attributes": {"font": "base"}}, - "A200": { "value": "#E040FB", "attributes": {"font": "inverse"}}, - "A400": { "value": "#D500F9", "attributes": {"font": "inverse"}}, - "A700": { "value": "#AA00FF", "attributes": {"font": "inverse"}} - }, - "deep_purple": { - "50" : { "value": "#EDE7F6", "attributes": {"font": "base"}}, - "100" : { "value": "#D1C4E9", "attributes": {"font": "base"}}, - "200" : { "value": "#B39DDB", "attributes": {"font": "base"}}, - "300" : { "value": "#9575CD", "attributes": {"font": "inverse"}}, - "400" : { "value": "#7E57C2", "attributes": {"font": "inverse"}}, - "500" : { "value": "#673AB7", "attributes": {"font": "inverse"}}, - "600" : { "value": "#5E35B1", "attributes": {"font": "inverse"}}, - "700" : { "value": "#512DA8", "attributes": {"font": "inverse"}}, - "800" : { "value": "#4527A0", "attributes": {"font": "inverse"}}, - "900" : { "value": "#311B92", "attributes": {"font": "inverse"}}, - "A100": { "value": "#B388FF", "attributes": {"font": "base"}}, - "A200": { "value": "#7C4DFF", "attributes": {"font": "inverse"}}, - "A400": { "value": "#651FFF", "attributes": {"font": "inverse"}}, - "A700": { "value": "#6200EA", "attributes": {"font": "inverse"}} - }, - "indigo": { - "50" : { "value": "#E8EAF6", "attributes": {"font": "base"}}, - "100" : { "value": "#C5CAE9", "attributes": {"font": "base"}}, - "200" : { "value": "#9FA8DA", "attributes": {"font": "base"}}, - "300" : { "value": "#7986CB", "attributes": {"font": "inverse"}}, - "400" : { "value": "#5C6BC0", "attributes": {"font": "inverse"}}, - "500" : { "value": "#3F51B5", "attributes": {"font": "inverse"}}, - "600" : { "value": "#3949AB", "attributes": {"font": "inverse"}}, - "700" : { "value": "#303F9F", "attributes": {"font": "inverse"}}, - "800" : { "value": "#283593", "attributes": {"font": "inverse"}}, - "900" : { "value": "#1A237E", "attributes": {"font": "inverse"}}, - "A100": { "value": "#8C9EFF", "attributes": {"font": "base"}}, - "A200": { "value": "#536DFE", "attributes": {"font": "inverse"}}, - "A400": { "value": "#3D5AFE", "attributes": {"font": "inverse"}}, - "A700": { "value": "#304FFE", "attributes": {"font": "inverse"}} - }, - "blue": { - "50" : { "value": "#E3F2FD", "attributes": {"font": "base"}}, - "100" : { "value": "#BBDEFB", "attributes": {"font": "base"}}, - "200" : { "value": "#90CAF9", "attributes": {"font": "base"}}, - "300" : { "value": "#64B5F6", "attributes": {"font": "base"}}, - "400" : { "value": "#42A5F5", "attributes": {"font": "inverse"}}, - "500" : { "value": "#2196F3", "attributes": {"font": "inverse"}}, - "600" : { "value": "#1E88E5", "attributes": {"font": "inverse"}}, - "700" : { "value": "#1976D2", "attributes": {"font": "inverse"}}, - "800" : { "value": "#1565C0", "attributes": {"font": "inverse"}}, - "900" : { "value": "#0D47A1", "attributes": {"font": "inverse"}}, - "A100": { "value": "#82B1FF", "attributes": {"font": "base"}}, - "A200": { "value": "#448AFF", "attributes": {"font": "inverse"}}, - "A400": { "value": "#2979FF", "attributes": {"font": "inverse"}}, - "A700": { "value": "#2962FF", "attributes": {"font": "inverse"}} - }, - "light_blue": { - "50" : { "value": "#E1F5FE", "attributes": {"font": "base"}}, - "100" : { "value": "#B3E5FC", "attributes": {"font": "base"}}, - "200" : { "value": "#81D4FA", "attributes": {"font": "base"}}, - "300" : { "value": "#4FC3F7", "attributes": {"font": "base"}}, - "400" : { "value": "#29B6F6", "attributes": {"font": "base"}}, - "500" : { "value": "#03A9F4", "attributes": {"font": "base"}}, - "600" : { "value": "#039BE5", "attributes": {"font": "inverse"}}, - "700" : { "value": "#0288D1", "attributes": {"font": "inverse"}}, - "800" : { "value": "#0277BD", "attributes": {"font": "inverse"}}, - "900" : { "value": "#01579B", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#80D8FF", "attributes": {"font": "base"}}, - "A200" : { "value": "#40C4FF", "attributes": {"font": "base"}}, - "A400" : { "value": "#00B0FF", "attributes": {"font": "base"}}, - "A700" : { "value": "#0091EA", "attributes": {"font": "inverse"}} - }, - "cyan": { - "50" : { "value": "#E0F7FA", "attributes": {"font": "base"}}, - "100" : { "value": "#B2EBF2", "attributes": {"font": "base"}}, - "200" : { "value": "#80DEEA", "attributes": {"font": "base"}}, - "300" : { "value": "#4DD0E1", "attributes": {"font": "base"}}, - "400" : { "value": "#26C6DA", "attributes": {"font": "base"}}, - "500" : { "value": "#00BCD4", "attributes": {"font": "base"}}, - "600" : { "value": "#00ACC1", "attributes": {"font": "base"}}, - "700" : { "value": "#0097A7", "attributes": {"font": "inverse"}}, - "800" : { "value": "#00838F", "attributes": {"font": "inverse"}}, - "900" : { "value": "#006064", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#84FFFF", "attributes": {"font": "base"}}, - "A200" : { "value": "#18FFFF", "attributes": {"font": "base"}}, - "A400" : { "value": "#00E5FF", "attributes": {"font": "base"}}, - "A700" : { "value": "#00B8D4", "attributes": {"font": "base"}} - }, - "teal": { - "50" : { "value": "#E0F2F1", "attributes": {"font": "base"}}, - "100" : { "value": "#B2DFDB", "attributes": {"font": "base"}}, - "200" : { "value": "#80CBC4", "attributes": {"font": "base"}}, - "300" : { "value": "#4DB6AC", "attributes": {"font": "base"}}, - "400" : { "value": "#26A69A", "attributes": {"font": "base"}}, - "500" : { "value": "#009688", "attributes": {"font": "inverse"}}, - "600" : { "value": "#00897B", "attributes": {"font": "inverse"}}, - "700" : { "value": "#00796B", "attributes": {"font": "inverse"}}, - "800" : { "value": "#00695C", "attributes": {"font": "inverse"}}, - "900" : { "value": "#004D40", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#A7FFEB", "attributes": {"font": "base"}}, - "A200" : { "value": "#64FFDA", "attributes": {"font": "base"}}, - "A400" : { "value": "#1DE9B6", "attributes": {"font": "base"}}, - "A700" : { "value": "#00BFA5", "attributes": {"font": "base"}} - }, - "green": { - "50" : { "value": "#E8F5E9", "attributes": {"font": "base"}}, - "100" : { "value": "#C8E6C9", "attributes": {"font": "base"}}, - "200" : { "value": "#A5D6A7", "attributes": {"font": "base"}}, - "300" : { "value": "#81C784", "attributes": {"font": "base"}}, - "400" : { "value": "#66BB6A", "attributes": {"font": "base"}}, - "500" : { "value": "#4CAF50", "attributes": {"font": "base"}}, - "600" : { "value": "#43A047", "attributes": {"font": "inverse"}}, - "700" : { "value": "#388E3C", "attributes": {"font": "inverse"}}, - "800" : { "value": "#2E7D32", "attributes": {"font": "inverse"}}, - "900" : { "value": "#1B5E20", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#B9F6CA", "attributes": {"font": "base"}}, - "A200" : { "value": "#69F0AE", "attributes": {"font": "base"}}, - "A400" : { "value": "#00E676", "attributes": {"font": "base"}}, - "A700" : { "value": "#00C853", "attributes": {"font": "base"}} - }, - "light_green": { - "50" : { "value": "#F1F8E9", "attributes": {"font": "base"}}, - "100" : { "value": "#DCEDC8", "attributes": {"font": "base"}}, - "200" : { "value": "#C5E1A5", "attributes": {"font": "base"}}, - "300" : { "value": "#AED581", "attributes": {"font": "base"}}, - "400" : { "value": "#9CCC65", "attributes": {"font": "base"}}, - "500" : { "value": "#8BC34A", "attributes": {"font": "base"}}, - "600" : { "value": "#7CB342", "attributes": {"font": "base"}}, - "700" : { "value": "#689F38", "attributes": {"font": "inverse"}}, - "800" : { "value": "#558B2F", "attributes": {"font": "inverse"}}, - "900" : { "value": "#33691E", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#CCFF90", "attributes": {"font": "base"}}, - "A200" : { "value": "#B2FF59", "attributes": {"font": "base"}}, - "A400" : { "value": "#76FF03", "attributes": {"font": "base"}}, - "A700" : { "value": "#64DD17", "attributes": {"font": "base"}} - }, - "lime": { - "50" : { "value": "#F9FBE7", "attributes": {"font": "base"}}, - "100" : { "value": "#F0F4C3", "attributes": {"font": "base"}}, - "200" : { "value": "#E6EE9C", "attributes": {"font": "base"}}, - "300" : { "value": "#DCE775", "attributes": {"font": "base"}}, - "400" : { "value": "#D4E157", "attributes": {"font": "base"}}, - "500" : { "value": "#CDDC39", "attributes": {"font": "base"}}, - "600" : { "value": "#C0CA33", "attributes": {"font": "base"}}, - "700" : { "value": "#AFB42B", "attributes": {"font": "base"}}, - "800" : { "value": "#9E9D24", "attributes": {"font": "base"}}, - "900" : { "value": "#827717", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#F4FF81", "attributes": {"font": "base"}}, - "A200" : { "value": "#EEFF41", "attributes": {"font": "base"}}, - "A400" : { "value": "#C6FF00", "attributes": {"font": "base"}}, - "A700" : { "value": "#AEEA00", "attributes": {"font": "base"}} - }, - "yellow": { - "50" : { "value": "#FFFDE7", "attributes": {"font": "base"}}, - "100" : { "value": "#FFF9C4", "attributes": {"font": "base"}}, - "200" : { "value": "#FFF59D", "attributes": {"font": "base"}}, - "300" : { "value": "#FFF176", "attributes": {"font": "base"}}, - "400" : { "value": "#FFEE58", "attributes": {"font": "base"}}, - "500" : { "value": "#FFEB3B", "attributes": {"font": "base"}}, - "600" : { "value": "#FDD835", "attributes": {"font": "base"}}, - "700" : { "value": "#FBC02D", "attributes": {"font": "base"}}, - "800" : { "value": "#F9A825", "attributes": {"font": "base"}}, - "900" : { "value": "#F57F17", "attributes": {"font": "base"}}, - "A100" : { "value": "#FFFF8D", "attributes": {"font": "base"}}, - "A200" : { "value": "#FFFF00", "attributes": {"font": "base"}}, - "A400" : { "value": "#FFEA00", "attributes": {"font": "base"}}, - "A700" : { "value": "#FFD600", "attributes": {"font": "base"}} - }, - "amber": { - "50" : { "value": "#FFF8E1", "attributes": {"font": "base"}}, - "100" : { "value": "#FFECB3", "attributes": {"font": "base"}}, - "200" : { "value": "#FFE082", "attributes": {"font": "base"}}, - "300" : { "value": "#FFD54F", "attributes": {"font": "base"}}, - "400" : { "value": "#FFCA28", "attributes": {"font": "base"}}, - "500" : { "value": "#FFC107", "attributes": {"font": "base"}}, - "600" : { "value": "#FFB300", "attributes": {"font": "base"}}, - "700" : { "value": "#FFA000", "attributes": {"font": "base"}}, - "800" : { "value": "#FF8F00", "attributes": {"font": "base"}}, - "900" : { "value": "#FF6F00", "attributes": {"font": "base"}}, - "A100" : { "value": "#FFE57F", "attributes": {"font": "base"}}, - "A200" : { "value": "#FFD740", "attributes": {"font": "base"}}, - "A400" : { "value": "#FFC400", "attributes": {"font": "base"}}, - "A700" : { "value": "#FFAB00", "attributes": {"font": "base"}} - }, - "orange": { - "50" : { "value": "#FFF3E0", "attributes": {"font": "base"}}, - "100" : { "value": "#FFE0B2", "attributes": {"font": "base"}}, - "200" : { "value": "#FFCC80", "attributes": {"font": "base"}}, - "300" : { "value": "#FFB74D", "attributes": {"font": "base"}}, - "400" : { "value": "#FFA726", "attributes": {"font": "base"}}, - "500" : { "value": "#FF9800", "attributes": {"font": "base"}}, - "600" : { "value": "#FB8C00", "attributes": {"font": "base"}}, - "700" : { "value": "#F57C00", "attributes": {"font": "base"}}, - "800" : { "value": "#EF6C00", "attributes": {"font": "inverse"}}, - "900" : { "value": "#E65100", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#FFD180", "attributes": {"font": "base"}}, - "A200" : { "value": "#FFAB40", "attributes": {"font": "base"}}, - "A400" : { "value": "#FF9100", "attributes": {"font": "base"}}, - "A700" : { "value": "#FF6D00", "attributes": {"font": "base"}} - }, - "deep_orange": { - "50" : { "value": "#FBE9E7", "attributes": {"font": "base"}}, - "100" : { "value": "#FFCCBC", "attributes": {"font": "base"}}, - "200" : { "value": "#FFAB91", "attributes": {"font": "base"}}, - "300" : { "value": "#FF8A65", "attributes": {"font": "base"}}, - "400" : { "value": "#FF7043", "attributes": {"font": "base"}}, - "500" : { "value": "#FF5722", "attributes": {"font": "inverse"}}, - "600" : { "value": "#F4511E", "attributes": {"font": "inverse"}}, - "700" : { "value": "#E64A19", "attributes": {"font": "inverse"}}, - "800" : { "value": "#D84315", "attributes": {"font": "inverse"}}, - "900" : { "value": "#BF360C", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#FF9E80", "attributes": {"font": "base"}}, - "A200" : { "value": "#FF6E40", "attributes": {"font": "base"}}, - "A400" : { "value": "#FF3D00", "attributes": {"font": "inverse"}}, - "A700" : { "value": "#DD2C00", "attributes": {"font": "inverse"}} - }, - "brown": { - "50" : { "value": "#EFEBE9", "attributes": {"font": "base"}}, - "100" : { "value": "#D7CCC8", "attributes": {"font": "base"}}, - "200" : { "value": "#BCAAA4", "attributes": {"font": "base"}}, - "300" : { "value": "#A1887F", "attributes": {"font": "inverse"}}, - "400" : { "value": "#8D6E63", "attributes": {"font": "inverse"}}, - "500" : { "value": "#795548", "attributes": {"font": "inverse"}}, - "600" : { "value": "#6D4C41", "attributes": {"font": "inverse"}}, - "700" : { "value": "#5D4037", "attributes": {"font": "inverse"}}, - "800" : { "value": "#4E342E", "attributes": {"font": "inverse"}}, - "900" : { "value": "#3E2723", "attributes": {"font": "inverse"}} - }, - "grey": { - "50" : { "value": "#FAFAFA", "attributes": {"font": "base"}}, - "100" : { "value": "#F5F5F5", "attributes": {"font": "base"}}, - "200" : { "value": "#EEEEEE", "attributes": {"font": "base"}}, - "300" : { "value": "#E0E0E0", "attributes": {"font": "base"}}, - "400" : { "value": "#BDBDBD", "attributes": {"font": "base"}}, - "500" : { "value": "#9E9E9E", "attributes": {"font": "base"}}, - "600" : { "value": "#757575", "attributes": {"font": "inverse"}}, - "700" : { "value": "#616161", "attributes": {"font": "inverse"}}, - "800" : { "value": "#424242", "attributes": {"font": "inverse"}}, - "900" : { "value": "#212121", "attributes": {"font": "inverse"}} - }, - "blue_grey": { - "50" : { "value": "#ECEFF1", "attributes": {"font": "base"}}, - "100" : { "value": "#CFD8DC", "attributes": {"font": "base"}}, - "200" : { "value": "#B0BEC5", "attributes": {"font": "base"}}, - "300" : { "value": "#90A4AE", "attributes": {"font": "base"}}, - "400" : { "value": "#78909C", "attributes": {"font": "inverse"}}, - "500" : { "value": "#607D8B", "attributes": {"font": "inverse"}}, - "600" : { "value": "#546E7A", "attributes": {"font": "inverse"}}, - "700" : { "value": "#455A64", "attributes": {"font": "inverse"}}, - "800" : { "value": "#37474F", "attributes": {"font": "inverse"}}, - "900" : { "value": "#263238", "attributes": {"font": "inverse"}} - }, - - "white": { "value": "#ffffff" }, - "black": { "value": "#000000" } - } - } -} diff --git a/example/react/LICENSE b/example/react/LICENSE deleted file mode 100644 index 3ad24aad0..000000000 --- a/example/react/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, -and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by -the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all -other entities that control, are controlled by, or are under common -control with that entity. For the purposes of this definition, -"control" means (i) the power, direct or indirect, to cause the -direction or management of such entity, whether by contract or -otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity -exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, -including but not limited to software source code, documentation -source, and configuration files. - -"Object" form shall mean any form resulting from mechanical -transformation or translation of a Source form, including but -not limited to compiled object code, generated documentation, -and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or -Object form, made available under the License, as indicated by a -copyright notice that is included in or attached to the work -(an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object -form, that is based on (or derived from) the Work and for which the -editorial revisions, annotations, elaborations, or other modifications -represent, as a whole, an original work of authorship. For the purposes -of this License, Derivative Works shall not include works that remain -separable from, or merely link (or bind by name) to the interfaces of, -the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including -the original version of the Work and any modifications or additions -to that Work or Derivative Works thereof, that is intentionally -submitted to Licensor for inclusion in the Work by the copyright owner -or by an individual or Legal Entity authorized to submit on behalf of -the copyright owner. For the purposes of this definition, "submitted" -means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, -and issue tracking systems that are managed by, or on behalf of, the -Licensor for the purpose of discussing and improving the Work, but -excluding communication that is conspicuously marked or otherwise -designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity -on behalf of whom a Contribution has been received by Licensor and -subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of -this License, each Contributor hereby grants to You a perpetual, -worldwide, non-exclusive, no-charge, royalty-free, irrevocable -copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the -Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of -this License, each Contributor hereby grants to You a perpetual, -worldwide, non-exclusive, no-charge, royalty-free, irrevocable -(except as stated in this section) patent license to make, have made, -use, offer to sell, sell, import, and otherwise transfer the Work, -where such license applies only to those patent claims licensable -by such Contributor that are necessarily infringed by their -Contribution(s) alone or by combination of their Contribution(s) -with the Work to which such Contribution(s) was submitted. If You -institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work -or a Contribution incorporated within the Work constitutes direct -or contributory patent infringement, then any patent licenses -granted to You under this License for that Work shall terminate -as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the -Work or Derivative Works thereof in any medium, with or without -modifications, and in Source or Object form, provided that You -meet the following conditions: - -(a) You must give any other recipients of the Work or -Derivative Works a copy of this License; and - -(b) You must cause any modified files to carry prominent notices -stating that You changed the files; and - -(c) You must retain, in the Source form of any Derivative Works -that You distribute, all copyright, patent, trademark, and -attribution notices from the Source form of the Work, -excluding those notices that do not pertain to any part of -the Derivative Works; and - -(d) If the Work includes a "NOTICE" text file as part of its -distribution, then any Derivative Works that You distribute must -include a readable copy of the attribution notices contained -within such NOTICE file, excluding those notices that do not -pertain to any part of the Derivative Works, in at least one -of the following places: within a NOTICE text file distributed -as part of the Derivative Works; within the Source form or -documentation, if provided along with the Derivative Works; or, -within a display generated by the Derivative Works, if and -wherever such third-party notices normally appear. The contents -of the NOTICE file are for informational purposes only and -do not modify the License. You may add Your own attribution -notices within Derivative Works that You distribute, alongside -or as an addendum to the NOTICE text from the Work, provided -that such additional attribution notices cannot be construed -as modifying the License. - -You may add Your own copyright statement to Your modifications and -may provide additional or different license terms and conditions -for use, reproduction, or distribution of Your modifications, or -for any such Derivative Works as a whole, provided Your use, -reproduction, and distribution of the Work otherwise complies with -the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, -any Contribution intentionally submitted for inclusion in the Work -by You to the Licensor shall be under the terms and conditions of -this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify -the terms of any separate license agreement you may have executed -with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade -names, trademarks, service marks, or product names of the Licensor, -except as required for reasonable and customary use in describing the -origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or -agreed to in writing, Licensor provides the Work (and each -Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied, including, without limitation, any warranties or conditions -of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A -PARTICULAR PURPOSE. You are solely responsible for determining the -appropriateness of using or redistributing the Work and assume any -risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, -whether in tort (including negligence), contract, or otherwise, -unless required by applicable law (such as deliberate and grossly -negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, -incidental, or consequential damages of any character arising as a -result of this License or out of the use or inability to use the -Work (including but not limited to damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all -other commercial damages or losses), even if such Contributor -has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing -the Work or Derivative Works thereof, You may choose to offer, -and charge a fee for, acceptance of support, warranty, indemnity, -or other liability obligations and/or rights consistent with this -License. However, in accepting such obligations, You may act only -on Your own behalf and on Your sole responsibility, not on behalf -of any other Contributor, and only if You agree to indemnify, -defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason -of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - -To apply the Apache License to your work, attach the following -boilerplate notice, with the fields enclosed by brackets "{}" -replaced with your own identifying information. (Don't include -the brackets!) The text should be enclosed in the appropriate -comment syntax for the file format. We also recommend that a -file or class name and description of purpose be included on the -same "printed page" as the copyright notice for easier -identification within third-party archives. - -Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/example/react/config.json b/example/react/config.json deleted file mode 100644 index ab7a58785..000000000 --- a/example/react/config.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "source": [ - "properties/**/*.json" - ], - "platforms": { - "reactNative": { - "transforms": ["attribute/cti","name/ti/constant","size/px"], - "buildPath": "react-native/StyleDictionaryExample/styleDictionary/", - "files": [ - { - "destination": "colors.js", - "format": "javascript/es6", - "filter": { - "attributes": { - "category": "color" - } - } - } - ] - }, - - "react": { - "transforms": ["attribute/cti", "name/ti/constant", "color/hex"], - "buildPath": "style-guide/src/styleDictionary/", - "files": [{ - "destination": "colors.js", - "format": "javascript/es6", - "filter": { - "attributes": { "category": "color" } - } - },{ - "destination": "sizes.js", - "format": "javascript/es6", - "filter": { - "attributes": { "category": "size" } - } - }] - }, - - "scss": { - "transformGroup": "scss", - "buildPath": "style-guide/src/styleDictionary/", - "files": [{ - "destination": "variables.scss", - "format": "scss/variables" - }], - "actions": ["copy_assets"] - } - } -} diff --git a/example/react/native/StyleDictionaryExample/.babelrc b/example/react/native/StyleDictionaryExample/.babelrc deleted file mode 100644 index 8df53fe43..000000000 --- a/example/react/native/StyleDictionaryExample/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ -"presets": ["react-native"] -} \ No newline at end of file diff --git a/example/react/native/StyleDictionaryExample/.buckconfig b/example/react/native/StyleDictionaryExample/.buckconfig deleted file mode 100644 index 934256cb2..000000000 --- a/example/react/native/StyleDictionaryExample/.buckconfig +++ /dev/null @@ -1,6 +0,0 @@ - -[android] - target = Google Inc.:Google APIs:23 - -[maven_repositories] - central = https://repo1.maven.org/maven2 diff --git a/example/react/native/StyleDictionaryExample/.flowconfig b/example/react/native/StyleDictionaryExample/.flowconfig deleted file mode 100644 index 3b261e22d..000000000 --- a/example/react/native/StyleDictionaryExample/.flowconfig +++ /dev/null @@ -1,58 +0,0 @@ -[ignore] - -# We fork some components by platform. -.*/*[.]android.js - -# Ignore templates with `@flow` in header -.*/local-cli/generator.* - -# Ignore malformed json -.*/node_modules/y18n/test/.*\.json - -# Ignore the website subdir -/website/.* - -# Ignore BUCK generated dirs -/\.buckd/ - -# Ignore unexpected extra @providesModule -.*/node_modules/commoner/test/source/widget/share.js - -# Ignore duplicate module providers -# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root -.*/Libraries/react-native/React.js -.*/Libraries/react-native/ReactNative.js -.*/node_modules/jest-runtime/build/__tests__/.* - -[include] - -[libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js -node_modules/react-native/flow -flow/ - -[options] -module.system=haste - -esproposal.class_static_fields=enable -esproposal.class_instance_fields=enable - -experimental.strict_type_args=true - -munge_underscores=true - -module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' -module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FixMe - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy - -unsafe.enable_getters_and_setters=true - -[version] -^0.33.0 diff --git a/example/react/native/StyleDictionaryExample/.gitignore b/example/react/native/StyleDictionaryExample/.gitignore deleted file mode 100644 index a8bffe7ad..000000000 --- a/example/react/native/StyleDictionaryExample/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# Style Dictionary -styleDictionary - -# OSX -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -project.xcworkspace - -# Android/IJ -# -*.iml -.idea -.gradle -local.properties - -# node.js -# -node_modules/ -npm-debug.log - -# BUCK -buck-out/ -\.buckd/ -android/app/libs -android/keystores/debug.keystore diff --git a/example/react/native/StyleDictionaryExample/.watchmanconfig b/example/react/native/StyleDictionaryExample/.watchmanconfig deleted file mode 100644 index 9e26dfeeb..000000000 --- a/example/react/native/StyleDictionaryExample/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/example/react/native/StyleDictionaryExample/android/app/BUCK b/example/react/native/StyleDictionaryExample/android/app/BUCK deleted file mode 100644 index 4e5238df0..000000000 --- a/example/react/native/StyleDictionaryExample/android/app/BUCK +++ /dev/null @@ -1,66 +0,0 @@ -import re - -# To learn about Buck see [Docs](https://buckbuild.com/). -# To run your application with Buck: -# - install Buck -# - `npm start` - to start the packager -# - `cd android` -# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` -# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck -# - `buck install -r android/app` - compile, install and run application -# - -lib_deps = [] -for jarfile in glob(['libs/*.jar']): - name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) - lib_deps.append(':' + name) - prebuilt_jar( - name = name, - binary_jar = jarfile, - ) - -for aarfile in glob(['libs/*.aar']): - name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) - lib_deps.append(':' + name) - android_prebuilt_aar( - name = name, - aar = aarfile, - ) - -android_library( - name = 'all-libs', - exported_deps = lib_deps -) - -android_library( - name = 'app-code', - srcs = glob([ - 'src/main/java/**/*.java', - ]), - deps = [ - ':all-libs', - ':build_config', - ':res', - ], -) - -android_build_config( - name = 'build_config', - package = 'com.styledictionaryexample', -) - -android_resource( - name = 'res', - res = 'src/main/res', - package = 'com.styledictionaryexample', -) - -android_binary( - name = 'app', - package_type = 'debug', - manifest = 'src/main/AndroidManifest.xml', - keystore = '//android/keystores:debug', - deps = [ - ':app-code', - ], -) diff --git a/example/react/native/StyleDictionaryExample/android/app/build.gradle b/example/react/native/StyleDictionaryExample/android/app/build.gradle deleted file mode 100644 index ae8fd59af..000000000 --- a/example/react/native/StyleDictionaryExample/android/app/build.gradle +++ /dev/null @@ -1,139 +0,0 @@ -apply plugin: "com.android.application" - -import com.android.build.OutputFile - -/** - * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets - * and bundleReleaseJsAndAssets). - * These basically call `react-native bundle` with the correct arguments during the Android build - * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the - * bundle directly from the development server. Below you can see all the possible configurations - * and their defaults. If you decide to add a configuration block, make sure to add it before the - * `apply from: "../../node_modules/react-native/react.gradle"` line. - * - * project.ext.react = [ - * // the name of the generated asset file containing your JS bundle - * bundleAssetName: "index.android.bundle", - * - * // the entry file for bundle generation - * entryFile: "index.android.js", - * - * // whether to bundle JS and assets in debug mode - * bundleInDebug: false, - * - * // whether to bundle JS and assets in release mode - * bundleInRelease: true, - * - * // whether to bundle JS and assets in another build variant (if configured). - * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants - * // The configuration property can be in the following formats - * // 'bundleIn${productFlavor}${buildType}' - * // 'bundleIn${buildType}' - * // bundleInFreeDebug: true, - * // bundleInPaidRelease: true, - * // bundleInBeta: true, - * - * // the root of your project, i.e. where "package.json" lives - * root: "../../", - * - * // where to put the JS bundle asset in debug mode - * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", - * - * // where to put the JS bundle asset in release mode - * jsBundleDirRelease: "$buildDir/intermediates/assets/release", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in debug mode - * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in release mode - * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", - * - * // by default the gradle tasks are skipped if none of the JS files or assets change; this means - * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to - * // date; if you have any other folders that you want to ignore for performance reasons (gradle - * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ - * // for example, you might want to remove it from here. - * inputExcludes: ["android/**", "ios/**"], - * - * // override which node gets called and with what additional arguments - * nodeExecutableAndArgs: ["node"] - * - * // supply additional arguments to the packager - * extraPackagerArgs: [] - * ] - */ - -apply from: "../../node_modules/react-native/react.gradle" - -/** - * Set this to true to create two separate APKs instead of one: - * - An APK that only works on ARM devices - * - An APK that only works on x86 devices - * The advantage is the size of the APK is reduced by about 4MB. - * Upload all the APKs to the Play Store and people will download - * the correct one based on the CPU architecture of their device. - */ -def enableSeparateBuildPerCPUArchitecture = false - -/** - * Run Proguard to shrink the Java bytecode in release builds. - */ -def enableProguardInReleaseBuilds = false - -android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" - - defaultConfig { - applicationId "com.styledictionaryexample" - minSdkVersion 16 - targetSdkVersion 22 - versionCode 1 - versionName "1.0" - ndk { - abiFilters "armeabi-v7a", "x86" - } - } - splits { - abi { - reset() - enable enableSeparateBuildPerCPUArchitecture - universalApk false // If true, also generate a universal APK - include "armeabi-v7a", "x86" - } - } - buildTypes { - release { - minifyEnabled enableProguardInReleaseBuilds - proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" - } - } - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits - def versionCodes = ["armeabi-v7a":1, "x86":2] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - versionCodes.get(abi) * 1048576 + defaultConfig.versionCode - } - } - } -} - -dependencies { - compile fileTree(dir: "libs", include: ["*.jar"]) - compile "com.android.support:appcompat-v7:23.0.1" - compile "com.facebook.react:react-native:+" // From node_modules -} - -// Run this once to be able to run the application with BUCK -// puts all compile dependencies into folder libs for BUCK to use -task copyDownloadableDepsToLibs(type: Copy) { - from configurations.compile - into 'libs' -} diff --git a/example/react/native/StyleDictionaryExample/android/app/proguard-rules.pro b/example/react/native/StyleDictionaryExample/android/app/proguard-rules.pro deleted file mode 100644 index 48361a901..000000000 --- a/example/react/native/StyleDictionaryExample/android/app/proguard-rules.pro +++ /dev/null @@ -1,66 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Disabling obfuscation is useful if you collect stack traces from production crashes -# (unless you are using a system that supports de-obfuscate the stack traces). --dontobfuscate - -# React Native - -# Keep our interfaces so they can be used by other ProGuard rules. -# See http://sourceforge.net/p/proguard/bugs/466/ --keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip --keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters --keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip - -# Do not strip any method/class that is annotated with @DoNotStrip --keep @com.facebook.proguard.annotations.DoNotStrip class * --keep @com.facebook.common.internal.DoNotStrip class * --keepclassmembers class * { - @com.facebook.proguard.annotations.DoNotStrip *; - @com.facebook.common.internal.DoNotStrip *; -} - --keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { - void set*(***); - *** get*(); -} - --keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } --keep class * extends com.facebook.react.bridge.NativeModule { *; } --keepclassmembers,includedescriptorclasses class * { native ; } --keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } --keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } --keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } - --dontwarn com.facebook.react.** - -# okhttp - --keepattributes Signature --keepattributes *Annotation* --keep class okhttp3.** { *; } --keep interface okhttp3.** { *; } --dontwarn okhttp3.** - -# okio - --keep class sun.misc.Unsafe { *; } --dontwarn java.nio.file.* --dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement --dontwarn okio.** diff --git a/example/react/native/StyleDictionaryExample/android/app/src/main/AndroidManifest.xml b/example/react/native/StyleDictionaryExample/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 324d9271c..000000000 --- a/example/react/native/StyleDictionaryExample/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/example/react/native/StyleDictionaryExample/android/app/src/main/java/com/styledictionaryexample/MainActivity.java b/example/react/native/StyleDictionaryExample/android/app/src/main/java/com/styledictionaryexample/MainActivity.java deleted file mode 100644 index 1f3f585e5..000000000 --- a/example/react/native/StyleDictionaryExample/android/app/src/main/java/com/styledictionaryexample/MainActivity.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.styledictionaryexample; - -import com.facebook.react.ReactActivity; - -public class MainActivity extends ReactActivity { - - /** - * Returns the name of the main component registered from JavaScript. - * This is used to schedule rendering of the component. - */ - @Override - protected String getMainComponentName() { - return "StyleDictionaryExample"; - } -} diff --git a/example/react/native/StyleDictionaryExample/android/app/src/main/java/com/styledictionaryexample/MainApplication.java b/example/react/native/StyleDictionaryExample/android/app/src/main/java/com/styledictionaryexample/MainApplication.java deleted file mode 100644 index 7e25a9d63..000000000 --- a/example/react/native/StyleDictionaryExample/android/app/src/main/java/com/styledictionaryexample/MainApplication.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.styledictionaryexample; - -import android.app.Application; -import android.util.Log; - -import com.facebook.react.ReactApplication; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.shell.MainReactPackage; - -import java.util.Arrays; -import java.util.List; - -public class MainApplication extends Application implements ReactApplication { - - private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { - @Override - protected boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } - - @Override - protected List getPackages() { - return Arrays.asList( - new MainReactPackage() - ); - } - }; - - @Override - public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; - } -} diff --git a/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index cde69bccc..000000000 Binary files a/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0cbd..000000000 Binary files a/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index bfa42f0e7..000000000 Binary files a/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 324e72cdd..000000000 Binary files a/example/react/native/StyleDictionaryExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/example/react/native/StyleDictionaryExample/android/app/src/main/res/values/strings.xml b/example/react/native/StyleDictionaryExample/android/app/src/main/res/values/strings.xml deleted file mode 100644 index 8eab0795f..000000000 --- a/example/react/native/StyleDictionaryExample/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - StyleDictionaryExample - diff --git a/example/react/native/StyleDictionaryExample/android/app/src/main/res/values/styles.xml b/example/react/native/StyleDictionaryExample/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 319eb0ca1..000000000 --- a/example/react/native/StyleDictionaryExample/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/example/react/native/StyleDictionaryExample/android/build.gradle b/example/react/native/StyleDictionaryExample/android/build.gradle deleted file mode 100644 index fcba4c587..000000000 --- a/example/react/native/StyleDictionaryExample/android/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - mavenLocal() - jcenter() - maven { - // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url "$rootDir/../node_modules/react-native/android" - } - } -} diff --git a/example/react/native/StyleDictionaryExample/android/gradle.properties b/example/react/native/StyleDictionaryExample/android/gradle.properties deleted file mode 100644 index 1fd964e90..000000000 --- a/example/react/native/StyleDictionaryExample/android/gradle.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -android.useDeprecatedNdk=true diff --git a/example/react/native/StyleDictionaryExample/android/gradle/wrapper/gradle-wrapper.jar b/example/react/native/StyleDictionaryExample/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index b5166dad4..000000000 Binary files a/example/react/native/StyleDictionaryExample/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/example/react/native/StyleDictionaryExample/android/gradle/wrapper/gradle-wrapper.properties b/example/react/native/StyleDictionaryExample/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index b9fbfaba0..000000000 --- a/example/react/native/StyleDictionaryExample/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip diff --git a/example/react/native/StyleDictionaryExample/android/gradlew b/example/react/native/StyleDictionaryExample/android/gradlew deleted file mode 100755 index 91a7e269e..000000000 --- a/example/react/native/StyleDictionaryExample/android/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/example/react/native/StyleDictionaryExample/android/gradlew.bat b/example/react/native/StyleDictionaryExample/android/gradlew.bat deleted file mode 100644 index 8a0b282aa..000000000 --- a/example/react/native/StyleDictionaryExample/android/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/example/react/native/StyleDictionaryExample/android/keystores/BUCK b/example/react/native/StyleDictionaryExample/android/keystores/BUCK deleted file mode 100644 index 15da20e6b..000000000 --- a/example/react/native/StyleDictionaryExample/android/keystores/BUCK +++ /dev/null @@ -1,8 +0,0 @@ -keystore( - name = 'debug', - store = 'debug.keystore', - properties = 'debug.keystore.properties', - visibility = [ - 'PUBLIC', - ], -) diff --git a/example/react/native/StyleDictionaryExample/android/keystores/debug.keystore.properties b/example/react/native/StyleDictionaryExample/android/keystores/debug.keystore.properties deleted file mode 100644 index 121bfb49f..000000000 --- a/example/react/native/StyleDictionaryExample/android/keystores/debug.keystore.properties +++ /dev/null @@ -1,4 +0,0 @@ -key.store=debug.keystore -key.alias=androiddebugkey -key.store.password=android -key.alias.password=android diff --git a/example/react/native/StyleDictionaryExample/android/settings.gradle b/example/react/native/StyleDictionaryExample/android/settings.gradle deleted file mode 100644 index deef8a423..000000000 --- a/example/react/native/StyleDictionaryExample/android/settings.gradle +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = 'StyleDictionaryExample' - -include ':app' diff --git a/example/react/native/StyleDictionaryExample/index.android.js b/example/react/native/StyleDictionaryExample/index.android.js deleted file mode 100644 index 0d10ca07e..000000000 --- a/example/react/native/StyleDictionaryExample/index.android.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * @flow - */ - -import React, { Component } from 'react'; -import { - AppRegistry, - StyleSheet, - Text, - View -} from 'react-native'; - -export default class StyleDictionaryExample extends Component { - render() { - return ( - - - Welcome to React Native! - - - To get started, edit index.android.js - - - Double tap R on your keyboard to reload,{'\n'} - Shake or press menu button for dev menu - - - ); - } -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#F5FCFF', - }, - welcome: { - fontSize: 20, - textAlign: 'center', - margin: 10, - }, - instructions: { - textAlign: 'center', - color: '#333333', - marginBottom: 5, - }, -}); - -AppRegistry.registerComponent('StyleDictionaryExample', () => StyleDictionaryExample); diff --git a/example/react/native/StyleDictionaryExample/index.ios.js b/example/react/native/StyleDictionaryExample/index.ios.js deleted file mode 100644 index 94b744ee3..000000000 --- a/example/react/native/StyleDictionaryExample/index.ios.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * @flow - */ - -import React, { Component } from 'react'; -import { - AppRegistry, - StyleSheet, - View -} from 'react-native'; -import * as COLORS from './styleDictionary/colors'; - -export default class StyleDictionaryExample extends Component { - render() { - const colors = Object.keys(COLORS); - return ( - - {colors.map((color) => { - return ( - - ); - })} - - ); - } -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: 'white', - }, - colorBox: { - flex: 1 - } -}); - -AppRegistry.registerComponent('StyleDictionaryExample', () => StyleDictionaryExample); diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample.xcodeproj/project.pbxproj b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample.xcodeproj/project.pbxproj deleted file mode 100644 index 531bf22fe..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,769 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; - 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; - 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; - 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; - 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; - 00E356F31AD99517003FC87E /* StyleDictionaryExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* StyleDictionaryExampleTests.m */; }; - 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; - 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; - 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; - 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTActionSheet; - }; - 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTGeolocation; - }; - 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5115D1A9E6B3D00147676; - remoteInfo = RCTImage; - }; - 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B511DB1A9E6C8500147676; - remoteInfo = RCTNetwork; - }; - 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; - remoteInfo = RCTVibration; - }; - 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 13B07F861A680F5B00A75B9A; - remoteInfo = StyleDictionaryExample; - }; - 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTSettings; - }; - 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3C86DF461ADF2C930047B81A; - remoteInfo = RCTWebSocket; - }; - 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; - remoteInfo = React; - }; - 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTLinking; - }; - 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5119B1A9E6C1200147676; - remoteInfo = RCTText; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = main.jsbundle; sourceTree = ""; }; - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = ../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj; sourceTree = ""; }; - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = ../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj; sourceTree = ""; }; - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj; sourceTree = ""; }; - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj; sourceTree = ""; }; - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = ../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj; sourceTree = ""; }; - 00E356EE1AD99517003FC87E /* StyleDictionaryExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StyleDictionaryExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* StyleDictionaryExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StyleDictionaryExampleTests.m; sourceTree = ""; }; - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = ../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj; sourceTree = ""; }; - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* StyleDictionaryExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StyleDictionaryExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = StyleDictionaryExample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = StyleDictionaryExample/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = StyleDictionaryExample/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = StyleDictionaryExample/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = StyleDictionaryExample/main.m; sourceTree = ""; }; - 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../node_modules/react-native/React/React.xcodeproj; sourceTree = ""; }; - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = ../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj; sourceTree = ""; }; - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../node_modules/react-native/Libraries/Text/RCTText.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00E356EB1AD99517003FC87E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 146834051AC3E58100842450 /* libReact.a in Frameworks */, - 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, - 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, - 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, - 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, - 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, - 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, - 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, - 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00C302A81ABCB8CE00DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302B61ABCB90400DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302BC1ABCB91800DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302D41ABCB9D200DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302E01ABCB9EE00DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, - ); - name = Products; - sourceTree = ""; - }; - 00E356EF1AD99517003FC87E /* StyleDictionaryExampleTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* StyleDictionaryExampleTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = StyleDictionaryExampleTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 139105B71AF99BAD00B5F7CC /* Products */ = { - isa = PBXGroup; - children = ( - 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, - ); - name = Products; - sourceTree = ""; - }; - 139FDEE71B06529A00C62182 /* Products */ = { - isa = PBXGroup; - children = ( - 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, - ); - name = Products; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* StyleDictionaryExample */ = { - isa = PBXGroup; - children = ( - 008F07F21AC5B25A0029DE68 /* main.jsbundle */, - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.m */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, - 13B07FB71A68108700A75B9A /* main.m */, - ); - name = StyleDictionaryExample; - sourceTree = ""; - }; - 146834001AC3E56700842450 /* Products */ = { - isa = PBXGroup; - children = ( - 146834041AC3E56700842450 /* libReact.a */, - ); - name = Products; - sourceTree = ""; - }; - 78C398B11ACF4ADC00677621 /* Products */ = { - isa = PBXGroup; - children = ( - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, - ); - name = Products; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - 146833FF1AC3E56700842450 /* React.xcodeproj */, - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, - ); - name = Libraries; - sourceTree = ""; - }; - 832341B11AAA6A8300B99B32 /* Products */ = { - isa = PBXGroup; - children = ( - 832341B51AAA6A8300B99B32 /* libRCTText.a */, - ); - name = Products; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* StyleDictionaryExample */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* StyleDictionaryExampleTests */, - 83CBBA001A601CBA00E9B192 /* Products */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* StyleDictionaryExample.app */, - 00E356EE1AD99517003FC87E /* StyleDictionaryExampleTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* StyleDictionaryExampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "StyleDictionaryExampleTests" */; - buildPhases = ( - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, - ); - name = StyleDictionaryExampleTests; - productName = StyleDictionaryExampleTests; - productReference = 00E356EE1AD99517003FC87E /* StyleDictionaryExampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 13B07F861A680F5B00A75B9A /* StyleDictionaryExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "StyleDictionaryExample" */; - buildPhases = ( - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = StyleDictionaryExample; - productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* StyleDictionaryExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = Facebook; - TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; - }; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "StyleDictionaryExample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; - ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; - }, - { - ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; - ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; - }, - { - ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; - ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - }, - { - ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; - ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - }, - { - ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; - ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - }, - { - ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; - ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - }, - { - ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; - ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - }, - { - ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; - ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; - }, - { - ProductGroup = 139FDEE71B06529A00C62182 /* Products */; - ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - }, - { - ProductGroup = 146834001AC3E56700842450 /* Products */; - ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* StyleDictionaryExample */, - 00E356ED1AD99517003FC87E /* StyleDictionaryExampleTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTActionSheet.a; - remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTGeolocation.a; - remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTImage.a; - remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTNetwork.a; - remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTVibration.a; - remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTSettings.a; - remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTWebSocket.a; - remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 146834041AC3E56700842450 /* libReact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libReact.a; - remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTLinking.a; - remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTText.a; - remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 00E356EC1AD99517003FC87E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; - showEnvVarsInLog = 1; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 00E356F31AD99517003FC87E /* StyleDictionaryExampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* StyleDictionaryExample */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = StyleDictionaryExample; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = StyleDictionaryExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StyleDictionaryExample.app/StyleDictionaryExample"; - }; - name = Debug; - }; - 00E356F71AD99517003FC87E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = StyleDictionaryExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StyleDictionaryExample.app/StyleDictionaryExample"; - }; - name = Release; - }; - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - DEAD_CODE_STRIPPING = NO; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - INFOPLIST_FILE = "StyleDictionaryExample/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_NAME = StyleDictionaryExample; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - INFOPLIST_FILE = "StyleDictionaryExample/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_NAME = StyleDictionaryExample; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "StyleDictionaryExampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "StyleDictionaryExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "StyleDictionaryExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample.xcodeproj/xcshareddata/xcschemes/StyleDictionaryExample.xcscheme b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample.xcodeproj/xcshareddata/xcschemes/StyleDictionaryExample.xcscheme deleted file mode 100644 index 718fd581e..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample.xcodeproj/xcshareddata/xcschemes/StyleDictionaryExample.xcscheme +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/AppDelegate.h b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/AppDelegate.h deleted file mode 100644 index a9654d5e0..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/AppDelegate.h +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (nonatomic, strong) UIWindow *window; - -@end diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/AppDelegate.m b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/AppDelegate.m deleted file mode 100644 index b3c2fdf0a..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/AppDelegate.m +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "AppDelegate.h" - -#import "RCTBundleURLProvider.h" -#import "RCTRootView.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - NSURL *jsCodeLocation; - - jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; - - RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation - moduleName:@"StyleDictionaryExample" - initialProperties:nil - launchOptions:launchOptions]; - rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; - return YES; -} - -@end diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/Base.lproj/LaunchScreen.xib b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/Base.lproj/LaunchScreen.xib deleted file mode 100644 index e770224be..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/Images.xcassets/AppIcon.appiconset/Contents.json b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f74..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/Info.plist b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/Info.plist deleted file mode 100644 index 2fb6a11c2..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/Info.plist +++ /dev/null @@ -1,54 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSLocationWhenInUseUsageDescription - - NSAppTransportSecurity - - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/main.m b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/main.m deleted file mode 100644 index 3d767fcbb..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExample/main.m +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExampleTests/Info.plist b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExampleTests/Info.plist deleted file mode 100644 index 886825ccc..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExampleTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExampleTests/StyleDictionaryExampleTests.m b/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExampleTests/StyleDictionaryExampleTests.m deleted file mode 100644 index 442a00fd7..000000000 --- a/example/react/native/StyleDictionaryExample/ios/StyleDictionaryExampleTests/StyleDictionaryExampleTests.m +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import -#import - -#import "RCTLog.h" -#import "RCTRootView.h" - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" - -@interface StyleDictionaryExampleTests : XCTestCase - -@end - -@implementation StyleDictionaryExampleTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; - RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - - RCTSetLogFunction(RCTDefaultLogFunction); - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - - -@end diff --git a/example/react/native/StyleDictionaryExample/package.json b/example/react/native/StyleDictionaryExample/package.json deleted file mode 100644 index 34c336cc4..000000000 --- a/example/react/native/StyleDictionaryExample/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "style-dictionary-example-react-native", - "version": "0.0.1", - "private": true, - "scripts": { - "start": "node node_modules/react-native/local-cli/cli.js start", - "test": "jest" - }, - "dependencies": { - "react": "15.3.2", - "react-native": "0.37.0" - }, - "jest": { - "preset": "jest-react-native" - }, - "devDependencies": { - "babel-jest": "17.0.2", - "babel-preset-react-native": "1.9.0", - "jest": "17.0.3", - "jest-react-native": "17.0.3", - "react-test-renderer": "15.3.2" - } -} diff --git a/example/react/properties/color/background.json b/example/react/properties/color/background.json deleted file mode 100644 index a08e3a1b4..000000000 --- a/example/react/properties/color/background.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "color": { - "background": { - "base": { "value":"{color.base.white.value}", "attributes":{"font":"base"} }, - "alt": { "value":"{color.base.blue_grey.100.value}", "attributes":{"font":"base"} }, - "disabled": { "value":"{color.base.blue_grey.100.value}", "attributes":{"font":"base"} }, - "inverse": { "value":"{color.base.blue_grey.900.value}", "attributes":{"font":"inverse"}}, - "success": { "value":"{color.base.green.600.value}", "attributes":{"font":"inverse"}}, - "error": { "value":"{color.base.red.600.value}", "attributes":{"font":"inverse"}}, - "warning": { "value":"{color.base.orange.800.value}", "attributes":{"font":"inverse"}}, - "info": { "value":"{color.base.light_blue.600.value}", "attributes":{"font":"inverse"}}, - "link": { "value":"{color.base.light_blue.600.value}", "attributes":{"font":"inverse"}}, - "low-priority": { "value":"{color.base.grey.600.value}", "attributes":{"font":"inverse"}}, - - "button": { - "primary": { - "base": { "value": "{color.brand.primary.base.value}" }, - "disabled": { "value": "{color.brand.primary.lighter.value}" }, - "active": { "value": "{color.brand.primary.dark.value}" } - }, - - "secondary": { - "base": { "value": "{color.background.base.value}" }, - "disabled": { "value": "{color.background.alt.value}" }, - "active": { "value": "{color.brand.secondary.dark.value}" } - } - } - } - } -} diff --git a/example/react/properties/color/base.json b/example/react/properties/color/base.json deleted file mode 100644 index 3f58f246a..000000000 --- a/example/react/properties/color/base.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "color": { - "base": { - "red": { - "50" : { "value": "#FFE5EE", "attributes": {"font": "base"}}, - "100" : { "value": "#FFCDD2", "attributes": {"font": "base"}}, - "200" : { "value": "#EF9A9A", "attributes": {"font": "base"}}, - "300" : { "value": "#E57373", "attributes": {"font": "base"}}, - "400" : { "value": "#EF5350", "attributes": {"font": "inverse"}}, - "500" : { "value": "#F44336", "attributes": {"font": "inverse"}}, - "600" : { "value": "#E53935", "attributes": {"font": "inverse"}}, - "700" : { "value": "#D32F2F", "attributes": {"font": "inverse"}}, - "800" : { "value": "#C62828", "attributes": {"font": "inverse"}}, - "900" : { "value": "#B71C1C", "attributes": {"font": "inverse"}}, - "A100": { "value": "#FF8A80", "attributes": {"font": "base"}}, - "A200": { "value": "#FF5252", "attributes": {"font": "inverse"}}, - "A400": { "value": "#FF1744", "attributes": {"font": "inverse"}}, - "A700": { "value": "#D50000", "attributes": {"font": "inverse"}} - }, - "pink": { - "50" : { "value": "#FCE4EC", "attributes": {"font": "base"}}, - "100" : { "value": "#F8BBD0", "attributes": {"font": "base"}}, - "200" : { "value": "#F48FB1", "attributes": {"font": "base"}}, - "300" : { "value": "#F06292", "attributes": {"font": "inverse"}}, - "400" : { "value": "#EC407A", "attributes": {"font": "inverse"}}, - "500" : { "value": "#E91E63", "attributes": {"font": "inverse"}}, - "600" : { "value": "#D81B60", "attributes": {"font": "inverse"}}, - "700" : { "value": "#C2185B", "attributes": {"font": "inverse"}}, - "800" : { "value": "#AD1457", "attributes": {"font": "inverse"}}, - "900" : { "value": "#880E4F", "attributes": {"font": "inverse"}}, - "A100": { "value": "#FF80AB", "attributes": {"font": "base"}}, - "A200": { "value": "#FF4081", "attributes": {"font": "inverse"}}, - "A400": { "value": "#F50057", "attributes": {"font": "inverse"}}, - "A700": { "value": "#C51162", "attributes": {"font": "inverse"}} - }, - "purple": { - "50" : { "value": "#F3E5F5", "attributes": {"font": "base"}}, - "100" : { "value": "#E1BEE7", "attributes": {"font": "base"}}, - "200" : { "value": "#CE93D8", "attributes": {"font": "base"}}, - "300" : { "value": "#BA68C8", "attributes": {"font": "inverse"}}, - "400" : { "value": "#AB47BC", "attributes": {"font": "inverse"}}, - "500" : { "value": "#9C27B0", "attributes": {"font": "inverse"}}, - "600" : { "value": "#8E24AA", "attributes": {"font": "inverse"}}, - "700" : { "value": "#7B1FA2", "attributes": {"font": "inverse"}}, - "800" : { "value": "#6A1B9A", "attributes": {"font": "inverse"}}, - "900" : { "value": "#4A148C", "attributes": {"font": "inverse"}}, - "A100": { "value": "#EA80FC", "attributes": {"font": "base"}}, - "A200": { "value": "#E040FB", "attributes": {"font": "inverse"}}, - "A400": { "value": "#D500F9", "attributes": {"font": "inverse"}}, - "A700": { "value": "#AA00FF", "attributes": {"font": "inverse"}} - }, - "deep_purple": { - "50" : { "value": "#EDE7F6", "attributes": {"font": "base"}}, - "100" : { "value": "#D1C4E9", "attributes": {"font": "base"}}, - "200" : { "value": "#B39DDB", "attributes": {"font": "base"}}, - "300" : { "value": "#9575CD", "attributes": {"font": "inverse"}}, - "400" : { "value": "#7E57C2", "attributes": {"font": "inverse"}}, - "500" : { "value": "#673AB7", "attributes": {"font": "inverse"}}, - "600" : { "value": "#5E35B1", "attributes": {"font": "inverse"}}, - "700" : { "value": "#512DA8", "attributes": {"font": "inverse"}}, - "800" : { "value": "#4527A0", "attributes": {"font": "inverse"}}, - "900" : { "value": "#311B92", "attributes": {"font": "inverse"}}, - "A100": { "value": "#B388FF", "attributes": {"font": "base"}}, - "A200": { "value": "#7C4DFF", "attributes": {"font": "inverse"}}, - "A400": { "value": "#651FFF", "attributes": {"font": "inverse"}}, - "A700": { "value": "#6200EA", "attributes": {"font": "inverse"}} - }, - "indigo": { - "50" : { "value": "#E8EAF6", "attributes": {"font": "base"}}, - "100" : { "value": "#C5CAE9", "attributes": {"font": "base"}}, - "200" : { "value": "#9FA8DA", "attributes": {"font": "base"}}, - "300" : { "value": "#7986CB", "attributes": {"font": "inverse"}}, - "400" : { "value": "#5C6BC0", "attributes": {"font": "inverse"}}, - "500" : { "value": "#3F51B5", "attributes": {"font": "inverse"}}, - "600" : { "value": "#3949AB", "attributes": {"font": "inverse"}}, - "700" : { "value": "#303F9F", "attributes": {"font": "inverse"}}, - "800" : { "value": "#283593", "attributes": {"font": "inverse"}}, - "900" : { "value": "#1A237E", "attributes": {"font": "inverse"}}, - "A100": { "value": "#8C9EFF", "attributes": {"font": "base"}}, - "A200": { "value": "#536DFE", "attributes": {"font": "inverse"}}, - "A400": { "value": "#3D5AFE", "attributes": {"font": "inverse"}}, - "A700": { "value": "#304FFE", "attributes": {"font": "inverse"}} - }, - "blue": { - "50" : { "value": "#E3F2FD", "attributes": {"font": "base"}}, - "100" : { "value": "#BBDEFB", "attributes": {"font": "base"}}, - "200" : { "value": "#90CAF9", "attributes": {"font": "base"}}, - "300" : { "value": "#64B5F6", "attributes": {"font": "base"}}, - "400" : { "value": "#42A5F5", "attributes": {"font": "inverse"}}, - "500" : { "value": "#2196F3", "attributes": {"font": "inverse"}}, - "600" : { "value": "#1E88E5", "attributes": {"font": "inverse"}}, - "700" : { "value": "#1976D2", "attributes": {"font": "inverse"}}, - "800" : { "value": "#1565C0", "attributes": {"font": "inverse"}}, - "900" : { "value": "#0D47A1", "attributes": {"font": "inverse"}}, - "A100": { "value": "#82B1FF", "attributes": {"font": "base"}}, - "A200": { "value": "#448AFF", "attributes": {"font": "inverse"}}, - "A400": { "value": "#2979FF", "attributes": {"font": "inverse"}}, - "A700": { "value": "#2962FF", "attributes": {"font": "inverse"}} - }, - "light_blue": { - "50" : { "value": "#E1F5FE", "attributes": {"font": "base"}}, - "100" : { "value": "#B3E5FC", "attributes": {"font": "base"}}, - "200" : { "value": "#81D4FA", "attributes": {"font": "base"}}, - "300" : { "value": "#4FC3F7", "attributes": {"font": "base"}}, - "400" : { "value": "#29B6F6", "attributes": {"font": "base"}}, - "500" : { "value": "#03A9F4", "attributes": {"font": "base"}}, - "600" : { "value": "#039BE5", "attributes": {"font": "inverse"}}, - "700" : { "value": "#0288D1", "attributes": {"font": "inverse"}}, - "800" : { "value": "#0277BD", "attributes": {"font": "inverse"}}, - "900" : { "value": "#01579B", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#80D8FF", "attributes": {"font": "base"}}, - "A200" : { "value": "#40C4FF", "attributes": {"font": "base"}}, - "A400" : { "value": "#00B0FF", "attributes": {"font": "base"}}, - "A700" : { "value": "#0091EA", "attributes": {"font": "inverse"}} - }, - "cyan": { - "50" : { "value": "#E0F7FA", "attributes": {"font": "base"}}, - "100" : { "value": "#B2EBF2", "attributes": {"font": "base"}}, - "200" : { "value": "#80DEEA", "attributes": {"font": "base"}}, - "300" : { "value": "#4DD0E1", "attributes": {"font": "base"}}, - "400" : { "value": "#26C6DA", "attributes": {"font": "base"}}, - "500" : { "value": "#00BCD4", "attributes": {"font": "base"}}, - "600" : { "value": "#00ACC1", "attributes": {"font": "base"}}, - "700" : { "value": "#0097A7", "attributes": {"font": "inverse"}}, - "800" : { "value": "#00838F", "attributes": {"font": "inverse"}}, - "900" : { "value": "#006064", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#84FFFF", "attributes": {"font": "base"}}, - "A200" : { "value": "#18FFFF", "attributes": {"font": "base"}}, - "A400" : { "value": "#00E5FF", "attributes": {"font": "base"}}, - "A700" : { "value": "#00B8D4", "attributes": {"font": "base"}} - }, - "teal": { - "50" : { "value": "#E0F2F1", "attributes": {"font": "base"}}, - "100" : { "value": "#B2DFDB", "attributes": {"font": "base"}}, - "200" : { "value": "#80CBC4", "attributes": {"font": "base"}}, - "300" : { "value": "#4DB6AC", "attributes": {"font": "base"}}, - "400" : { "value": "#26A69A", "attributes": {"font": "base"}}, - "500" : { "value": "#009688", "attributes": {"font": "inverse"}}, - "600" : { "value": "#00897B", "attributes": {"font": "inverse"}}, - "700" : { "value": "#00796B", "attributes": {"font": "inverse"}}, - "800" : { "value": "#00695C", "attributes": {"font": "inverse"}}, - "900" : { "value": "#004D40", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#A7FFEB", "attributes": {"font": "base"}}, - "A200" : { "value": "#64FFDA", "attributes": {"font": "base"}}, - "A400" : { "value": "#1DE9B6", "attributes": {"font": "base"}}, - "A700" : { "value": "#00BFA5", "attributes": {"font": "base"}} - }, - "green": { - "50" : { "value": "#E8F5E9", "attributes": {"font": "base"}}, - "100" : { "value": "#C8E6C9", "attributes": {"font": "base"}}, - "200" : { "value": "#A5D6A7", "attributes": {"font": "base"}}, - "300" : { "value": "#81C784", "attributes": {"font": "base"}}, - "400" : { "value": "#66BB6A", "attributes": {"font": "base"}}, - "500" : { "value": "#4CAF50", "attributes": {"font": "base"}}, - "600" : { "value": "#43A047", "attributes": {"font": "inverse"}}, - "700" : { "value": "#388E3C", "attributes": {"font": "inverse"}}, - "800" : { "value": "#2E7D32", "attributes": {"font": "inverse"}}, - "900" : { "value": "#1B5E20", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#B9F6CA", "attributes": {"font": "base"}}, - "A200" : { "value": "#69F0AE", "attributes": {"font": "base"}}, - "A400" : { "value": "#00E676", "attributes": {"font": "base"}}, - "A700" : { "value": "#00C853", "attributes": {"font": "base"}} - }, - "light_green": { - "50" : { "value": "#F1F8E9", "attributes": {"font": "base"}}, - "100" : { "value": "#DCEDC8", "attributes": {"font": "base"}}, - "200" : { "value": "#C5E1A5", "attributes": {"font": "base"}}, - "300" : { "value": "#AED581", "attributes": {"font": "base"}}, - "400" : { "value": "#9CCC65", "attributes": {"font": "base"}}, - "500" : { "value": "#8BC34A", "attributes": {"font": "base"}}, - "600" : { "value": "#7CB342", "attributes": {"font": "base"}}, - "700" : { "value": "#689F38", "attributes": {"font": "inverse"}}, - "800" : { "value": "#558B2F", "attributes": {"font": "inverse"}}, - "900" : { "value": "#33691E", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#CCFF90", "attributes": {"font": "base"}}, - "A200" : { "value": "#B2FF59", "attributes": {"font": "base"}}, - "A400" : { "value": "#76FF03", "attributes": {"font": "base"}}, - "A700" : { "value": "#64DD17", "attributes": {"font": "base"}} - }, - "lime": { - "50" : { "value": "#F9FBE7", "attributes": {"font": "base"}}, - "100" : { "value": "#F0F4C3", "attributes": {"font": "base"}}, - "200" : { "value": "#E6EE9C", "attributes": {"font": "base"}}, - "300" : { "value": "#DCE775", "attributes": {"font": "base"}}, - "400" : { "value": "#D4E157", "attributes": {"font": "base"}}, - "500" : { "value": "#CDDC39", "attributes": {"font": "base"}}, - "600" : { "value": "#C0CA33", "attributes": {"font": "base"}}, - "700" : { "value": "#AFB42B", "attributes": {"font": "base"}}, - "800" : { "value": "#9E9D24", "attributes": {"font": "base"}}, - "900" : { "value": "#827717", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#F4FF81", "attributes": {"font": "base"}}, - "A200" : { "value": "#EEFF41", "attributes": {"font": "base"}}, - "A400" : { "value": "#C6FF00", "attributes": {"font": "base"}}, - "A700" : { "value": "#AEEA00", "attributes": {"font": "base"}} - }, - "yellow": { - "50" : { "value": "#FFFDE7", "attributes": {"font": "base"}}, - "100" : { "value": "#FFF9C4", "attributes": {"font": "base"}}, - "200" : { "value": "#FFF59D", "attributes": {"font": "base"}}, - "300" : { "value": "#FFF176", "attributes": {"font": "base"}}, - "400" : { "value": "#FFEE58", "attributes": {"font": "base"}}, - "500" : { "value": "#FFEB3B", "attributes": {"font": "base"}}, - "600" : { "value": "#FDD835", "attributes": {"font": "base"}}, - "700" : { "value": "#FBC02D", "attributes": {"font": "base"}}, - "800" : { "value": "#F9A825", "attributes": {"font": "base"}}, - "900" : { "value": "#F57F17", "attributes": {"font": "base"}}, - "A100" : { "value": "#FFFF8D", "attributes": {"font": "base"}}, - "A200" : { "value": "#FFFF00", "attributes": {"font": "base"}}, - "A400" : { "value": "#FFEA00", "attributes": {"font": "base"}}, - "A700" : { "value": "#FFD600", "attributes": {"font": "base"}} - }, - "amber": { - "50" : { "value": "#FFF8E1", "attributes": {"font": "base"}}, - "100" : { "value": "#FFECB3", "attributes": {"font": "base"}}, - "200" : { "value": "#FFE082", "attributes": {"font": "base"}}, - "300" : { "value": "#FFD54F", "attributes": {"font": "base"}}, - "400" : { "value": "#FFCA28", "attributes": {"font": "base"}}, - "500" : { "value": "#FFC107", "attributes": {"font": "base"}}, - "600" : { "value": "#FFB300", "attributes": {"font": "base"}}, - "700" : { "value": "#FFA000", "attributes": {"font": "base"}}, - "800" : { "value": "#FF8F00", "attributes": {"font": "base"}}, - "900" : { "value": "#FF6F00", "attributes": {"font": "base"}}, - "A100" : { "value": "#FFE57F", "attributes": {"font": "base"}}, - "A200" : { "value": "#FFD740", "attributes": {"font": "base"}}, - "A400" : { "value": "#FFC400", "attributes": {"font": "base"}}, - "A700" : { "value": "#FFAB00", "attributes": {"font": "base"}} - }, - "orange": { - "50" : { "value": "#FFF3E0", "attributes": {"font": "base"}}, - "100" : { "value": "#FFE0B2", "attributes": {"font": "base"}}, - "200" : { "value": "#FFCC80", "attributes": {"font": "base"}}, - "300" : { "value": "#FFB74D", "attributes": {"font": "base"}}, - "400" : { "value": "#FFA726", "attributes": {"font": "base"}}, - "500" : { "value": "#FF9800", "attributes": {"font": "base"}}, - "600" : { "value": "#FB8C00", "attributes": {"font": "base"}}, - "700" : { "value": "#F57C00", "attributes": {"font": "base"}}, - "800" : { "value": "#EF6C00", "attributes": {"font": "inverse"}}, - "900" : { "value": "#E65100", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#FFD180", "attributes": {"font": "base"}}, - "A200" : { "value": "#FFAB40", "attributes": {"font": "base"}}, - "A400" : { "value": "#FF9100", "attributes": {"font": "base"}}, - "A700" : { "value": "#FF6D00", "attributes": {"font": "base"}} - }, - "deep_orange": { - "50" : { "value": "#FBE9E7", "attributes": {"font": "base"}}, - "100" : { "value": "#FFCCBC", "attributes": {"font": "base"}}, - "200" : { "value": "#FFAB91", "attributes": {"font": "base"}}, - "300" : { "value": "#FF8A65", "attributes": {"font": "base"}}, - "400" : { "value": "#FF7043", "attributes": {"font": "base"}}, - "500" : { "value": "#FF5722", "attributes": {"font": "inverse"}}, - "600" : { "value": "#F4511E", "attributes": {"font": "inverse"}}, - "700" : { "value": "#E64A19", "attributes": {"font": "inverse"}}, - "800" : { "value": "#D84315", "attributes": {"font": "inverse"}}, - "900" : { "value": "#BF360C", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#FF9E80", "attributes": {"font": "base"}}, - "A200" : { "value": "#FF6E40", "attributes": {"font": "base"}}, - "A400" : { "value": "#FF3D00", "attributes": {"font": "inverse"}}, - "A700" : { "value": "#DD2C00", "attributes": {"font": "inverse"}} - }, - "brown": { - "50" : { "value": "#EFEBE9", "attributes": {"font": "base"}}, - "100" : { "value": "#D7CCC8", "attributes": {"font": "base"}}, - "200" : { "value": "#BCAAA4", "attributes": {"font": "base"}}, - "300" : { "value": "#A1887F", "attributes": {"font": "inverse"}}, - "400" : { "value": "#8D6E63", "attributes": {"font": "inverse"}}, - "500" : { "value": "#795548", "attributes": {"font": "inverse"}}, - "600" : { "value": "#6D4C41", "attributes": {"font": "inverse"}}, - "700" : { "value": "#5D4037", "attributes": {"font": "inverse"}}, - "800" : { "value": "#4E342E", "attributes": {"font": "inverse"}}, - "900" : { "value": "#3E2723", "attributes": {"font": "inverse"}} - }, - "grey": { - "50" : { "value": "#FAFAFA", "attributes": {"font": "base"}}, - "100" : { "value": "#F5F5F5", "attributes": {"font": "base"}}, - "200" : { "value": "#EEEEEE", "attributes": {"font": "base"}}, - "300" : { "value": "#E0E0E0", "attributes": {"font": "base"}}, - "400" : { "value": "#BDBDBD", "attributes": {"font": "base"}}, - "500" : { "value": "#9E9E9E", "attributes": {"font": "base"}}, - "600" : { "value": "#757575", "attributes": {"font": "inverse"}}, - "700" : { "value": "#616161", "attributes": {"font": "inverse"}}, - "800" : { "value": "#424242", "attributes": {"font": "inverse"}}, - "900" : { "value": "#212121", "attributes": {"font": "inverse"}} - }, - "blue_grey": { - "50" : { "value": "#ECEFF1", "attributes": {"font": "base"}}, - "100" : { "value": "#CFD8DC", "attributes": {"font": "base"}}, - "200" : { "value": "#B0BEC5", "attributes": {"font": "base"}}, - "300" : { "value": "#90A4AE", "attributes": {"font": "base"}}, - "400" : { "value": "#78909C", "attributes": {"font": "inverse"}}, - "500" : { "value": "#607D8B", "attributes": {"font": "inverse"}}, - "600" : { "value": "#546E7A", "attributes": {"font": "inverse"}}, - "700" : { "value": "#455A64", "attributes": {"font": "inverse"}}, - "800" : { "value": "#37474F", "attributes": {"font": "inverse"}}, - "900" : { "value": "#263238", "attributes": {"font": "inverse"}} - }, - - "white": { "value": "#ffffff" }, - "black": { "value": "#000000" } - } - } -} diff --git a/example/react/properties/color/border.json b/example/react/properties/color/border.json deleted file mode 100644 index 9a3f84c33..000000000 --- a/example/react/properties/color/border.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "color": { - "border": { - "light": { "value": "{color.base.grey.200.value}" }, - "base": { "value": "{color.base.grey.300.value}" }, - "dark": { "value": "{color.base.grey.400.value}" }, - "focus": { "value": "{color.brand.primary.base.value}" }, - "error": { "value": "{color.base.red.600.value}" }, - "warning": { "value": "{color.base.orange.600.value}" }, - "success": { "value": "{color.base.green.600.value}" }, - - "button": { - "secondary": { - "base": { "value": "{color.border.base.value}" }, - "active": { "value": "{color.brand.secondary.dark.value}"}, - "disabled": { "value": "{color.border.light.value}" } - } - } - } - } -} diff --git a/example/react/properties/color/brand.json b/example/react/properties/color/brand.json deleted file mode 100644 index b91741057..000000000 --- a/example/react/properties/color/brand.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "color": { - "brand": { - "primary": { - "lighter": { "value": "{color.base.teal.100.value}" }, - "light": { "value": "{color.base.teal.300.value}" }, - "base": { "value": "{color.base.teal.500.value}" }, - "dark": { "value": "{color.base.teal.700.value}" }, - "darker": { "value": "{color.base.teal.900.value}" } - }, - - "secondary": { - "lighter": { "value": "{color.base.indigo.100.value}" }, - "light": { "value": "{color.base.indigo.300.value}" }, - "base": { "value": "{color.base.indigo.500.value}" }, - "dark": { "value": "{color.base.indigo.700.value}" }, - "darker": { "value": "{color.base.indigo.900.value}" } - } - } - } -} diff --git a/example/react/properties/color/chart.json b/example/react/properties/color/chart.json deleted file mode 100644 index 5414fcce4..000000000 --- a/example/react/properties/color/chart.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "color": { - "chart": { - "stacked": { - "base": { - "100": { "value":"{color.base.blue.100.value}" }, - "200": { "value":"{color.base.blue.200.value}" }, - "300": { "value":"{color.base.blue.300.value}" }, - "400": { "value":"{color.base.blue.400.value}" }, - "500": { "value":"{color.base.blue.500.value}" }, - "600": { "value":"{color.base.blue.600.value}" }, - "700": { "value":"{color.base.blue.700.value}" }, - "800": { "value":"{color.base.blue.800.value}" }, - "900": { "value":"{color.base.blue.900.value}" } - } - } - } - } -} diff --git a/example/react/properties/color/font.json b/example/react/properties/color/font.json deleted file mode 100644 index aa4c02d45..000000000 --- a/example/react/properties/color/font.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "color": { - "font": { - "base": { "value": "{color.base.grey.900.value}" }, - "secondary": { "value": "{color.base.grey.800.value}" }, - "tertiary": { "value": "{color.base.grey.600.value}" }, - "quaternary": { "value": "{color.base.grey.400.value}" }, - "link": { "value": "{color.brand.primary.base.value}" }, - "active": { "value": "{color.brand.secondary.base.value}" }, - "error": { "value": "{color.base.red.600.value}" }, - "warning": { "value": "{color.base.orange.800.value}" }, - "success": { "value": "{color.base.green.600.value}" }, - "disabled": { "value": "{color.font.secondary.value}" }, - - - "inverse": { - "base": { "value": "{color.base.white.value}" }, - "secondary": { "value": "{color.base.grey.100.value}" }, - "tertiary": { "value": "{color.base.grey.200.value}" }, - "quaternary": { "value": "{color.base.grey.400.value}" }, - "link": { "value": "{color.brand.primary.light.value}" }, - "active": { "value": "{color.brand.secondary.light.value}" }, - "error": { "value": "{color.base.red.400.value}" }, - "warning": { "value": "{color.base.orange.400.value}" }, - "success": { "value": "{color.base.green.400.value}" }, - "disabled": { "value": "{color.font.inverse.secondary.value}" } - }, - - "button": { - "primary": { "value":"{color.font.inverse.base.value}" }, - "secondary": { "value":"{color.font.link.value}" } - } - } - } -} diff --git a/example/react/properties/content/icon.json b/example/react/properties/content/icon.json deleted file mode 100644 index c36a3e920..000000000 --- a/example/react/properties/content/icon.json +++ /dev/null @@ -1,976 +0,0 @@ -{ - "content": { - "icon": { - "3d_rotation" : {"value": "3d_rotation"}, - "airline_seat_individual_suite" : {"value": "airline_seat_individual_suite"}, - "airline_seat_legroom_reduced" : {"value": "airline_seat_legroom_reduced"}, - "airline_seat_legroom_normal" : {"value": "airline_seat_legroom_normal"}, - "airline_seat_recline_normal" : {"value": "airline_seat_recline_normal"}, - "airline_seat_legroom_extra" : {"value": "airline_seat_legroom_extra"}, - "airline_seat_recline_extra" : {"value": "airline_seat_recline_extra"}, - "airline_seat_flat_angled" : {"value": "airline_seat_flat_angled"}, - "arrow_drop_down_circle" : {"value": "arrow_drop_down_circle"}, - "account_balance_wallet" : {"value": "account_balance_wallet"}, - "airplanemode_inactive" : {"value": "airplanemode_inactive"}, - "assignment_turned_in" : {"value": "assignment_turned_in"}, - "assignment_returned" : {"value": "assignment_returned"}, - "airplanemode_active" : {"value": "airplanemode_active"}, - "add_circle_outline" : {"value": "add_circle_outline"}, - "add_shopping_cart" : {"value": "add_shopping_cart"}, - "assignment_return" : {"value": "assignment_return"}, - "airline_seat_flat" : {"value": "airline_seat_flat"}, - "airplanemode_off" : {"value": "airplanemode_off"}, - "assignment_late" : {"value": "assignment_late"}, - "assistant_photo" : {"value": "assistant_photo"}, - "arrow_drop_down" : {"value": "arrow_drop_down"}, - "airplanemode_on" : {"value": "airplanemode_on"}, - "airport_shuttle" : {"value": "airport_shuttle"}, - "account_balance" : {"value": "account_balance"}, - "account_circle" : {"value": "account_circle"}, - "arrow_downward" : {"value": "arrow_downward"}, - "assignment_ind" : {"value": "assignment_ind"}, - "all_inclusive" : {"value": "all_inclusive"}, - "arrow_drop_up" : {"value": "arrow_drop_up"}, - "add_to_photos" : {"value": "add_to_photos"}, - "arrow_forward" : {"value": "arrow_forward"}, - "accessibility" : {"value": "accessibility"}, - "access_alarms" : {"value": "access_alarms"}, - "arrow_upward" : {"value": "arrow_upward"}, - "attach_money" : {"value": "attach_money"}, - "add_to_queue" : {"value": "add_to_queue"}, - "aspect_ratio" : {"value": "aspect_ratio"}, - "announcement" : {"value": "announcement"}, - "add_location" : {"value": "add_location"}, - "access_alarm" : {"value": "access_alarm"}, - "account_box" : {"value": "account_box"}, - "access_time" : {"value": "access_time"}, - "add_a_photo" : {"value": "add_a_photo"}, - "attach_file" : {"value": "attach_file"}, - "assignment" : {"value": "assignment"}, - "arrow_back" : {"value": "arrow_back"}, - "accessible" : {"value": "accessible"}, - "add_circle" : {"value": "add_circle"}, - "assessment" : {"value": "assessment"}, - "audiotrack" : {"value": "audiotrack"}, - "attachment" : {"value": "attachment"}, - "art_track" : {"value": "art_track"}, - "alarm_off" : {"value": "alarm_off"}, - "add_alert" : {"value": "add_alert"}, - "add_alarm" : {"value": "add_alarm"}, - "alarm_add" : {"value": "alarm_add"}, - "autorenew" : {"value": "autorenew"}, - "assistant" : {"value": "assistant"}, - "alarm_on" : {"value": "alarm_on"}, - "av_timer" : {"value": "av_timer"}, - "all_out" : {"value": "all_out"}, - "archive" : {"value": "archive"}, - "add_box" : {"value": "add_box"}, - "android" : {"value": "android"}, - "airplay" : {"value": "airplay"}, - "ac_unit" : {"value": "ac_unit"}, - "adjust" : {"value": "adjust"}, - "alarm" : {"value": "alarm"}, - "album" : {"value": "album"}, - "apps" : {"value": "apps"}, - "add" : {"value": "add"}, - "adb" : {"value": "adb"}, - "battery_charging_full" : {"value": "battery_charging_full"}, - "bluetooth_connected" : {"value": "bluetooth_connected"}, - "bluetooth_searching" : {"value": "bluetooth_searching"}, - "branding_watermark" : {"value": "branding_watermark"}, - "bluetooth_disabled" : {"value": "bluetooth_disabled"}, - "brightness_medium" : {"value": "brightness_medium"}, - "border_horizontal" : {"value": "border_horizontal"}, - "bookmark_outline" : {"value": "bookmark_outline"}, - "brightness_auto" : {"value": "brightness_auto"}, - "business_center" : {"value": "business_center"}, - "border_vertical" : {"value": "border_vertical"}, - "brightness_high" : {"value": "brightness_high"}, - "bluetooth_audio" : {"value": "bluetooth_audio"}, - "battery_unknown" : {"value": "battery_unknown"}, - "bookmark_border" : {"value": "bookmark_border"}, - "brightness_low" : {"value": "brightness_low"}, - "border_bottom" : {"value": "border_bottom"}, - "blur_circular" : {"value": "blur_circular"}, - "battery_alert" : {"value": "battery_alert"}, - "border_inner" : {"value": "border_inner"}, - "brightness_seven" : {"value": "brightness_7"}, - "border_color" : {"value": "border_color"}, - "border_clear" : {"value": "border_clear"}, - "brightness_six" : {"value": "brightness_6"}, - "brightness_five" : {"value": "brightness_5"}, - "brightness_four" : {"value": "brightness_4"}, - "brightness_three" : {"value": "brightness_3"}, - "brightness_two" : {"value": "brightness_2"}, - "brightness_one" : {"value": "brightness_1"}, - "bubble_chart" : {"value": "bubble_chart"}, - "broken_image" : {"value": "broken_image"}, - "beach_access" : {"value": "beach_access"}, - "border_style" : {"value": "border_style"}, - "battery_full" : {"value": "battery_full"}, - "border_right" : {"value": "border_right"}, - "border_outer" : {"value": "border_outer"}, - "blur_linear" : {"value": "blur_linear"}, - "border_left" : {"value": "border_left"}, - "battery_std" : {"value": "battery_std"}, - "border_top" : {"value": "border_top"}, - "border_all" : {"value": "border_all"}, - "bug_report" : {"value": "bug_report"}, - "burst_mode" : {"value": "burst_mode"}, - "bluetooth" : {"value": "bluetooth"}, - "backspace" : {"value": "backspace"}, - "beenhere" : {"value": "beenhere"}, - "bookmark" : {"value": "bookmark"}, - "blur_off" : {"value": "blur_off"}, - "business" : {"value": "business"}, - "blur_on" : {"value": "blur_on"}, - "backup" : {"value": "backup"}, - "brush" : {"value": "brush"}, - "build" : {"value": "build"}, - "block" : {"value": "block"}, - "book" : {"value": "book"}, - "control_point_duplicate" : {"value": "control_point_duplicate"}, - "check_box_outline_blank" : {"value": "check_box_outline_blank"}, - "collections_bookmark" : {"value": "collections_bookmark"}, - "call_missed_outgoing" : {"value": "call_missed_outgoing"}, - "chat_bubble_outline" : {"value": "chat_bubble_outline"}, - "center_focus_strong" : {"value": "center_focus_strong"}, - "confirmation_number" : {"value": "confirmation_number"}, - "chrome_reader_mode" : {"value": "chrome_reader_mode"}, - "create_new_folder" : {"value": "create_new_folder"}, - "center_focus_weak" : {"value": "center_focus_weak"}, - "confirmation_num" : {"value": "confirmation_num"}, - "card_membership" : {"value": "card_membership"}, - "cloud_download" : {"value": "cloud_download"}, - "change_history" : {"value": "change_history"}, - "closed_caption" : {"value": "closed_caption"}, - "compare_arrows" : {"value": "compare_arrows"}, - "cast_connected" : {"value": "cast_connected"}, - "child_friendly" : {"value": "child_friendly"}, - "camera_enhance" : {"value": "camera_enhance"}, - "call_to_action" : {"value": "call_to_action"}, - "crop_landscape" : {"value": "crop_landscape"}, - "control_point" : {"value": "control_point"}, - "content_paste" : {"value": "content_paste"}, - "card_giftcard" : {"value": "card_giftcard"}, - "contact_phone" : {"value": "contact_phone"}, - "crop_original" : {"value": "crop_original"}, - "call_received" : {"value": "call_received"}, - "crop_portrait" : {"value": "crop_portrait"}, - "contact_mail" : {"value": "contact_mail"}, - "cloud_upload" : {"value": "cloud_upload"}, - "camera_front" : {"value": "camera_front"}, - "content_copy" : {"value": "content_copy"}, - "cloud_circle" : {"value": "cloud_circle"}, - "check_circle" : {"value": "check_circle"}, - "card_travel" : {"value": "card_travel"}, - "crop_rotate" : {"value": "crop_rotate"}, - "collections" : {"value": "collections"}, - "camera_roll" : {"value": "camera_roll"}, - "camera_rear" : {"value": "camera_rear"}, - "chat_bubble" : {"value": "chat_bubble"}, - "content_cut" : {"value": "content_cut"}, - "cloud_queue" : {"value": "cloud_queue"}, - "crop_square" : {"value": "crop_square"}, - "credit_card" : {"value": "credit_card"}, - "call_missed" : {"value": "call_missed"}, - "child_care" : {"value": "child_care"}, - "call_split" : {"value": "call_split"}, - "color_lens" : {"value": "color_lens"}, - "cloud_done" : {"value": "cloud_done"}, - "camera_alt" : {"value": "camera_alt"}, - "call_merge" : {"value": "call_merge"}, - "clear_all" : {"value": "clear_all"}, - "crop_free" : {"value": "crop_free"}, - "crop_onesix_nine" : {"value": "crop_onesix_nine"}, - "check_box" : {"value": "check_box"}, - "copyright" : {"value": "copyright"}, - "cloud_off" : {"value": "cloud_off"}, - "call_made" : {"value": "call_made"}, - "contacts" : {"value": "contacts"}, - "colorize" : {"value": "colorize"}, - "crop_seven_five" : {"value": "crop_seven_five"}, - "crop_five_four" : {"value": "crop_five_four"}, - "crop_three_two" : {"value": "crop_three_two"}, - "crop_din" : {"value": "crop_din"}, - "computer" : {"value": "computer"}, - "call_end" : {"value": "call_end"}, - "compare" : {"value": "compare"}, - "comment" : {"value": "comment"}, - "cancel" : {"value": "cancel"}, - "casino" : {"value": "casino"}, - "create" : {"value": "create"}, - "aperture" : {"value": "aperture"}, - "cached" : {"value": "cached"}, - "cloud" : {"value": "cloud"}, - "clear" : {"value": "clear"}, - "class" : {"value": "class"}, - "check" : {"value": "check"}, - "close" : {"value": "close"}, - "crop" : {"value": "crop"}, - "chat" : {"value": "chat"}, - "code" : {"value": "code"}, - "call" : {"value": "call"}, - "cake" : {"value": "cake"}, - "cast" : {"value": "cast"}, - "do_not_disturb_off" : {"value": "do_not_disturb_off"}, - "do_not_disturb_alt" : {"value": "do_not_disturb_alt"}, - "directions_transit" : {"value": "directions_transit"}, - "directions_railway" : {"value": "directions_railway"}, - "directions_subway" : {"value": "directions_subway"}, - "do_not_disturb_on" : {"value": "do_not_disturb_on"}, - "dnd_forwardslash" : {"value": "dnd_forwardslash"}, - "directions_train" : {"value": "directions_train"}, - "directions_ferry" : {"value": "directions_ferry"}, - "directions_boat" : {"value": "directions_boat"}, - "directions_walk" : {"value": "directions_walk"}, - "directions_bike" : {"value": "directions_bike"}, - "developer_board" : {"value": "developer_board"}, - "desktop_windows" : {"value": "desktop_windows"}, - "directions_run" : {"value": "directions_run"}, - "directions_car" : {"value": "directions_car"}, - "developer_mode" : {"value": "developer_mode"}, - "directions_bus" : {"value": "directions_bus"}, - "do_not_disturb" : {"value": "do_not_disturb"}, - "delete_forever" : {"value": "delete_forever"}, - "devices_other" : {"value": "devices_other"}, - "delete_sweep" : {"value": "delete_sweep"}, - "donut_small" : {"value": "donut_small"}, - "desktop_mac" : {"value": "desktop_mac"}, - "description" : {"value": "description"}, - "donut_large" : {"value": "donut_large"}, - "drag_handle" : {"value": "drag_handle"}, - "directions" : {"value": "directions"}, - "device_hub" : {"value": "device_hub"}, - "dialer_sip" : {"value": "dialer_sip"}, - "date_range" : {"value": "date_range"}, - "data_usage" : {"value": "data_usage"}, - "drive_eta" : {"value": "drive_eta"}, - "disc_full" : {"value": "disc_full"}, - "dashboard" : {"value": "dashboard"}, - "done_all" : {"value": "done_all"}, - "details" : {"value": "details"}, - "devices" : {"value": "devices"}, - "dialpad" : {"value": "dialpad"}, - "dehaze" : {"value": "dehaze"}, - "domain" : {"value": "domain"}, - "drafts" : {"value": "drafts"}, - "delete" : {"value": "delete"}, - "done" : {"value": "done"}, - "dock" : {"value": "dock"}, - "dns" : {"value": "dns"}, - "dvr" : {"value": "dvr"}, - "enhance_photo_translate" : {"value": "enhance_photo_translate"}, - "enhanced_encryption" : {"value": "enhanced_encryption"}, - "exposure_minus_two" : {"value": "exposure_minus_two"}, - "exposure_minus_one" : {"value": "exposure_minus_one"}, - "event_available" : {"value": "event_available"}, - "exposure_plus_two" : {"value": "exposure_plus_two"}, - "exposure_plus_one" : {"value": "exposure_plus_one"}, - "exposure_neg_two" : {"value": "exposure_neg_two"}, - "exposure_neg_one" : {"value": "exposure_neg_one"}, - "exposure_zero" : {"value": "exposure_zero"}, - "edit_location" : {"value": "edit_location"}, - "error_outline" : {"value": "error_outline"}, - "expand_less" : {"value": "expand_less"}, - "exit_to_app" : {"value": "exit_to_app"}, - "expand_more" : {"value": "expand_more"}, - "euro_symbol" : {"value": "euro_symbol"}, - "event_busy" : {"value": "event_busy"}, - "event_seat" : {"value": "event_seat"}, - "ev_station" : {"value": "ev_station"}, - "event_note" : {"value": "event_note"}, - "equalizer" : {"value": "equalizer"}, - "extension" : {"value": "extension"}, - "exposure" : {"value": "exposure"}, - "explicit" : {"value": "explicit"}, - "explore" : {"value": "explore"}, - "email_fill" : {"value": "email_fill"}, - "eject" : {"value": "eject"}, - "event" : {"value": "event"}, - "error" : {"value": "error"}, - "edit" : {"value": "edit"}, - "format_textdirection_r_to_l" : {"value": "format_textdirection_r_to_l"}, - "format_textdirection_l_to_r" : {"value": "format_textdirection_l_to_r"}, - "format_indent_increase" : {"value": "format_indent_increase"}, - "format_indent_decrease" : {"value": "format_indent_decrease"}, - "format_list_bulleted" : {"value": "format_list_bulleted"}, - "format_strikethrough" : {"value": "format_strikethrough"}, - "format_list_numbered" : {"value": "format_list_numbered"}, - "format_align_justify" : {"value": "format_align_justify"}, - "format_line_spacing" : {"value": "format_line_spacing"}, - "format_align_center" : {"value": "format_align_center"}, - "filter_center_focus" : {"value": "filter_center_focus"}, - "fiber_manual_record" : {"value": "fiber_manual_record"}, - "format_color_reset" : {"value": "format_color_reset"}, - "fiber_smart_record" : {"value": "fiber_smart_record"}, - "format_align_right" : {"value": "format_align_right"}, - "featured_play_list" : {"value": "featured_play_list"}, - "filter_tilt_shift" : {"value": "filter_tilt_shift"}, - "format_color_text" : {"value": "format_color_text"}, - "format_align_left" : {"value": "format_align_left"}, - "format_underlined" : {"value": "format_underlined"}, - "format_color_fill" : {"value": "format_color_fill"}, - "format_underline" : {"value": "format_underline"}, - "favorite_outline" : {"value": "favorite_outline"}, - "favorite_border" : {"value": "favorite_border"}, - "fullscreen_exit" : {"value": "fullscreen_exit"}, - "filter_b_and_w" : {"value": "filter_b_and_w"}, - "flight_takeoff" : {"value": "flight_takeoff"}, - "fitness_center" : {"value": "fitness_center"}, - "featured_video" : {"value": "featured_video"}, - "filter_vintage" : {"value": "filter_vintage"}, - "free_breakfast" : {"value": "free_breakfast"}, - "folder_special" : {"value": "folder_special"}, - "filter_nine_plus" : {"value": "filter_nine_plus"}, - "file_download" : {"value": "file_download"}, - "font_download" : {"value": "font_download"}, - "format_italic" : {"value": "format_italic"}, - "folder_shared" : {"value": "folder_shared"}, - "filter_frames" : {"value": "filter_frames"}, - "flip_to_front" : {"value": "flip_to_front"}, - "format_shapes" : {"value": "format_shapes"}, - "format_quote" : {"value": "format_quote"}, - "flip_to_back" : {"value": "flip_to_back"}, - "format_clear" : {"value": "format_clear"}, - "filter_drama" : {"value": "filter_drama"}, - "format_paint" : {"value": "format_paint"}, - "find_replace" : {"value": "find_replace"}, - "find_in_page" : {"value": "find_in_page"}, - "fast_forward" : {"value": "fast_forward"}, - "filter_none" : {"value": "filter_none"}, - "filter_list" : {"value": "filter_list"}, - "fingerprint" : {"value": "fingerprint"}, - "format_size" : {"value": "format_size"}, - "folder_open" : {"value": "folder_open"}, - "flight_land" : {"value": "flight_land"}, - "format_bold" : {"value": "format_bold"}, - "fast_rewind" : {"value": "fast_rewind"}, - "file_upload" : {"value": "file_upload"}, - "fullscreen" : {"value": "fullscreen"}, - "forward_threezero" : {"value": "forward_threezero"}, - "filter_hdr" : {"value": "filter_hdr"}, - "flash_auto" : {"value": "flash_auto"}, - "forward_onezero" : {"value": "forward_onezero"}, - "first_page" : {"value": "first_page"}, - "flash_off" : {"value": "flash_off"}, - "functions" : {"value": "functions"}, - "fiber_pin" : {"value": "fiber_pin"}, - "fiber_new" : {"value": "fiber_new"}, - "forward_five" : {"value": "forward_five"}, - "fiber_dvr" : {"value": "fiber_dvr"}, - "filter_seven" : {"value": "filter_seven"}, - "filter_six" : {"value": "filter_six"}, - "filter_five" : {"value": "filter_five"}, - "filter_four" : {"value": "filter_four"}, - "feedback" : {"value": "feedback"}, - "filter_three" : {"value": "filter_three"}, - "filter_two" : {"value": "filter_two"}, - "filter_one" : {"value": "filter_one"}, - "flash_on" : {"value": "flash_on"}, - "favorite" : {"value": "favorite"}, - "filter_nine" : {"value": "filter_nine"}, - "filter_eight" : {"value": "filter_eight"}, - "forward" : {"value": "forward"}, - "flight" : {"value": "flight"}, - "folder" : {"value": "folder"}, - "camera_filter" : {"value": "camera_filter"}, - "forum" : {"value": "forum"}, - "flare" : {"value": "flare"}, - "flip" : {"value": "flip"}, - "flag" : {"value": "flag"}, - "face" : {"value": "face"}, - "gps_not_fixed" : {"value": "gps_not_fixed"}, - "golf_course" : {"value": "golf_course"}, - "g_translate" : {"value": "g_translate"}, - "graphic_eq" : {"value": "graphic_eq"}, - "group_work" : {"value": "group_work"}, - "group_add" : {"value": "group_add"}, - "gps_fixed" : {"value": "gps_fixed"}, - "grid_off" : {"value": "grid_off"}, - "gradient" : {"value": "gradient"}, - "grid_on" : {"value": "grid_on"}, - "get_app" : {"value": "get_app"}, - "gesture" : {"value": "gesture"}, - "gamepad" : {"value": "gamepad"}, - "gps_off" : {"value": "gps_off"}, - "grade" : {"value": "grade"}, - "gavel" : {"value": "gavel"}, - "games" : {"value": "games"}, - "grain" : {"value": "grain"}, - "group" : {"value": "group"}, - "gif" : {"value": "gif"}, - "highlight_remove" : {"value": "highlight_remove"}, - "hourglass_empty" : {"value": "hourglass_empty"}, - "hourglass_full" : {"value": "hourglass_full"}, - "highlight_off" : {"value": "highlight_off"}, - "high_quality" : {"value": "high_quality"}, - "help_outline" : {"value": "help_outline"}, - "headset_mic" : {"value": "headset_mic"}, - "hdr_strong" : {"value": "hdr_strong"}, - "highlight" : {"value": "highlight"}, - "hdr_weak" : {"value": "hdr_weak"}, - "healing" : {"value": "healing"}, - "history" : {"value": "history"}, - "headset" : {"value": "headset"}, - "hot_tub" : {"value": "hot_tub"}, - "hearing" : {"value": "hearing"}, - "hdr_off" : {"value": "hdr_off"}, - "hdr_on" : {"value": "hdr_on"}, - "hotel" : {"value": "hotel"}, - "https" : {"value": "https"}, - "help" : {"value": "help"}, - "http" : {"value": "http"}, - "home" : {"value": "home"}, - "hd" : {"value": "hd"}, - "indeterminate_check_box" : {"value": "indeterminate_check_box"}, - "image_aspect_ratio" : {"value": "image_aspect_ratio"}, - "insert_drive_file" : {"value": "insert_drive_file"}, - "invert_colors_off" : {"value": "invert_colors_off"}, - "important_devices" : {"value": "important_devices"}, - "insert_invitation" : {"value": "insert_invitation"}, - "invert_colors_on" : {"value": "invert_colors_on"}, - "import_contacts" : {"value": "import_contacts"}, - "insert_emoticon" : {"value": "insert_emoticon"}, - "insert_comment" : {"value": "insert_comment"}, - "invert_colors" : {"value": "invert_colors"}, - "import_export" : {"value": "import_export"}, - "info_outline" : {"value": "info_outline"}, - "insert_photo" : {"value": "insert_photo"}, - "insert_chart" : {"value": "insert_chart"}, - "insert_link" : {"value": "insert_link"}, - "input" : {"value": "input"}, - "inbox" : {"value": "inbox"}, - "image" : {"value": "image"}, - "iso" : {"value": "iso"}, - "keyboard_arrow_right" : {"value": "keyboard_arrow_right"}, - "keyboard_arrow_left" : {"value": "keyboard_arrow_left"}, - "keyboard_arrow_down" : {"value": "keyboard_arrow_down"}, - "keyboard_backspace" : {"value": "keyboard_backspace"}, - "keyboard_arrow_up" : {"value": "keyboard_arrow_up"}, - "keyboard_capslock" : {"value": "keyboard_capslock"}, - "keyboard_control" : {"value": "keyboard_control"}, - "keyboard_return" : {"value": "keyboard_return"}, - "keyboard_voice" : {"value": "keyboard_voice"}, - "keyboard_hide" : {"value": "keyboard_hide"}, - "keyboard_tab" : {"value": "keyboard_tab"}, - "keyboard" : {"value": "keyboard"}, - "kitchen" : {"value": "kitchen"}, - "local_convenience_store" : {"value": "local_convenience_store"}, - "local_laundry_service" : {"value": "local_laundry_service"}, - "local_grocery_store" : {"value": "local_grocery_store"}, - "location_searching" : {"value": "location_searching"}, - "local_post_office" : {"value": "local_post_office"}, - "local_gas_station" : {"value": "local_gas_station"}, - "location_disabled" : {"value": "location_disabled"}, - "lightbulb_outline" : {"value": "lightbulb_outline"}, - "laptop_chromebook" : {"value": "laptop_chromebook"}, - "location_history" : {"value": "location_history"}, - "local_attraction" : {"value": "local_attraction"}, - "local_print_shop" : {"value": "local_print_shop"}, - "local_restaurant" : {"value": "local_restaurant"}, - "local_printshop" : {"value": "local_printshop"}, - "local_car_wash" : {"value": "local_car_wash"}, - "local_activity" : {"value": "local_activity"}, - "local_shipping" : {"value": "local_shipping"}, - "local_hospital" : {"value": "local_hospital"}, - "laptop_windows" : {"value": "laptop_windows"}, - "local_pharmacy" : {"value": "local_pharmacy"}, - "local_florist" : {"value": "local_florist"}, - "local_parking" : {"value": "local_parking"}, - "linked_camera" : {"value": "linked_camera"}, - "local_library" : {"value": "local_library"}, - "library_music" : {"value": "library_music"}, - "library_books" : {"value": "library_books"}, - "location_city" : {"value": "location_city"}, - "local_airport" : {"value": "local_airport"}, - "label_outline" : {"value": "label_outline"}, - "location_off" : {"value": "location_off"}, - "lock_outline" : {"value": "lock_outline"}, - "local_dining" : {"value": "local_dining"}, - "layers_clear" : {"value": "layers_clear"}, - "low_priority" : {"value": "low_priority"}, - "local_movies" : {"value": "local_movies"}, - "linear_scale" : {"value": "linear_scale"}, - "location_on" : {"value": "location_on"}, - "local_pizza" : {"value": "local_pizza"}, - "local_drink" : {"value": "local_drink"}, - "library_add" : {"value": "library_add"}, - "leak_remove" : {"value": "leak_remove"}, - "local_hotel" : {"value": "local_hotel"}, - "local_offer" : {"value": "local_offer"}, - "local_phone" : {"value": "local_phone"}, - "line_weight" : {"value": "line_weight"}, - "line_style" : {"value": "line_style"}, - "local_mall" : {"value": "local_mall"}, - "local_cafe" : {"value": "local_cafe"}, - "laptop_mac" : {"value": "laptop_mac"}, - "local_taxi" : {"value": "local_taxi"}, - "local_play" : {"value": "local_play"}, - "local_see" : {"value": "local_see"}, - "local_bar" : {"value": "local_bar"}, - "local_atm" : {"value": "local_atm"}, - "last_page" : {"value": "last_page"}, - "looks_two" : {"value": "looks_two"}, - "lock_open" : {"value": "lock_open"}, - "looks_one" : {"value": "looks_one"}, - "landscape" : {"value": "landscape"}, - "live_help" : {"value": "live_help"}, - "leak_add" : {"value": "leak_add"}, - "language" : {"value": "language"}, - "loyalty" : {"value": "loyalty"}, - "looks_six" : {"value": "looks_six"}, - "looks_five" : {"value": "looks_five"}, - "looks_four" : {"value": "looks_four"}, - "live_tv" : {"value": "live_tv"}, - "looks_three" : {"value": "looks_three"}, - "layers" : {"value": "layers"}, - "launch" : {"value": "launch"}, - "laptop" : {"value": "laptop"}, - "loupe" : {"value": "loupe"}, - "looks" : {"value": "looks"}, - "label" : {"value": "label"}, - "lens" : {"value": "lens"}, - "link" : {"value": "link"}, - "loop" : {"value": "loop"}, - "lock" : {"value": "lock"}, - "markunread_mailbox" : {"value": "markunread_mailbox"}, - "monochrome_photos" : {"value": "monochrome_photos"}, - "messenger_outline" : {"value": "messenger_outline"}, - "my_library_books" : {"value": "my_library_books"}, - "multitrack_audio" : {"value": "multitrack_audio"}, - "my_library_music" : {"value": "my_library_music"}, - "monetization_on" : {"value": "monetization_on"}, - "multiline_chart" : {"value": "multiline_chart"}, - "movie_creation" : {"value": "movie_creation"}, - "my_library_add" : {"value": "my_library_add"}, - "move_to_inbox" : {"value": "move_to_inbox"}, - "mail_outline" : {"value": "mail_outline"}, - "mode_comment" : {"value": "mode_comment"}, - "movie_filter" : {"value": "movie_filter"}, - "my_location" : {"value": "my_location"}, - "music_video" : {"value": "music_video"}, - "more_horiz" : {"value": "more_horiz"}, - "merge_type" : {"value": "merge_type"}, - "music_note" : {"value": "music_note"}, - "markunread" : {"value": "markunread"}, - "motorcycle" : {"value": "motorcycle"}, - "more_vert" : {"value": "more_vert"}, - "mode_edit" : {"value": "mode_edit"}, - "money_off" : {"value": "money_off"}, - "messenger" : {"value": "messenger"}, - "mood_bad" : {"value": "mood_bad"}, - "mic_none" : {"value": "mic_none"}, - "mic_off" : {"value": "mic_off"}, - "message" : {"value": "message"}, - "memory" : {"value": "memory"}, - "mouse" : {"value": "mouse"}, - "movie" : {"value": "movie"}, - "mood" : {"value": "mood"}, - "mail" : {"value": "mail"}, - "more" : {"value": "more"}, - "menu" : {"value": "menu"}, - "map" : {"value": "map"}, - "mms" : {"value": "mms"}, - "mic" : {"value": "mic"}, - "notifications_paused" : {"value": "notifications_paused"}, - "notifications_active" : {"value": "notifications_active"}, - "notifications_none" : {"value": "notifications_none"}, - "notifications_off" : {"value": "notifications_off"}, - "notifications_on" : {"value": "notifications_on"}, - "navigate_before" : {"value": "navigate_before"}, - "network_locked" : {"value": "network_locked"}, - "not_interested" : {"value": "not_interested"}, - "no_encryption" : {"value": "no_encryption"}, - "notifications" : {"value": "notifications"}, - "network_check" : {"value": "network_check"}, - "navigate_next" : {"value": "navigate_next"}, - "now_wallpaper" : {"value": "now_wallpaper"}, - "nature_people" : {"value": "nature_people"}, - "new_releases" : {"value": "new_releases"}, - "network_wifi" : {"value": "network_wifi"}, - "network_cell" : {"value": "network_cell"}, - "now_widgets" : {"value": "now_widgets"}, - "navigation" : {"value": "navigation"}, - "next_week" : {"value": "next_week"}, - "note_add" : {"value": "note_add"}, - "near_me" : {"value": "near_me"}, - "no_sim" : {"value": "no_sim"}, - "nature" : {"value": "nature"}, - "note" : {"value": "note"}, - "nfc" : {"value": "nfc"}, - "open_in_browser" : {"value": "open_in_browser"}, - "ondemand_video" : {"value": "ondemand_video"}, - "open_in_new" : {"value": "open_in_new"}, - "offline_pin" : {"value": "offline_pin"}, - "open_with" : {"value": "open_with"}, - "opacity" : {"value": "opacity"}, - "photo_size_select_actual" : {"value": "photo_size_select_actual"}, - "photo_size_select_large" : {"value": "photo_size_select_large"}, - "photo_size_select_small" : {"value": "photo_size_select_small"}, - "phone_bluetooth_speaker" : {"value": "phone_bluetooth_speaker"}, - "perm_device_information" : {"value": "perm_device_information"}, - "picture_in_picture_alt" : {"value": "picture_in_picture_alt"}, - "perm_contact_calendar" : {"value": "perm_contact_calendar"}, - "pause_circle_outline" : {"value": "pause_circle_outline"}, - "play_circle_outline" : {"value": "play_circle_outline"}, - "pause_circle_filled" : {"value": "pause_circle_filled"}, - "panorama_wide_angle" : {"value": "panorama_wide_angle"}, - "panorama_horizontal" : {"value": "panorama_horizontal"}, - "power_settings_new" : {"value": "power_settings_new"}, - "play_circle_filled" : {"value": "play_circle_filled"}, - "pie_chart_outlined" : {"value": "pie_chart_outlined"}, - "playlist_add_check" : {"value": "playlist_add_check"}, - "picture_in_picture" : {"value": "picture_in_picture"}, - "perm_data_setting" : {"value": "perm_data_setting"}, - "person_pin_circle" : {"value": "person_pin_circle"}, - "panorama_vertical" : {"value": "panorama_vertical"}, - "portable_wifi_off" : {"value": "portable_wifi_off"}, - "panorama_fish_eye" : {"value": "panorama_fish_eye"}, - "play_circle_fill" : {"value": "play_circle_fill"}, - "perm_device_info" : {"value": "perm_device_info"}, - "perm_contact_cal" : {"value": "perm_contact_cal"}, - "panorama_fisheye" : {"value": "panorama_fisheye"}, - "perm_camera_mic" : {"value": "perm_camera_mic"}, - "phonelink_erase" : {"value": "phonelink_erase"}, - "phone_forwarded" : {"value": "phone_forwarded"}, - "phonelink_setup" : {"value": "phonelink_setup"}, - "personal_video" : {"value": "personal_video"}, - "phonelink_ring" : {"value": "phonelink_ring"}, - "people_outline" : {"value": "people_outline"}, - "person_outline" : {"value": "person_outline"}, - "perm_scan_wifi" : {"value": "perm_scan_wifi"}, - "perm_phone_msg" : {"value": "perm_phone_msg"}, - "phonelink_lock" : {"value": "phonelink_lock"}, - "present_to_all" : {"value": "present_to_all"}, - "picture_as_pdf" : {"value": "picture_as_pdf"}, - "pregnant_woman" : {"value": "pregnant_woman"}, - "priority_high" : {"value": "priority_high"}, - "perm_identity" : {"value": "perm_identity"}, - "play_for_work" : {"value": "play_for_work"}, - "phone_android" : {"value": "phone_android"}, - "phonelink_off" : {"value": "phonelink_off"}, - "playlist_play" : {"value": "playlist_play"}, - "photo_library" : {"value": "photo_library"}, - "phone_in_talk" : {"value": "phone_in_talk"}, - "phone_paused" : {"value": "phone_paused"}, - "phone_missed" : {"value": "phone_missed"}, - "phone_locked" : {"value": "phone_locked"}, - "phone_iphone" : {"value": "phone_iphone"}, - "photo_camera" : {"value": "photo_camera"}, - "playlist_add" : {"value": "playlist_add"}, - "photo_filter" : {"value": "photo_filter"}, - "photo_album" : {"value": "photo_album"}, - "power_input" : {"value": "power_input"}, - "play_arrow" : {"value": "play_arrow"}, - "perm_media" : {"value": "perm_media"}, - "person_add" : {"value": "person_add"}, - "person_pin" : {"value": "person_pin"}, - "party_mode" : {"value": "party_mode"}, - "pie_chart" : {"value": "pie_chart"}, - "phonelink" : {"value": "phonelink"}, - "pin_drop" : {"value": "pin_drop"}, - "portrait" : {"value": "portrait"}, - "plus_one" : {"value": "plus_one"}, - "panorama" : {"value": "panorama"}, - "pan_tool" : {"value": "pan_tool"}, - "pageview" : {"value": "pageview"}, - "payment" : {"value": "payment"}, - "publish" : {"value": "publish"}, - "palette" : {"value": "palette"}, - "polymer" : {"value": "polymer"}, - "public" : {"value": "public"}, - "people" : {"value": "people"}, - "person" : {"value": "person"}, - "print" : {"value": "print"}, - "pause" : {"value": "pause"}, - "photo" : {"value": "photo"}, - "power" : {"value": "power"}, - "place" : {"value": "place"}, - "phone" : {"value": "phone"}, - "pages" : {"value": "pages"}, - "poll" : {"value": "poll"}, - "pool" : {"value": "pool"}, - "pets" : {"value": "pets"}, - "quick_contacts_dialer" : {"value": "quick_contacts_dialer"}, - "quick_contacts_mail" : {"value": "quick_contacts_mail"}, - "queue_play_next" : {"value": "queue_play_next"}, - "question_answer" : {"value": "question_answer"}, - "query_builder" : {"value": "query_builder"}, - "queue_music" : {"value": "queue_music"}, - "queue" : {"value": "queue"}, - "radio_button_unchecked" : {"value": "radio_button_unchecked"}, - "remove_circle_outline" : {"value": "remove_circle_outline"}, - "rotate_ninezero_degrees_ccw" : {"value": "rotate_ninezero_degrees_ccw"}, - "remove_shopping_cart" : {"value": "remove_shopping_cart"}, - "radio_button_checked" : {"value": "radio_button_checked"}, - "remove_from_queue" : {"value": "remove_from_queue"}, - "record_voice_over" : {"value": "record_voice_over"}, - "radio_button_off" : {"value": "radio_button_off"}, - "restaurant_menu" : {"value": "restaurant_menu"}, - "radio_button_on" : {"value": "radio_button_on"}, - "rounded_corner" : {"value": "rounded_corner"}, - "remove_red_eye" : {"value": "remove_red_eye"}, - "report_problem" : {"value": "report_problem"}, - "remove_circle" : {"value": "remove_circle"}, - "recent_actors" : {"value": "recent_actors"}, - "room_service" : {"value": "room_service"}, - "restore_page" : {"value": "restore_page"}, - "rotate_right" : {"value": "rotate_right"}, - "ring_volume" : {"value": "ring_volume"}, - "rate_review" : {"value": "rate_review"}, - "rotate_left" : {"value": "rotate_left"}, - "restaurant" : {"value": "restaurant"}, - "repeat_one" : {"value": "repeat_one"}, - "reply_all" : {"value": "reply_all"}, - "replay_threezero" : {"value": "replay_threezero"}, - "replay_onezero" : {"value": "replay_onezero"}, - "rv_hookup" : {"value": "rv_hookup"}, - "replay_five" : {"value": "replay_five"}, - "rss_feed" : {"value": "rss_feed"}, - "reorder" : {"value": "reorder"}, - "restore" : {"value": "restore"}, - "receipt" : {"value": "receipt"}, - "refresh" : {"value": "refresh"}, - "rowing" : {"value": "rowing"}, - "repeat" : {"value": "repeat"}, - "report" : {"value": "report"}, - "remove" : {"value": "remove"}, - "router" : {"value": "router"}, - "redeem" : {"value": "redeem"}, - "replay" : {"value": "replay"}, - "radio" : {"value": "radio"}, - "room" : {"value": "room"}, - "redo" : {"value": "redo"}, - "signal_cellular_connected_no_internet_four_bar" : {"value": "signal_cellular_connected_no_internet_four_bar"}, - "sentiment_very_dissatisfied" : {"value": "sentiment_very_dissatisfied"}, - "settings_system_daydream" : {"value": "settings_system_daydream"}, - "settings_input_composite" : {"value": "settings_input_composite"}, - "settings_input_component" : {"value": "settings_input_component"}, - "sentiment_very_satisfied" : {"value": "sentiment_very_satisfied"}, - "subdirectory_arrow_right" : {"value": "subdirectory_arrow_right"}, - "subdirectory_arrow_left" : {"value": "subdirectory_arrow_left"}, - "settings_backup_restore" : {"value": "settings_backup_restore"}, - "signal_cellular_no_sim" : {"value": "signal_cellular_no_sim"}, - "settings_input_antenna" : {"value": "settings_input_antenna"}, - "stay_primary_landscape" : {"value": "stay_primary_landscape"}, - "stay_current_landscape" : {"value": "stay_current_landscape"}, - "signal_wifi_four_bar_lock" : {"value": "signal_wifi_four_bar_lock"}, - "sentiment_dissatisfied" : {"value": "sentiment_dissatisfied"}, - "settings_input_svideo" : {"value": "settings_input_svideo"}, - "settings_applications" : {"value": "settings_applications"}, - "stay_current_portrait" : {"value": "stay_current_portrait"}, - "signal_cellular_four_bar" : {"value": "signal_cellular_four_bar"}, - "stay_primary_portrait" : {"value": "stay_primary_portrait"}, - "screen_lock_landscape" : {"value": "screen_lock_landscape"}, - "signal_cellular_null" : {"value": "signal_cellular_null"}, - "store_mall_directory" : {"value": "store_mall_directory"}, - "screen_lock_rotation" : {"value": "screen_lock_rotation"}, - "screen_lock_portrait" : {"value": "screen_lock_portrait"}, - "swap_vertical_circle" : {"value": "swap_vertical_circle"}, - "signal_cellular_off" : {"value": "signal_cellular_off"}, - "settings_brightness" : {"value": "settings_brightness"}, - "settings_input_hdmi" : {"value": "settings_input_hdmi"}, - "sentiment_satisfied" : {"value": "sentiment_satisfied"}, - "settings_bluetooth" : {"value": "settings_bluetooth"}, - "supervisor_account" : {"value": "supervisor_account"}, - "signal_wifi_four_bar" : {"value": "signal_wifi_four_bar"}, - "stop_screen_share" : {"value": "stop_screen_share"}, - "settings_ethernet" : {"value": "settings_ethernet"}, - "sentiment_neutral" : {"value": "sentiment_neutral"}, - "settings_overscan" : {"value": "settings_overscan"}, - "speaker_notes_off" : {"value": "speaker_notes_off"}, - "slow_motion_video" : {"value": "slow_motion_video"}, - "system_update_alt" : {"value": "system_update_alt"}, - "settings_display" : {"value": "settings_display"}, - "swap_vert_circle" : {"value": "swap_vert_circle"}, - "system_update_tv" : {"value": "system_update_tv"}, - "strikethrough_s" : {"value": "strikethrough_s"}, - "screen_rotation" : {"value": "screen_rotation"}, - "shopping_basket" : {"value": "shopping_basket"}, - "signal_wifi_off" : {"value": "signal_wifi_off"}, - "settings_remote" : {"value": "settings_remote"}, - "sim_card_alert" : {"value": "sim_card_alert"}, - "surround_sound" : {"value": "surround_sound"}, - "settings_power" : {"value": "settings_power"}, - "settings_phone" : {"value": "settings_phone"}, - "settings_voice" : {"value": "settings_voice"}, - "switch_camera" : {"value": "switch_camera"}, - "speaker_notes" : {"value": "speaker_notes"}, - "speaker_group" : {"value": "speaker_group"}, - "sort_by_alpha" : {"value": "sort_by_alpha"}, - "smoking_rooms" : {"value": "smoking_rooms"}, - "system_update" : {"value": "system_update"}, - "shopping_cart" : {"value": "shopping_cart"}, - "skip_previous" : {"value": "skip_previous"}, - "subscriptions" : {"value": "subscriptions"}, - "settings_cell" : {"value": "settings_cell"}, - "sync_disabled" : {"value": "sync_disabled"}, - "speaker_phone" : {"value": "speaker_phone"}, - "switch_video" : {"value": "switch_video"}, - "sync_problem" : {"value": "sync_problem"}, - "star_outline" : {"value": "star_outline"}, - "screen_share" : {"value": "screen_share"}, - "star_border" : {"value": "star_border"}, - "spellcheck" : {"value": "spellcheck"}, - "sms_failed" : {"value": "sms_failed"}, - "swap_horiz" : {"value": "swap_horiz"}, - "smoke_free" : {"value": "smoke_free"}, - "smartphone" : {"value": "smartphone"}, - "select_all" : {"value": "select_all"}, - "sd_storage" : {"value": "sd_storage"}, - "swap_calls" : {"value": "swap_calls"}, - "streetview" : {"value": "streetview"}, - "straighten" : {"value": "straighten"}, - "show_chart" : {"value": "show_chart"}, - "short_text" : {"value": "short_text"}, - "subtitles" : {"value": "subtitles"}, - "slideshow" : {"value": "slideshow"}, - "swap_vert" : {"value": "swap_vert"}, - "skip_next" : {"value": "skip_next"}, - "space_bar" : {"value": "space_bar"}, - "satellite" : {"value": "satellite"}, - "security" : {"value": "security"}, - "sim_card" : {"value": "sim_card"}, - "shop_two" : {"value": "shop_two"}, - "schedule" : {"value": "schedule"}, - "settings" : {"value": "settings"}, - "subject" : {"value": "subject"}, - "shuffle" : {"value": "shuffle"}, - "sd_card" : {"value": "sd_card"}, - "speaker" : {"value": "speaker"}, - "scanner" : {"value": "scanner"}, - "storage" : {"value": "storage"}, - "school" : {"value": "school"}, - "snooze" : {"value": "snooze"}, - "subway" : {"value": "subway"}, - "stars" : {"value": "stars"}, - "share" : {"value": "share"}, - "style" : {"value": "style"}, - "store" : {"value": "store"}, - "sort_alt2" : {"value": "sort_alt2"}, - "shop" : {"value": "shop"}, - "send" : {"value": "send"}, - "sync" : {"value": "sync"}, - "save" : {"value": "save"}, - "stop" : {"value": "stop"}, - "sms" : {"value": "sms"}, - "spa" : {"value": "spa"}, - "transfer_within_a_station" : {"value": "transfer_within_a_station"}, - "trending_neutral" : {"value": "trending_neutral"}, - "thumbs_up_down" : {"value": "thumbs_up_down"}, - "tablet_android" : {"value": "tablet_android"}, - "tab_unselected" : {"value": "tab_unselected"}, - "track_changes" : {"value": "track_changes"}, - "time_to_leave" : {"value": "time_to_leave"}, - "turned_in_not" : {"value": "turned_in_not"}, - "trending_down" : {"value": "trending_down"}, - "trending_flat" : {"value": "trending_flat"}, - "tap_and_play" : {"value": "tap_and_play"}, - "trending_up" : {"value": "trending_up"}, - "text_format" : {"value": "text_format"}, - "text_fields" : {"value": "text_fields"}, - "thumb_down" : {"value": "thumb_down"}, - "tablet_mac" : {"value": "tablet_mac"}, - "touch_app" : {"value": "touch_app"}, - "timer_off" : {"value": "timer_off"}, - "timelapse" : {"value": "timelapse"}, - "tag_faces" : {"value": "tag_faces"}, - "transform" : {"value": "transform"}, - "turned_in" : {"value": "turned_in"}, - "translate" : {"value": "translate"}, - "thumb_up" : {"value": "thumb_up"}, - "tonality" : {"value": "tonality"}, - "theaters" : {"value": "theaters"}, - "timer_onezero" : {"value": "timer_onezero"}, - "timeline" : {"value": "timeline"}, - "texture" : {"value": "texture"}, - "textsms" : {"value": "textsms"}, - "traffic" : {"value": "traffic"}, - "timer_three" : {"value": "timer_three"}, - "terrain" : {"value": "terrain"}, - "tablet" : {"value": "tablet"}, - "title" : {"value": "title"}, - "timer" : {"value": "timer"}, - "train" : {"value": "train"}, - "today" : {"value": "today"}, - "toys" : {"value": "toys"}, - "tram" : {"value": "tram"}, - "tune" : {"value": "tune"}, - "toll" : {"value": "toll"}, - "toc" : {"value": "toc"}, - "tab" : {"value": "tab"}, - "tv" : {"value": "tv"}, - "unfold_more" : {"value": "unfold_more"}, - "unfold_less" : {"value": "unfold_less"}, - "unarchive" : {"value": "unarchive"}, - "update" : {"value": "update"}, - "undo" : {"value": "undo"}, - "usb" : {"value": "usb"}, - "vertical_align_center" : {"value": "vertical_align_center"}, - "vertical_align_bottom" : {"value": "vertical_align_bottom"}, - "vertical_align_top" : {"value": "vertical_align_top"}, - "video_collection" : {"value": "video_collection"}, - "view_comfortable" : {"value": "view_comfortable"}, - "videogame_asset" : {"value": "videogame_asset"}, - "visibility_off" : {"value": "visibility_off"}, - "view_headline" : {"value": "view_headline"}, - "video_library" : {"value": "video_library"}, - "view_carousel" : {"value": "view_carousel"}, - "verified_user" : {"value": "verified_user"}, - "view_compact" : {"value": "view_compact"}, - "videocam_off" : {"value": "videocam_off"}, - "view_stream" : {"value": "view_stream"}, - "view_column" : {"value": "view_column"}, - "video_label" : {"value": "video_label"}, - "view_module" : {"value": "view_module"}, - "view_agenda" : {"value": "view_agenda"}, - "volume_down" : {"value": "volume_down"}, - "volume_mute" : {"value": "volume_mute"}, - "visibility" : {"value": "visibility"}, - "view_array" : {"value": "view_array"}, - "video_call" : {"value": "video_call"}, - "voice_chat" : {"value": "voice_chat"}, - "view_comfy" : {"value": "view_comfy"}, - "view_quilt" : {"value": "view_quilt"}, - "volume_off" : {"value": "volume_off"}, - "vibration" : {"value": "vibration"}, - "view_week" : {"value": "view_week"}, - "view_list" : {"value": "view_list"}, - "voicemail" : {"value": "voicemail"}, - "volume_up" : {"value": "volume_up"}, - "vignette" : {"value": "vignette"}, - "view_day" : {"value": "view_day"}, - "videocam" : {"value": "videocam"}, - "vpn_lock" : {"value": "vpn_lock"}, - "vpn_key" : {"value": "vpn_key"}, - "wallet_membership" : {"value": "wallet_membership"}, - "wb_incandescent" : {"value": "wb_incandescent"}, - "wallet_giftcard" : {"value": "wallet_giftcard"}, - "wifi_tethering" : {"value": "wifi_tethering"}, - "wb_iridescent" : {"value": "wb_iridescent"}, - "wallet_travel" : {"value": "wallet_travel"}, - "watch_later" : {"value": "watch_later"}, - "web_asset" : {"value": "web_asset"}, - "wallpaper" : {"value": "wallpaper"}, - "wrap_text" : {"value": "wrap_text"}, - "wifi_lock" : {"value": "wifi_lock"}, - "wb_cloudy" : {"value": "wb_cloudy"}, - "whatshot" : {"value": "whatshot"}, - "wb_sunny" : {"value": "wb_sunny"}, - "widgets" : {"value": "widgets"}, - "wb_auto" : {"value": "wb_auto"}, - "weekend" : {"value": "weekend"}, - "warning" : {"value": "warning"}, - "watch" : {"value": "watch"}, - "work" : {"value": "work"}, - "wifi" : {"value": "wifi"}, - "web" : {"value": "web"}, - "wc" : {"value": "wc"}, - "youtube_searched_for" : {"value": "youtube_searched_for"}, - "zoom_out_map" : {"value": "zoom_out_map"}, - "zoom_out" : {"value": "zoom_out"}, - "zoom_in" : {"value": "zoom_in"} - } - } -} diff --git a/example/react/properties/font.json b/example/react/properties/font.json deleted file mode 100644 index 236121748..000000000 --- a/example/react/properties/font.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "font": { - "family": { - "base": { - "value": "Amazon Ember" - } - } - } -} diff --git a/example/react/properties/size/font.json b/example/react/properties/size/font.json deleted file mode 100644 index e1936227b..000000000 --- a/example/react/properties/size/font.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "size": { - "font": { - "small" : { "value": "0.75" }, - "medium": { "value": "1" }, - "large" : { "value": "1.5" }, - "xl" : { "value": "2" }, - "xxl" : { "value": "2.5" }, - "xxxl" : { "value": "3" }, - "base" : { "value": "{size.font.medium.value}" } - } - } -} diff --git a/example/react/properties/size/icon.json b/example/react/properties/size/icon.json deleted file mode 100644 index d1ac28ec5..000000000 --- a/example/react/properties/size/icon.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "size": { - "icon": { - "small": { "value":"1.5" }, - "base" : { "value":"2.0" }, - "large": { "value":"2.5" }, - "xl" : { "value":"3.0" } - } - } -} diff --git a/example/react/properties/size/padding.json b/example/react/properties/size/padding.json deleted file mode 100644 index a6400fa41..000000000 --- a/example/react/properties/size/padding.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "size": { - "padding": { - "tiny" : { "value": "0.25" }, - "small" : { "value": "0.5" }, - "medium" : { "value": "1" }, - "large" : { "value": "1.5" }, - "xl" : { "value": "2" }, - "xxl" : { "value": "3" }, - "base" : { "value": "{size.padding.medium.value}" } - } - } -} diff --git a/example/react/web/.babelrc b/example/react/web/.babelrc deleted file mode 100644 index bd20dc179..000000000 --- a/example/react/web/.babelrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "presets": [ - "es2015", - "react" - ] -} diff --git a/example/react/web/.eslintrc.json b/example/react/web/.eslintrc.json deleted file mode 100644 index 4750964ba..000000000 --- a/example/react/web/.eslintrc.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "env": { - "node": true, - "browser": true - }, - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - }, - "globals": { - "Buffer": true, - "escape": true - }, - "extends": "eslint:recommended", - "rules": { - "no-console": 0, - "no-unused-vars": 1 - }, - "plugins": [ - "react" - ] -} diff --git a/example/react/web/.gitignore b/example/react/web/.gitignore deleted file mode 100644 index 82d58ce7f..000000000 --- a/example/react/web/.gitignore +++ /dev/null @@ -1 +0,0 @@ -src/styleDictionary/ diff --git a/example/react/web/index.ejs b/example/react/web/index.ejs deleted file mode 100644 index 0b3e88c03..000000000 --- a/example/react/web/index.ejs +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - -
- - diff --git a/example/react/web/package.json b/example/react/web/package.json deleted file mode 100644 index 528cba6df..000000000 --- a/example/react/web/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "style-dictionary-example-react", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "stats": "webpack --profile --json > stats.json", - "style-dictionary": "cd .. && style-dictionary build", - "start": "npm run style-dictionary && webpack-dev-server", - "build": "npm run style-dictionary && webpack", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "engines": { - "node": ">= 7.1.0" - }, - "devDependencies": { - "autoprefixer": "^6.4.0", - "babel": "^6.5.2", - "babel-core": "^6.13.2", - "babel-loader": "^6.2.4", - "babel-preset-es2015": "^6.13.2", - "babel-preset-react": "^6.11.1", - "babel-preset-react-hmre": "^1.1.1", - "clean-webpack-plugin": "^0.1.14", - "css-loader": "^0.23.1", - "extract-text-webpack-plugin": "^1.0.1", - "favicons-webpack-plugin": "0.0.6", - "file-loader": "^0.9.0", - "html-webpack-plugin": "^2.22.0", - "node-sass": "^3.8.0", - "postcss-loader": "^0.11.1", - "raw-loader": "^0.5.1", - "sass-loader": "^4.1.0", - "style-loader": "^0.13.1", - "url-loader": "^0.5.7", - "webpack-dev-server": "^1.16.2", - "webpack-merge": "^0.14.1", - "webpack-validator": "^2.2.9" - }, - "dependencies": { - "lodash": "^4.16.4", - "react": "^15.3.0", - "react-addons-css-transition-group": "15.3.1", - "react-dom": "^15.3.0", - "react-lite": "^0.15.16", - "react-router": "^2.7.0", - "webpack": "^1.13.1" - }, - "babel": { - "presets": [ - "es2015" - ] - } -} diff --git a/example/react/web/postcss.config.js b/example/react/web/postcss.config.js deleted file mode 100644 index 68c6aac42..000000000 --- a/example/react/web/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: [ - require('precss')({ /* ...options */ }), - require('autoprefixer')({ /* ...options */ }) - ] -}; diff --git a/example/react/web/src/app.js b/example/react/web/src/app.js deleted file mode 100644 index 81e467903..000000000 --- a/example/react/web/src/app.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import Layout from './components/layout'; -import Home from './pages/home'; -import Colors from './pages/colors'; -import Icons from './pages/icons'; -import Properties from './pages/properties'; -import {Router, Route, browserHistory} from 'react-router'; -import Routes from './modules/routes'; - -class App extends React.Component { - constructor(props) { - super(props); - } - - render () { - return ( - - - {Routes.map((route)=> { - return ( - - ) - })} - - - ); - } -} - -export default App; diff --git a/example/react/web/src/components/color.js b/example/react/web/src/components/color.js deleted file mode 100644 index 6ac9ac0fb..000000000 --- a/example/react/web/src/components/color.js +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; - -export default function(props) { - return ( -
-
{props.item}
-
{props.value}
-
- ) -} diff --git a/example/react/web/src/components/colorGroup.js b/example/react/web/src/components/colorGroup.js deleted file mode 100644 index 7879ebbe4..000000000 --- a/example/react/web/src/components/colorGroup.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import Color from './color'; - -export default function(props) { - return ( -
-
-

- {props.title} -

-
- {props.colors.map((color, i) => - - )} -
- ) -} diff --git a/example/react/web/src/components/header.js b/example/react/web/src/components/header.js deleted file mode 100644 index 875fc8744..000000000 --- a/example/react/web/src/components/header.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import Nav from './nav'; - -export default function(props) { - return ( -
-
- ) -} diff --git a/example/react/web/src/components/icon.js b/example/react/web/src/components/icon.js deleted file mode 100644 index 328520fbf..000000000 --- a/example/react/web/src/components/icon.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; - -export default function(props) { - return ( -
- {props.name} - {props.icon} -
- ) -} diff --git a/example/react/web/src/components/layout.js b/example/react/web/src/components/layout.js deleted file mode 100644 index 5f7e2b8ea..000000000 --- a/example/react/web/src/components/layout.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import keys from 'lodash/keys'; -import styleDictionary from '../styleDictionary/properties'; -import Nav from './nav'; -import Header from './header'; - -export default function(props) { - return ( -
-
- {props.children} -
- ) -} diff --git a/example/react/web/src/components/nav.js b/example/react/web/src/components/nav.js deleted file mode 100644 index dd9e8602d..000000000 --- a/example/react/web/src/components/nav.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import {Link} from 'react-router'; -import Routes from '../modules/routes'; - -export default function(props) { - return ( - - ) -} diff --git a/example/react/web/src/components/property.js b/example/react/web/src/components/property.js deleted file mode 100644 index ddc2c43df..000000000 --- a/example/react/web/src/components/property.js +++ /dev/null @@ -1,132 +0,0 @@ -import React from 'react'; -import keys from 'lodash/keys'; -import {content} from '../styleDictionary/properties'; - -function renderProp(props) { - if (props.properties.original.value.indexOf('{') > -1) { - let val = props.properties.original.value.replace(/{|}/g, '').replace('.value', ''); - return ( - {val} - ) - } else { - return ( - {props.properties.original.value} - ) - } -} - -function render(props) { - if (props.properties.hasOwnProperty('value')) { - return renderProp(Object.assign({}, props, {path: props.path})); - } else { - return keys(props.properties).map((key)=> { - var path = props.path ? `${props.path}.${key}` : key; - return ( -
-
- - {content.icon.expand_less.value} - - {key} -
- {render(Object.assign({}, props, {properties: props.properties[key], path: path}))} -
- ); - }); - } -} - -function renderTop(props) { - return ( -
- {render(props)} -
- ) -} - -// export default renderTop; - -// export default function(props) { -// if (props.hasOwnProperty('value')) { -// if (props.original.value.indexOf('{') > -1) { -// let val = props.original.value.replace(/{|}/g, '').replace('.value', ''); -// return ( -// {val} -// ) -// } else { -// return ( -// {props.original.value} -// ) -// } -// } else { -// return ( -//
-//
-// -// {content.icon.expand_less.value} -// -// {props.name} -//
-// {props.children} -//
-// ) -// } -// } - -class Property extends React.Component { - constructor(props) { - super(props); - this.state = { - expanded: false - }; - this.toggle = this.toggle.bind(this); - } - - renderLeaf() { - if (this.props.hasOwnProperty('value')) { - if (this.props.original.value.indexOf('{') > -1) { - let val = this.props.original.value.replace(/{|}/g, '').replace('.value', ''); - return ( - {val} - ) - } else { - return ( - {this.props.original.value} - ) - } - } - } - - toggle(e) { - e.preventDefault(); - e.stopPropagation(); - this.setState({ - expanded: !this.state.expanded - }); - } - - className() { - if (this.state.expanded) { - return 'property-node expanded' - } else { - return 'property-node' - } - } - - render() { - return ( -
-
- - {content.icon.expand_less.value} - - {this.props.name} - {this.renderLeaf()} -
- {this.props.children} -
- ) - } -} - -export default Property; diff --git a/example/react/web/src/index.js b/example/react/web/src/index.js deleted file mode 100644 index 063b779bf..000000000 --- a/example/react/web/src/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import {render} from 'react-dom' -import App from './app' -import React from 'react' - -render(, document.getElementById('app')); diff --git a/example/react/web/src/modules/routes.js b/example/react/web/src/modules/routes.js deleted file mode 100644 index 3a90b94c5..000000000 --- a/example/react/web/src/modules/routes.js +++ /dev/null @@ -1,22 +0,0 @@ -import Home from '../pages/home'; -import Colors from '../pages/colors'; -import Icons from '../pages/icons'; -import Properties from '../pages/properties'; - -export default [{ - path: '/', - name: '', - component: Home -},{ - path: 'colors', - name: 'Colors', - component: Colors -},{ - path: 'icons', - name: 'Icons', - component: Icons -},{ - path: 'properties', - name: 'Property Explorer', - component: Properties -}]; diff --git a/example/react/web/src/pages/colors.js b/example/react/web/src/pages/colors.js deleted file mode 100644 index c9e8c1845..000000000 --- a/example/react/web/src/pages/colors.js +++ /dev/null @@ -1,55 +0,0 @@ -import React from 'react'; -import keys from 'lodash/keys'; -import capitalize from 'lodash/capitalize'; -import styleDictionary from '../styleDictionary/properties'; -import ColorGroup from '../components/colorGroup'; - -const colorGroups = keys(styleDictionary.color.base) - .filter((color_group) => { - return color_group !== 'white' && color_group !== 'black' - }) - .map((color_group) => { - return { - title: capitalize(color_group.replace('_', ' ')), - color: styleDictionary.color.base[color_group]['500'].value, - font: styleDictionary.color.base[color_group]['500'].attributes.font, - colors: keys(styleDictionary.color.base[color_group]).map((color) => { - let prop = styleDictionary.color.base[color_group][color]; - return { - value: prop.value, - item: color, - font: prop.attributes.font - } - }) - } - }); - -function prettyReference(ref) { - return ref.replace(/{|}/g, '').replace('value',''); -} - -const fontColors = keys(styleDictionary.color.font) - .filter((fontColor) => { - return !['inverse','button'].includes(fontColor) - }) - .map((fontColor) => { - return { - name: fontColor, - value: prettyReference(styleDictionary.color.font[fontColor].original.value) - } - }); - - -export default function() { - return ( -
-

Colors!

- {colorGroups.map((colorGroup) => - - )} - {fontColors.map((fontColor) => -
{fontColor.name}: {fontColor.value}
- )} -
- ) -} diff --git a/example/react/web/src/pages/home.js b/example/react/web/src/pages/home.js deleted file mode 100644 index 22542f476..000000000 --- a/example/react/web/src/pages/home.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - - -export default function(props) { - return ( -
-
- ) -} diff --git a/example/react/web/src/pages/icons.js b/example/react/web/src/pages/icons.js deleted file mode 100644 index 4487f28d4..000000000 --- a/example/react/web/src/pages/icons.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import keys from 'lodash/keys'; -import capitalize from 'lodash/capitalize'; -import styleDictionary from '../styleDictionary/properties'; -import Icon from '../components/icon'; - -const icons = keys(styleDictionary.content.icon) - .map((icon) => { - return { - name: capitalize(icon.replace('_', ' ')), - icon: styleDictionary.content.icon[icon].value - } - }); - - -export default function() { - return ( -
-

Icons!

- {icons.map((icon) => - - )} -
- ) -} diff --git a/example/react/web/src/pages/properties.js b/example/react/web/src/pages/properties.js deleted file mode 100644 index 7fea4afa6..000000000 --- a/example/react/web/src/pages/properties.js +++ /dev/null @@ -1,46 +0,0 @@ -import React from 'react'; -import styleDictionary from '../styleDictionary/properties'; -import Property from '../components/property'; -import keys from 'lodash/keys'; - -class Properties extends React.Component { - constructor(props) { - super(props); - this.state = { - properties: styleDictionary - }; - this.toggle = this.toggle.bind(this); - } - - toggle(e) { - e.preventDefault(); - console.log(e); - } - - renderNodes(node, path, name) { - if (node.hasOwnProperty('value')) { - return ( - - ); - } else { - return keys(node).map((key)=> { - var path = path ? `${path}.${key}` : key; - return ( - - {this.renderNodes(node[key], path, key)} - - ) - }) - } - } - - render() { - return ( -
- {this.renderNodes(styleDictionary)} -
- ) - } -} - -export default Properties; diff --git a/example/react/web/src/sass/base.scss b/example/react/web/src/sass/base.scss deleted file mode 100644 index 271ac02de..000000000 --- a/example/react/web/src/sass/base.scss +++ /dev/null @@ -1,47 +0,0 @@ -@import "../styleDictionary/variables"; - -body { - font-size: 100%; - line-height: 1.5; - color: $color-font-base; -} - -h1, h2, h3, h4, h5, h6 { - margin-top: $size-padding-large; - margin-bottom: $size-padding-base; - word-wrap: break-word; - - &:first-child { margin-top: 0; } -} - -h1 { - font-size: $size-font-xxxl; -} - -h2 { - font-size: $size-font-xxl; -} - -h3 { - font-size: $size-font-xl; -} - -h4 { - font-size: $size-font-large; - margin-bottom: 0; -} - -h5 { -} - - -a { - text-decoration: none; - color: $color-font-link; - transition: all 0.3s linear; - - &:hover, - &:active { - color: $color-font-active; - } -} diff --git a/example/react/web/src/sass/colors.scss b/example/react/web/src/sass/colors.scss deleted file mode 100644 index 99d8c214e..000000000 --- a/example/react/web/src/sass/colors.scss +++ /dev/null @@ -1,30 +0,0 @@ -@import "../styleDictionary/variables"; - -.inverse { - color: $color-font-inverse-base; -} - -.color-group { - float: left; - width: 23%; - margin-left: 2%; - margin-bottom: $size-padding-large; -} - -.color-group-header { - padding: $size-padding-base; - font-size: $size-font-xl; -} - -.color { - overflow: hidden; - padding: $size-padding-base; -} - -.color-title { - float: left; -} - -.color-value { - float: right; -} diff --git a/example/react/web/src/sass/fonts.scss b/example/react/web/src/sass/fonts.scss deleted file mode 100644 index 9bbdbec3e..000000000 --- a/example/react/web/src/sass/fonts.scss +++ /dev/null @@ -1,10 +0,0 @@ -@font-face { - font-family: 'Icons'; - src: url('../styleDictionary/assets/fonts/MaterialIcons-Regular.eot'); - src: url('../styleDictionary/assets/fonts/MaterialIcons-Regular.eot?#iefix') format('embedded-opentype'), - url('../styleDictionary/assets/fonts/MaterialIcons-Regular.woff2') format('woff2'), - url('../styleDictionary/assets/fonts/MaterialIcons-Regular.woff') format('woff'), - url('../styleDictionary/assets/fonts/MaterialIcons-Regular.ttf') format('truetype'); - font-weight: 500; - font-style: normal; -} diff --git a/example/react/web/src/sass/header.scss b/example/react/web/src/sass/header.scss deleted file mode 100644 index d5b5cf56c..000000000 --- a/example/react/web/src/sass/header.scss +++ /dev/null @@ -1,21 +0,0 @@ -@import "../styleDictionary/variables"; -@import "mixins"; - -.header { - position: fixed; - top: 0; - left: 0; - width: 100%; - padding: 0 $size-padding-base; - border-bottom: 1px solid $color-border-base; - background: $color-background-base; - z-index: 9999; -} - -.nav-link { - display: inline-block; - text-decoration: none; - line-height: 1; - padding: $size-padding-base; - @include allcaps(); -} diff --git a/example/react/web/src/sass/mixins.scss b/example/react/web/src/sass/mixins.scss deleted file mode 100644 index 05b4478f4..000000000 --- a/example/react/web/src/sass/mixins.scss +++ /dev/null @@ -1,9 +0,0 @@ -@mixin allcaps() { - text-transform: uppercase; - letter-spacing: 0.1em; -} - -@mixin icon() { - font-family: 'Icons', sans-serif; - font-style: normal; -} diff --git a/example/react/web/src/sass/property.scss b/example/react/web/src/sass/property.scss deleted file mode 100644 index 5d4ce99bd..000000000 --- a/example/react/web/src/sass/property.scss +++ /dev/null @@ -1,45 +0,0 @@ -@import "../styleDictionary/variables"; -@import "mixins"; - -.property-tree { - padding: $size-padding-xl; -} - -.property-node { - max-height: 0; - overflow: hidden; - position: relative; - border-left: 0.125rem solid $color-border-light; - transition: all 1s cubic-bezier(0.175, 0.885, 0.320, 1.275); - - .property-tree > &, - .expanded > & { - max-height: 9999px; - } - - .property-node > & { - margin-left: $size-padding-large; - } -} - -.property-node-title { - position: relative; - padding: $size-padding-base; - border-top: 1px solid $color-border-light; - - - & > .property-node-icon { - position: absolute; - top: 50%; - right: $size-padding-base; - font-size: $size-icon-small; - line-height: 1; - color: $color-font-quaternary; - margin-top: -$size-icon-small/2; - transition: all 1s cubic-bezier(0.175, 0.885, 0.320, 1.275); - } - - &.expanded > .property-node-icon { - transform: rotate(180deg); - } -} diff --git a/example/react/web/src/sass/styles.scss b/example/react/web/src/sass/styles.scss deleted file mode 100644 index 69c16a2a0..000000000 --- a/example/react/web/src/sass/styles.scss +++ /dev/null @@ -1,19 +0,0 @@ -@import "../styleDictionary/variables"; -@import "base"; -@import "colors"; -@import "fonts"; -@import "property"; -@import "header"; - - -body { - background: $color-background-base; - font-family: $font-family-base; - padding-top: ($size-padding-base * 2) + 1; - margin: 0; -} - -.icon { - font-family: 'Icons', sans-serif; - font-style: normal; -} diff --git a/example/react/web/webpack.config.js b/example/react/web/webpack.config.js deleted file mode 100644 index 358eb4713..000000000 --- a/example/react/web/webpack.config.js +++ /dev/null @@ -1,76 +0,0 @@ -const path = require('path'); -const webpack = require('webpack'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); -const FaviconsWebpackPlugin = require('favicons-webpack-plugin'); -const merge = require('webpack-merge'); -const validate = require('webpack-validator'); -const autoprefixer = require('autoprefixer'); - -const PATHS = { - app: path.join(__dirname, 'src'), - styles: path.join(__dirname, 'src/sass/styles.scss'), - sass: path.join(__dirname, 'src/sass'), - build: path.join(__dirname, 'build'), - images: path.join(__dirname, 'src/images'), - assets: path.join(__dirname, 'src/assets') -}; - -const common = { - entry: { - app: PATHS.app, - styles: PATHS.styles - }, - output: { - path: PATHS.build, - filename: '[name].[hash].js' - }, - devtool: "eval-source-map", - resolve: { - extensions: ['', '.js', '.jsx'] - }, - postcss: function (webpack) { - return [autoprefixer]; - }, - plugins: [ - new HtmlWebpackPlugin({ - title: 'Style Dictionary', - template: 'index.ejs' - }), - new webpack.HotModuleReplacementPlugin({ - multiStep: true - }), - ], - module: { - loaders: [ - { - test : /\.(jsx|js)?$/, - loader : 'babel-loader', - exclude: /node_modules/ - },{ - test: /\.(jpg|png)$/, - loader: 'url?limit=25000', - include: PATHS.images - },{ - test: /\.scss$/, - loaders: ['style', 'css', 'postcss', 'sass'], - include: PATHS.sass - },{ - test: /\.ttf$|\.eot$|\.woff$|\.woff2$/, - loader: 'file-loader', - include: PATHS.app - } - ] - }, - devServer: { - historyApiFallback: true, - hot: true, - inline: true, - stats: 'errors-only', - host: 'localhost', - port: '8080' - } -}; - -module.exports = validate(common, { - quiet: true -}); diff --git a/example/s3/README.md b/example/s3/README.md deleted file mode 100644 index 3e58996b0..000000000 --- a/example/s3/README.md +++ /dev/null @@ -1,15 +0,0 @@ -## s3 Style Dictionary - -One way to use the style dictionary framework is to build files for each platform and upload those build artifacts to an s3 bucket. The platforms can pull these files down during their build process. - -### Running the example - -``` -$ npm install -``` - -``` -$ npm start -``` - -This will run style dictionary build process and output files into the build/ directory, then it will upload everything from the build directory into an s3 bucket. Make sure you have you computer set up to upload to your aws account, see https://github.com/awslabs/aws-nodejs-sample for a sample setup. diff --git a/example/s3/config.json b/example/s3/config.json deleted file mode 100644 index 0912ec013..000000000 --- a/example/s3/config.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "source": [ - "properties/**/*.json" - ], - "platforms": { - "ios": { - "transformGroup": "ios", - "buildPath": "build/ios/", - "files": [{ - "destination": "StyleDictionaryMacros.h", - "format": "ios/macros" - },{ - "destination": "StyleDictionary.h", - "format": "ios/singleton.h", - "className": "StyleDictionary" - },{ - "destination": "StyleDictionary.m", - "format": "ios/singleton.m", - "className": "StyleDictionary" - }] - }, - - "android": { - "transformGroup": "android", - "buildPath": "build/android/", - "files": [{ - "destination": "style_dictionary_colors.xml", - "format": "android/colors" - },{ - "destination": "style_dictionary_font_dimens.xml", - "format": "android/fontDimens" - },{ - "destination": "style_dictionary_dimens.xml", - "format": "android/dimens" - },{ - "destination": "style_dictionary_integers.xml", - "format": "android/integers" - },{ - "destination": "style_dictionary_strings.xml", - "format": "android/strings" - }] - }, - - "es6": { - "transforms": ["attribute/cti","name/ti/constant","size/px"], - "buildPath": "build/es6/", - "files": [{ - "destination": "colors.js", - "format": "javascript/es6", - "filter": { - "attributes": { - "category": "color" - } - } - }] - }, - - "es5": { - "transformGroup": "web", - "buildPath": "build/es5/", - "files": [{ - "destination": "properties.js", - "format": "javascript/module" - }] - }, - - "scss": { - "transformGroup": "scss", - "buildPath": "build/sass/", - "files": [{ - "destination": "variables.scss", - "format": "scss/variables" - }] - }, - - "assets": { - "transformGroup": "assets", - "buildPath": "build/", - "actions": ["copy_assets"] - } - } -} diff --git a/example/s3/properties/color.json b/example/s3/properties/color.json deleted file mode 100644 index 67f1994bf..000000000 --- a/example/s3/properties/color.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "color": { - "base": { - "red": { - "50" : { "value": "#000000", "attributes": {"font": "base"}}, - "100" : { "value": "#FFCDD2", "attributes": {"font": "base"}}, - "200" : { "value": "#EF9A9A", "attributes": {"font": "base"}}, - "300" : { "value": "#E57373", "attributes": {"font": "base"}}, - "400" : { "value": "#EF5350", "attributes": {"font": "inverse"}}, - "500" : { "value": "#F44336", "attributes": {"font": "inverse"}}, - "600" : { "value": "#E53935", "attributes": {"font": "inverse"}}, - "700" : { "value": "#D32F2F", "attributes": {"font": "inverse"}}, - "800" : { "value": "#C62828", "attributes": {"font": "inverse"}}, - "900" : { "value": "#B71C1C", "attributes": {"font": "inverse"}}, - "A100": { "value": "#FF8A80", "attributes": {"font": "base"}}, - "A200": { "value": "#FF5252", "attributes": {"font": "inverse"}}, - "A400": { "value": "#FF1744", "attributes": {"font": "inverse"}}, - "A700": { "value": "#D50000", "attributes": {"font": "inverse"}} - }, - "pink": { - "50" : { "value": "#FCE4EC", "attributes": {"font": "base"}}, - "100" : { "value": "#F8BBD0", "attributes": {"font": "base"}}, - "200" : { "value": "#F48FB1", "attributes": {"font": "base"}}, - "300" : { "value": "#F06292", "attributes": {"font": "inverse"}}, - "400" : { "value": "#EC407A", "attributes": {"font": "inverse"}}, - "500" : { "value": "#E91E63", "attributes": {"font": "inverse"}}, - "600" : { "value": "#D81B60", "attributes": {"font": "inverse"}}, - "700" : { "value": "#C2185B", "attributes": {"font": "inverse"}}, - "800" : { "value": "#AD1457", "attributes": {"font": "inverse"}}, - "900" : { "value": "#880E4F", "attributes": {"font": "inverse"}}, - "A100": { "value": "#FF80AB", "attributes": {"font": "base"}}, - "A200": { "value": "#FF4081", "attributes": {"font": "inverse"}}, - "A400": { "value": "#F50057", "attributes": {"font": "inverse"}}, - "A700": { "value": "#C51162", "attributes": {"font": "inverse"}} - }, - "purple": { - "50" : { "value": "#F3E5F5", "attributes": {"font": "base"}}, - "100" : { "value": "#E1BEE7", "attributes": {"font": "base"}}, - "200" : { "value": "#CE93D8", "attributes": {"font": "base"}}, - "300" : { "value": "#BA68C8", "attributes": {"font": "inverse"}}, - "400" : { "value": "#AB47BC", "attributes": {"font": "inverse"}}, - "500" : { "value": "#9C27B0", "attributes": {"font": "inverse"}}, - "600" : { "value": "#8E24AA", "attributes": {"font": "inverse"}}, - "700" : { "value": "#7B1FA2", "attributes": {"font": "inverse"}}, - "800" : { "value": "#6A1B9A", "attributes": {"font": "inverse"}}, - "900" : { "value": "#4A148C", "attributes": {"font": "inverse"}}, - "A100": { "value": "#EA80FC", "attributes": {"font": "base"}}, - "A200": { "value": "#E040FB", "attributes": {"font": "inverse"}}, - "A400": { "value": "#D500F9", "attributes": {"font": "inverse"}}, - "A700": { "value": "#AA00FF", "attributes": {"font": "inverse"}} - }, - "deep_purple": { - "50" : { "value": "#EDE7F6", "attributes": {"font": "base"}}, - "100" : { "value": "#D1C4E9", "attributes": {"font": "base"}}, - "200" : { "value": "#B39DDB", "attributes": {"font": "base"}}, - "300" : { "value": "#9575CD", "attributes": {"font": "inverse"}}, - "400" : { "value": "#7E57C2", "attributes": {"font": "inverse"}}, - "500" : { "value": "#673AB7", "attributes": {"font": "inverse"}}, - "600" : { "value": "#5E35B1", "attributes": {"font": "inverse"}}, - "700" : { "value": "#512DA8", "attributes": {"font": "inverse"}}, - "800" : { "value": "#4527A0", "attributes": {"font": "inverse"}}, - "900" : { "value": "#311B92", "attributes": {"font": "inverse"}}, - "A100": { "value": "#B388FF", "attributes": {"font": "base"}}, - "A200": { "value": "#7C4DFF", "attributes": {"font": "inverse"}}, - "A400": { "value": "#651FFF", "attributes": {"font": "inverse"}}, - "A700": { "value": "#6200EA", "attributes": {"font": "inverse"}} - }, - "indigo": { - "50" : { "value": "#E8EAF6", "attributes": {"font": "base"}}, - "100" : { "value": "#C5CAE9", "attributes": {"font": "base"}}, - "200" : { "value": "#9FA8DA", "attributes": {"font": "base"}}, - "300" : { "value": "#7986CB", "attributes": {"font": "inverse"}}, - "400" : { "value": "#5C6BC0", "attributes": {"font": "inverse"}}, - "500" : { "value": "#3F51B5", "attributes": {"font": "inverse"}}, - "600" : { "value": "#3949AB", "attributes": {"font": "inverse"}}, - "700" : { "value": "#303F9F", "attributes": {"font": "inverse"}}, - "800" : { "value": "#283593", "attributes": {"font": "inverse"}}, - "900" : { "value": "#1A237E", "attributes": {"font": "inverse"}}, - "A100": { "value": "#8C9EFF", "attributes": {"font": "base"}}, - "A200": { "value": "#536DFE", "attributes": {"font": "inverse"}}, - "A400": { "value": "#3D5AFE", "attributes": {"font": "inverse"}}, - "A700": { "value": "#304FFE", "attributes": {"font": "inverse"}} - }, - "blue": { - "50" : { "value": "#E3F2FD", "attributes": {"font": "base"}}, - "100" : { "value": "#BBDEFB", "attributes": {"font": "base"}}, - "200" : { "value": "#90CAF9", "attributes": {"font": "base"}}, - "300" : { "value": "#64B5F6", "attributes": {"font": "base"}}, - "400" : { "value": "#42A5F5", "attributes": {"font": "inverse"}}, - "500" : { "value": "#2196F3", "attributes": {"font": "inverse"}}, - "600" : { "value": "#1E88E5", "attributes": {"font": "inverse"}}, - "700" : { "value": "#1976D2", "attributes": {"font": "inverse"}}, - "800" : { "value": "#1565C0", "attributes": {"font": "inverse"}}, - "900" : { "value": "#0D47A1", "attributes": {"font": "inverse"}}, - "A100": { "value": "#82B1FF", "attributes": {"font": "base"}}, - "A200": { "value": "#448AFF", "attributes": {"font": "inverse"}}, - "A400": { "value": "#2979FF", "attributes": {"font": "inverse"}}, - "A700": { "value": "#2962FF", "attributes": {"font": "inverse"}} - }, - "light_blue": { - "50" : { "value": "#E1F5FE", "attributes": {"font": "base"}}, - "100" : { "value": "#B3E5FC", "attributes": {"font": "base"}}, - "200" : { "value": "#81D4FA", "attributes": {"font": "base"}}, - "300" : { "value": "#4FC3F7", "attributes": {"font": "base"}}, - "400" : { "value": "#29B6F6", "attributes": {"font": "base"}}, - "500" : { "value": "#03A9F4", "attributes": {"font": "base"}}, - "600" : { "value": "#039BE5", "attributes": {"font": "inverse"}}, - "700" : { "value": "#0288D1", "attributes": {"font": "inverse"}}, - "800" : { "value": "#0277BD", "attributes": {"font": "inverse"}}, - "900" : { "value": "#01579B", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#80D8FF", "attributes": {"font": "base"}}, - "A200" : { "value": "#40C4FF", "attributes": {"font": "base"}}, - "A400" : { "value": "#00B0FF", "attributes": {"font": "base"}}, - "A700" : { "value": "#0091EA", "attributes": {"font": "inverse"}} - }, - "cyan": { - "50" : { "value": "#E0F7FA", "attributes": {"font": "base"}}, - "100" : { "value": "#B2EBF2", "attributes": {"font": "base"}}, - "200" : { "value": "#80DEEA", "attributes": {"font": "base"}}, - "300" : { "value": "#4DD0E1", "attributes": {"font": "base"}}, - "400" : { "value": "#26C6DA", "attributes": {"font": "base"}}, - "500" : { "value": "#00BCD4", "attributes": {"font": "base"}}, - "600" : { "value": "#00ACC1", "attributes": {"font": "base"}}, - "700" : { "value": "#0097A7", "attributes": {"font": "inverse"}}, - "800" : { "value": "#00838F", "attributes": {"font": "inverse"}}, - "900" : { "value": "#006064", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#84FFFF", "attributes": {"font": "base"}}, - "A200" : { "value": "#18FFFF", "attributes": {"font": "base"}}, - "A400" : { "value": "#00E5FF", "attributes": {"font": "base"}}, - "A700" : { "value": "#00B8D4", "attributes": {"font": "base"}} - }, - "teal": { - "50" : { "value": "#E0F2F1", "attributes": {"font": "base"}}, - "100" : { "value": "#B2DFDB", "attributes": {"font": "base"}}, - "200" : { "value": "#80CBC4", "attributes": {"font": "base"}}, - "300" : { "value": "#4DB6AC", "attributes": {"font": "base"}}, - "400" : { "value": "#26A69A", "attributes": {"font": "base"}}, - "500" : { "value": "#009688", "attributes": {"font": "inverse"}}, - "600" : { "value": "#00897B", "attributes": {"font": "inverse"}}, - "700" : { "value": "#00796B", "attributes": {"font": "inverse"}}, - "800" : { "value": "#00695C", "attributes": {"font": "inverse"}}, - "900" : { "value": "#004D40", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#A7FFEB", "attributes": {"font": "base"}}, - "A200" : { "value": "#64FFDA", "attributes": {"font": "base"}}, - "A400" : { "value": "#1DE9B6", "attributes": {"font": "base"}}, - "A700" : { "value": "#00BFA5", "attributes": {"font": "base"}} - }, - "green": { - "50" : { "value": "#E8F5E9", "attributes": {"font": "base"}}, - "100" : { "value": "#C8E6C9", "attributes": {"font": "base"}}, - "200" : { "value": "#A5D6A7", "attributes": {"font": "base"}}, - "300" : { "value": "#81C784", "attributes": {"font": "base"}}, - "400" : { "value": "#66BB6A", "attributes": {"font": "base"}}, - "500" : { "value": "#4CAF50", "attributes": {"font": "base"}}, - "600" : { "value": "#43A047", "attributes": {"font": "inverse"}}, - "700" : { "value": "#388E3C", "attributes": {"font": "inverse"}}, - "800" : { "value": "#2E7D32", "attributes": {"font": "inverse"}}, - "900" : { "value": "#1B5E20", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#B9F6CA", "attributes": {"font": "base"}}, - "A200" : { "value": "#69F0AE", "attributes": {"font": "base"}}, - "A400" : { "value": "#00E676", "attributes": {"font": "base"}}, - "A700" : { "value": "#00C853", "attributes": {"font": "base"}} - }, - "light_green": { - "50" : { "value": "#F1F8E9", "attributes": {"font": "base"}}, - "100" : { "value": "#DCEDC8", "attributes": {"font": "base"}}, - "200" : { "value": "#C5E1A5", "attributes": {"font": "base"}}, - "300" : { "value": "#AED581", "attributes": {"font": "base"}}, - "400" : { "value": "#9CCC65", "attributes": {"font": "base"}}, - "500" : { "value": "#8BC34A", "attributes": {"font": "base"}}, - "600" : { "value": "#7CB342", "attributes": {"font": "base"}}, - "700" : { "value": "#689F38", "attributes": {"font": "inverse"}}, - "800" : { "value": "#558B2F", "attributes": {"font": "inverse"}}, - "900" : { "value": "#33691E", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#CCFF90", "attributes": {"font": "base"}}, - "A200" : { "value": "#B2FF59", "attributes": {"font": "base"}}, - "A400" : { "value": "#76FF03", "attributes": {"font": "base"}}, - "A700" : { "value": "#64DD17", "attributes": {"font": "base"}} - }, - "lime": { - "50" : { "value": "#F9FBE7", "attributes": {"font": "base"}}, - "100" : { "value": "#F0F4C3", "attributes": {"font": "base"}}, - "200" : { "value": "#E6EE9C", "attributes": {"font": "base"}}, - "300" : { "value": "#DCE775", "attributes": {"font": "base"}}, - "400" : { "value": "#D4E157", "attributes": {"font": "base"}}, - "500" : { "value": "#CDDC39", "attributes": {"font": "base"}}, - "600" : { "value": "#C0CA33", "attributes": {"font": "base"}}, - "700" : { "value": "#AFB42B", "attributes": {"font": "base"}}, - "800" : { "value": "#9E9D24", "attributes": {"font": "base"}}, - "900" : { "value": "#827717", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#F4FF81", "attributes": {"font": "base"}}, - "A200" : { "value": "#EEFF41", "attributes": {"font": "base"}}, - "A400" : { "value": "#C6FF00", "attributes": {"font": "base"}}, - "A700" : { "value": "#AEEA00", "attributes": {"font": "base"}} - }, - "yellow": { - "50" : { "value": "#FFFDE7", "attributes": {"font": "base"}}, - "100" : { "value": "#FFF9C4", "attributes": {"font": "base"}}, - "200" : { "value": "#FFF59D", "attributes": {"font": "base"}}, - "300" : { "value": "#FFF176", "attributes": {"font": "base"}}, - "400" : { "value": "#FFEE58", "attributes": {"font": "base"}}, - "500" : { "value": "#FFEB3B", "attributes": {"font": "base"}}, - "600" : { "value": "#FDD835", "attributes": {"font": "base"}}, - "700" : { "value": "#FBC02D", "attributes": {"font": "base"}}, - "800" : { "value": "#F9A825", "attributes": {"font": "base"}}, - "900" : { "value": "#F57F17", "attributes": {"font": "base"}}, - "A100" : { "value": "#FFFF8D", "attributes": {"font": "base"}}, - "A200" : { "value": "#FFFF00", "attributes": {"font": "base"}}, - "A400" : { "value": "#FFEA00", "attributes": {"font": "base"}}, - "A700" : { "value": "#FFD600", "attributes": {"font": "base"}} - }, - "amber": { - "50" : { "value": "#FFF8E1", "attributes": {"font": "base"}}, - "100" : { "value": "#FFECB3", "attributes": {"font": "base"}}, - "200" : { "value": "#FFE082", "attributes": {"font": "base"}}, - "300" : { "value": "#FFD54F", "attributes": {"font": "base"}}, - "400" : { "value": "#FFCA28", "attributes": {"font": "base"}}, - "500" : { "value": "#FFC107", "attributes": {"font": "base"}}, - "600" : { "value": "#FFB300", "attributes": {"font": "base"}}, - "700" : { "value": "#FFA000", "attributes": {"font": "base"}}, - "800" : { "value": "#FF8F00", "attributes": {"font": "base"}}, - "900" : { "value": "#FF6F00", "attributes": {"font": "base"}}, - "A100" : { "value": "#FFE57F", "attributes": {"font": "base"}}, - "A200" : { "value": "#FFD740", "attributes": {"font": "base"}}, - "A400" : { "value": "#FFC400", "attributes": {"font": "base"}}, - "A700" : { "value": "#FFAB00", "attributes": {"font": "base"}} - }, - "orange": { - "50" : { "value": "#FFF3E0", "attributes": {"font": "base"}}, - "100" : { "value": "#FFE0B2", "attributes": {"font": "base"}}, - "200" : { "value": "#FFCC80", "attributes": {"font": "base"}}, - "300" : { "value": "#FFB74D", "attributes": {"font": "base"}}, - "400" : { "value": "#FFA726", "attributes": {"font": "base"}}, - "500" : { "value": "#FF9800", "attributes": {"font": "base"}}, - "600" : { "value": "#FB8C00", "attributes": {"font": "base"}}, - "700" : { "value": "#F57C00", "attributes": {"font": "base"}}, - "800" : { "value": "#EF6C00", "attributes": {"font": "inverse"}}, - "900" : { "value": "#E65100", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#FFD180", "attributes": {"font": "base"}}, - "A200" : { "value": "#FFAB40", "attributes": {"font": "base"}}, - "A400" : { "value": "#FF9100", "attributes": {"font": "base"}}, - "A700" : { "value": "#FF6D00", "attributes": {"font": "base"}} - }, - "deep_orange": { - "50" : { "value": "#FBE9E7", "attributes": {"font": "base"}}, - "100" : { "value": "#FFCCBC", "attributes": {"font": "base"}}, - "200" : { "value": "#FFAB91", "attributes": {"font": "base"}}, - "300" : { "value": "#FF8A65", "attributes": {"font": "base"}}, - "400" : { "value": "#FF7043", "attributes": {"font": "base"}}, - "500" : { "value": "#FF5722", "attributes": {"font": "inverse"}}, - "600" : { "value": "#F4511E", "attributes": {"font": "inverse"}}, - "700" : { "value": "#E64A19", "attributes": {"font": "inverse"}}, - "800" : { "value": "#D84315", "attributes": {"font": "inverse"}}, - "900" : { "value": "#BF360C", "attributes": {"font": "inverse"}}, - "A100" : { "value": "#FF9E80", "attributes": {"font": "base"}}, - "A200" : { "value": "#FF6E40", "attributes": {"font": "base"}}, - "A400" : { "value": "#FF3D00", "attributes": {"font": "inverse"}}, - "A700" : { "value": "#DD2C00", "attributes": {"font": "inverse"}} - }, - "brown": { - "50" : { "value": "#EFEBE9", "attributes": {"font": "base"}}, - "100" : { "value": "#D7CCC8", "attributes": {"font": "base"}}, - "200" : { "value": "#BCAAA4", "attributes": {"font": "base"}}, - "300" : { "value": "#A1887F", "attributes": {"font": "inverse"}}, - "400" : { "value": "#8D6E63", "attributes": {"font": "inverse"}}, - "500" : { "value": "#795548", "attributes": {"font": "inverse"}}, - "600" : { "value": "#6D4C41", "attributes": {"font": "inverse"}}, - "700" : { "value": "#5D4037", "attributes": {"font": "inverse"}}, - "800" : { "value": "#4E342E", "attributes": {"font": "inverse"}}, - "900" : { "value": "#3E2723", "attributes": {"font": "inverse"}} - }, - "grey": { - "50" : { "value": "#FAFAFA", "attributes": {"font": "base"}}, - "100" : { "value": "#F5F5F5", "attributes": {"font": "base"}}, - "200" : { "value": "#EEEEEE", "attributes": {"font": "base"}}, - "300" : { "value": "#E0E0E0", "attributes": {"font": "base"}}, - "400" : { "value": "#BDBDBD", "attributes": {"font": "base"}}, - "500" : { "value": "#9E9E9E", "attributes": {"font": "base"}}, - "600" : { "value": "#757575", "attributes": {"font": "inverse"}}, - "700" : { "value": "#616161", "attributes": {"font": "inverse"}}, - "800" : { "value": "#424242", "attributes": {"font": "inverse"}}, - "900" : { "value": "#212121", "attributes": {"font": "inverse"}} - }, - "blue_grey": { - "50" : { "value": "#ECEFF1", "attributes": {"font": "base"}}, - "100" : { "value": "#CFD8DC", "attributes": {"font": "base"}}, - "200" : { "value": "#B0BEC5", "attributes": {"font": "base"}}, - "300" : { "value": "#90A4AE", "attributes": {"font": "base"}}, - "400" : { "value": "#78909C", "attributes": {"font": "inverse"}}, - "500" : { "value": "#607D8B", "attributes": {"font": "inverse"}}, - "600" : { "value": "#546E7A", "attributes": {"font": "inverse"}}, - "700" : { "value": "#455A64", "attributes": {"font": "inverse"}}, - "800" : { "value": "#37474F", "attributes": {"font": "inverse"}}, - "900" : { "value": "#263238", "attributes": {"font": "inverse"}} - }, - - "white": { "value": "#ffffff" }, - "black": { "value": "#000000" } - } - } -} diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 000000000..45d82d12b --- /dev/null +++ b/examples/README.md @@ -0,0 +1,53 @@ +Style Dictionary logo + +# Examples + +Here you can find some sample projects to get started, or to find inspiration on how to customise and extend the Style Dictionary framework to create the files you need. + +## Setup + +To use one of these examples, clone (or [download](https://github.com/amzn/style-dictionary/archive/master.zip)) from GitHub the project and copy the folder of the example that you want to use. Inside the folder you will find a `README.md` file with the instructions on how to do the initial setup and run the `build` process. + +You can alternatively start a new project from one of the `basic` or `complete` examples using the CLI: + +```bash +$ mkdir MyFolder +$ cd MyFolder +$ style-dictionary init [example] +``` + +Where `[example]` is one of: `basic`, `complete`. + +This will create a copy of the example in `MyFolder` and start the build process, running `style-dictionary build` for the first time to generate the artifacts. + +## Basic +[View the example](https://github.com/amzn/style-dictionary/tree/master/example/basic) + +This example code is bare-bones to show you what this framework can do. Use this if you want to play around with what the Style Dictionary can do. + + +## Complete +[View the example](https://github.com/amzn/style-dictionary/tree/master/example/complete) + +This is a more complete package and should have everything you need to get started. This package can be consumed as a Cocoapod on iOS, as a node module for web, and as a local library for Android. + +## Advanced +[View the folder](https://github.com/amzn/style-dictionary/tree/master/example/advanced) + +If you want to look at more advanced examples of possible applications and customisations of Style Dictionary, the `examples/advanced` folder on GitHub contains these extra folders: + +* [**assets-base64-embed**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/assets-base64-embed) shows how it's possible to embed and distribute assets – like images, icons and fonts – directly as design tokens. +* [**auto-rebuild-watcher**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/auto-rebuild-watcher) shows how to setup a "watcher" that auto-rebuilds the tokens every time there is a change in the properties. +* [**custom-templates**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/custom-templates/custom-templates) shows how to use "custom" templates to generate design tokens files with custom formats, useful when you need to distribute your design tokens and integrate them with custom pipelines or scripts. +* [**custom-transforms**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/custom-templates/custom-transforms) shows how to use custom tranforms (and transformGroups) to apply custom "tranformations" to the properties when converted to design tokens. +* [**multi-brand-multi-platform**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/multi-brand-multi-platform) shows how to set up Style Dictionary to support a multi-brand (for brand theming) and multi-platform (web, iOS, Android) solution, with property values depending on brand and plaforms. +* [**npm-module**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/npm-module) shows how to set up a style dictionary as an npm module, either to publish to a local npm service or to publish externally. +* [**s3**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/s3) shows how to set up a style dictionary to build files for different platforms (web, iOS, Android) and upload those build artifacts, together with a group of assets, to an S3 bucket. +* [**referencing_aliasing**](https://github.com/amzn/style-dictionary/tree/master/example/advanced/referencing_aliasing) shows how to use referencing (or "aliasing") to reference a value -or an attribute– of a property and assign it to the value –or attribute– of another property. + + +--- + +#### Do you think an example is missing?
Do you want to see another example added to the project?
Do you have a working example that we can add to the list? + +Fantastic! Let us know by [filing an issue](https://github.com/amzn/style-dictionary/issues) or sending us an email: style-dictionary@amazon.com. diff --git a/example/npm/.gitignore b/examples/advanced/assets-base64-embed/.gitignore similarity index 100% rename from example/npm/.gitignore rename to examples/advanced/assets-base64-embed/.gitignore diff --git a/examples/advanced/assets-base64-embed/README.md b/examples/advanced/assets-base64-embed/README.md new file mode 100644 index 000000000..6ade22f7f --- /dev/null +++ b/examples/advanced/assets-base64-embed/README.md @@ -0,0 +1,75 @@ +## Embed assets as base64 + +This example shows how it's possible to embed and distribute assets – like **images, icons and fonts** – directly as design tokens. + +This means that you can centralise all your "core" design values in one single place and one single format, and make their distribution (and consumption) much easier. + +#### Running the example + +First of all, set up the required dependencies running the command `npm install` in your local CLI environment (if you prefer to use *yarn* update the commands accordingly). + +At this point, run `npm run build`. This command will generate the files in the `build` folder. + +#### How does it work + +In Style Dictionary it is possible to associate to the `value` of a property the path of a file. During the build process, the property is processed and the asset converted to a **base64 string**. In this way the asset can be distributed **embedded** in an output file that has a pre-defined format of your choice (JSON, JS, Sass, XML, PLIST, etc), and this can be then later consumed directly in your application or website. + +For example, in **JavaScript** this code: + +``` +` +``` + +will be rendered as: + +``` + +``` +and in **Sass** this code: + +``` +background-image: url('data:image/png;base64,$asset-image-logo'); +``` +will be rendered as: + +``` +background-image: url('data:image/png;base64,PHN2ZyB4bWxucz0iaHR0...'); +``` + +#### What to look at + +Open the `config.json` file and see how all the "assets/embed/*" platform blocks are configured: + +``` + "assets/embed/json": { + "transforms": ["attribute/cti", "name/cti/kebab", "asset/base64"], + "buildPath": "build/json/", + "files": [{ + "destination": "assets_icons.json", + "format": "json/flat", + "filter": { + "attributes": { "category":"asset", "type":"icon" } + } + } + ... +``` + +Here there are **three specific transforms**: *attribute/cti* to assign the Category/Type/Item attributes to the tokens, *name/cti/kebab* to assign them the correct name, and finally *asset/base64* to take the path declared in the "value" of the properties, convert the file at that path in base64 format, and assign the output of the base64 conversion to the "value" of the property. + +If you take for example the file `assets/icons.json` you will see this declaration: + +``` + "asset": { + "icon": { + "alert-circle": { "value": "assets/icons/alert-circle.svg" } + +``` +where the value of the `alert-circle` property is a path that points to the `alert-circle.svg` file in the `assets/icons/` folder. + +Now, `build` the dictionary and open the generated file `build/scss/assets_icons.scss`, and you will see this result: + +``` +$asset-icon-alert-circle: "PHN2ZyB4bWxucz0iaHR0... +``` + +As you can see, the asset has been converted to a base64 string and its value associated to a design token. diff --git a/example/complete/assets/fonts/MaterialIcons-Regular.eot b/examples/advanced/assets-base64-embed/assets/fonts/MaterialIcons-Regular.eot similarity index 100% rename from example/complete/assets/fonts/MaterialIcons-Regular.eot rename to examples/advanced/assets-base64-embed/assets/fonts/MaterialIcons-Regular.eot diff --git a/example/complete/assets/fonts/MaterialIcons-Regular.ttf b/examples/advanced/assets-base64-embed/assets/fonts/MaterialIcons-Regular.ttf similarity index 100% rename from example/complete/assets/fonts/MaterialIcons-Regular.ttf rename to examples/advanced/assets-base64-embed/assets/fonts/MaterialIcons-Regular.ttf diff --git a/example/complete/assets/fonts/MaterialIcons-Regular.woff b/examples/advanced/assets-base64-embed/assets/fonts/MaterialIcons-Regular.woff similarity index 100% rename from example/complete/assets/fonts/MaterialIcons-Regular.woff rename to examples/advanced/assets-base64-embed/assets/fonts/MaterialIcons-Regular.woff diff --git a/example/complete/assets/fonts/MaterialIcons-Regular.woff2 b/examples/advanced/assets-base64-embed/assets/fonts/MaterialIcons-Regular.woff2 similarity index 100% rename from example/complete/assets/fonts/MaterialIcons-Regular.woff2 rename to examples/advanced/assets-base64-embed/assets/fonts/MaterialIcons-Regular.woff2 diff --git a/example/complete/assets/fonts/OpenSans-Regular.ttf b/examples/advanced/assets-base64-embed/assets/fonts/OpenSans-Regular.ttf similarity index 100% rename from example/complete/assets/fonts/OpenSans-Regular.ttf rename to examples/advanced/assets-base64-embed/assets/fonts/OpenSans-Regular.ttf diff --git a/example/complete/assets/fonts/Roboto-Regular.ttf b/examples/advanced/assets-base64-embed/assets/fonts/Roboto-Regular.ttf similarity index 100% rename from example/complete/assets/fonts/Roboto-Regular.ttf rename to examples/advanced/assets-base64-embed/assets/fonts/Roboto-Regular.ttf diff --git a/examples/advanced/assets-base64-embed/assets/icons/alert-circle.svg b/examples/advanced/assets-base64-embed/assets/icons/alert-circle.svg new file mode 100644 index 000000000..6b41c0b95 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/alert-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/alert-octagon.svg b/examples/advanced/assets-base64-embed/assets/icons/alert-octagon.svg new file mode 100644 index 000000000..6943b6d02 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/alert-octagon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/alert-triangle.svg b/examples/advanced/assets-base64-embed/assets/icons/alert-triangle.svg new file mode 100644 index 000000000..59e65b15b --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/alert-triangle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/archive.svg b/examples/advanced/assets-base64-embed/assets/icons/archive.svg new file mode 100644 index 000000000..428882c87 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/archive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/book-open.svg b/examples/advanced/assets-base64-embed/assets/icons/book-open.svg new file mode 100644 index 000000000..5e0ca0ab7 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/book-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/book.svg b/examples/advanced/assets-base64-embed/assets/icons/book.svg new file mode 100644 index 000000000..12ffcbc46 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/bookmark.svg b/examples/advanced/assets-base64-embed/assets/icons/bookmark.svg new file mode 100644 index 000000000..2239cc580 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/bookmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/briefcase.svg b/examples/advanced/assets-base64-embed/assets/icons/briefcase.svg new file mode 100644 index 000000000..e3af05060 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/briefcase.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/calendar.svg b/examples/advanced/assets-base64-embed/assets/icons/calendar.svg new file mode 100644 index 000000000..6c7fd870d --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/camera.svg b/examples/advanced/assets-base64-embed/assets/icons/camera.svg new file mode 100644 index 000000000..0e7f06037 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/check-circle.svg b/examples/advanced/assets-base64-embed/assets/icons/check-circle.svg new file mode 100644 index 000000000..f2f4fd1af --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/check-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/check-square.svg b/examples/advanced/assets-base64-embed/assets/icons/check-square.svg new file mode 100644 index 000000000..72ab7a806 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/check-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/database.svg b/examples/advanced/assets-base64-embed/assets/icons/database.svg new file mode 100644 index 000000000..c296fbcfd --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/database.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/delete.svg b/examples/advanced/assets-base64-embed/assets/icons/delete.svg new file mode 100644 index 000000000..8c6074b96 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/delete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/dollar-sign.svg b/examples/advanced/assets-base64-embed/assets/icons/dollar-sign.svg new file mode 100644 index 000000000..1a124d269 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/dollar-sign.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/download-cloud.svg b/examples/advanced/assets-base64-embed/assets/icons/download-cloud.svg new file mode 100644 index 000000000..f3126fc39 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/download-cloud.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/edit-1.svg b/examples/advanced/assets-base64-embed/assets/icons/edit-1.svg new file mode 100644 index 000000000..ed7fdfdd5 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/edit-1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/edit-2.svg b/examples/advanced/assets-base64-embed/assets/icons/edit-2.svg new file mode 100644 index 000000000..867fde42e --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/edit-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/edit-3.svg b/examples/advanced/assets-base64-embed/assets/icons/edit-3.svg new file mode 100644 index 000000000..310732cc4 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/edit-3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/external-link.svg b/examples/advanced/assets-base64-embed/assets/icons/external-link.svg new file mode 100644 index 000000000..6236df3e0 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/external-link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/file-text.svg b/examples/advanced/assets-base64-embed/assets/icons/file-text.svg new file mode 100644 index 000000000..4197ddd40 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/file-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/file.svg b/examples/advanced/assets-base64-embed/assets/icons/file.svg new file mode 100644 index 000000000..378519ab6 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/film.svg b/examples/advanced/assets-base64-embed/assets/icons/film.svg new file mode 100644 index 000000000..ac46360d2 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/film.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/folder.svg b/examples/advanced/assets-base64-embed/assets/icons/folder.svg new file mode 100644 index 000000000..134458b98 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/folder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/gift.svg b/examples/advanced/assets-base64-embed/assets/icons/gift.svg new file mode 100644 index 000000000..d2c14bd69 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/gift.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/github.svg b/examples/advanced/assets-base64-embed/assets/icons/github.svg new file mode 100644 index 000000000..ff0af4811 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/globe.svg b/examples/advanced/assets-base64-embed/assets/icons/globe.svg new file mode 100644 index 000000000..0a0586d36 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/icons/grid.svg b/examples/advanced/assets-base64-embed/assets/icons/grid.svg new file mode 100644 index 000000000..8ef2e9d87 --- /dev/null +++ b/examples/advanced/assets-base64-embed/assets/icons/grid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/assets-base64-embed/assets/images/logo.png b/examples/advanced/assets-base64-embed/assets/images/logo.png new file mode 100644 index 000000000..63c284ec5 Binary files /dev/null and b/examples/advanced/assets-base64-embed/assets/images/logo.png differ diff --git a/examples/advanced/assets-base64-embed/config.json b/examples/advanced/assets-base64-embed/config.json new file mode 100644 index 000000000..f93e9a52d --- /dev/null +++ b/examples/advanced/assets-base64-embed/config.json @@ -0,0 +1,98 @@ +{ + "source": ["properties/**/*.json"], + "platforms": { + "scss": { + "transformGroup": "scss", + "buildPath": "build/scss/", + "files": [{ + "destination": "colors.scss", + "format": "scss/variables", + "filter": { + "attributes": { + "category": "color" + } + } + },{ + "destination": "sizes.scss", + "format": "scss/variables", + "filter": { + "attributes": { + "category": "size" + } + } + }] + }, + "json": { + "transformGroup": "web", + "buildPath": "build/json/", + "files": [{ + "destination": "variables.json", + "format": "json/flat" + }] + }, + "assets/embed/scss": { + "transforms": ["attribute/cti", "name/cti/kebab", "asset/base64"], + "buildPath": "build/scss/", + "files": [{ + "destination": "assets_icons.scss", + "format": "scss/variables", + "filter": { + "attributes": { + "category": "asset", + "type": "icon" + } + } + },{ + "destination": "assets_images.scss", + "format": "scss/variables", + "filter": { + "attributes": { + "category": "asset", + "type": "image" + } + } + },{ + "destination": "assets_fonts.scss", + "format": "scss/variables", + "filter": { + "attributes": { + "category": "asset", + "type": "font" + } + } + }] + }, + "assets/embed/json": { + "transforms": ["attribute/cti", "name/cti/kebab", "asset/base64"], + "buildPath": "build/json/", + "files": [{ + "destination": "assets_icons.json", + "format": "json/flat", + "filter": { + "attributes": { + "category": "asset", + "type": "icon" + } + } + },{ + "destination": "assets_images.json", + "format": "json/flat", + "filter": { + "attributes": { + "category": "asset", + "type": "image" + } + } + },{ + "destination": "assets_fonts.json", + "format": "json/flat", + "filter": { + "attributes": { + "category": "asset", + "type": "font" + } + } + }] + } + } +} diff --git a/example/react/package.json b/examples/advanced/assets-base64-embed/package.json similarity index 71% rename from example/react/package.json rename to examples/advanced/assets-base64-embed/package.json index 2fa2a56a8..784d50acd 100644 --- a/example/react/package.json +++ b/examples/advanced/assets-base64-embed/package.json @@ -1,15 +1,16 @@ { - "name": "style-dictionary-example-react", + "name": "style-dictionary-assets-base64-embed", "version": "1.0.0", "description": "", "main": "build.js", "scripts": { "build": "node_modules/.bin/style-dictionary build", + "clean": "rm -rf build", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "Apache-2.0", "devDependencies": { - "style-dictionary": "2.5.0" + "style-dictionary": "2.6.0" } } \ No newline at end of file diff --git a/example/react/properties/asset/font.json b/examples/advanced/assets-base64-embed/properties/assets/fonts.json similarity index 74% rename from example/react/properties/asset/font.json rename to examples/advanced/assets-base64-embed/properties/assets/fonts.json index 5a61e3d39..d992a28ef 100644 --- a/example/react/properties/asset/font.json +++ b/examples/advanced/assets-base64-embed/properties/assets/fonts.json @@ -1,21 +1,18 @@ { "asset": { "font": { - "icon": { + "materialicons": { "ttf" : { "value": "assets/fonts/MaterialIcons-Regular.ttf" }, - "otf" : { "value": "assets/fonts/MaterialIcons-Regular.otf" }, "eot" : { "value": "assets/fonts/MaterialIcons-Regular.eot" }, "woff" : { "value": "assets/fonts/MaterialIcons-Regular.woff" }, "woff2": { "value": "assets/fonts/MaterialIcons-Regular.woff2" } }, "opensans": { - "name" : { "value": "Open Sans" }, "ttf" : { "value": "assets/fonts/OpenSans-Regular.ttf" } }, "roboto": { - "name" : { "value": "Roboto" }, "ttf" : { "value": "assets/fonts/Roboto-Regular.ttf" } } - } + } } } diff --git a/examples/advanced/assets-base64-embed/properties/assets/icons.json b/examples/advanced/assets-base64-embed/properties/assets/icons.json new file mode 100644 index 000000000..83ca09fb1 --- /dev/null +++ b/examples/advanced/assets-base64-embed/properties/assets/icons.json @@ -0,0 +1,34 @@ +{ + "asset": { + "icon": { + "alert-circle": { "value": "assets/icons/alert-circle.svg" }, + "alert-octagon": { "value": "assets/icons/alert-octagon.svg" }, + "alert-triangle": { "value": "assets/icons/alert-triangle.svg" }, + "archive": { "value": "assets/icons/archive.svg" }, + "book-open": { "value": "assets/icons/book-open.svg" }, + "book": { "value": "assets/icons/book.svg" }, + "bookmark": { "value": "assets/icons/bookmark.svg" }, + "briefcase": { "value": "assets/icons/briefcase.svg" }, + "calendar": { "value": "assets/icons/calendar.svg" }, + "camera": { "value": "assets/icons/camera.svg" }, + "check-circle": { "value": "assets/icons/check-circle.svg" }, + "check-square": { "value": "assets/icons/check-square.svg" }, + "database": { "value": "assets/icons/database.svg" }, + "delete": { "value": "assets/icons/delete.svg" }, + "dollar-sign": { "value": "assets/icons/dollar-sign.svg" }, + "download-cloud": { "value": "assets/icons/download-cloud.svg" }, + "edit-1": { "value": "assets/icons/edit-1.svg" }, + "edit-2": { "value": "assets/icons/edit-2.svg" }, + "edit-3": { "value": "assets/icons/edit-3.svg" }, + "external-link": { "value": "assets/icons/external-link.svg" }, + "file-text": { "value": "assets/icons/file-text.svg" }, + "file": { "value": "assets/icons/file.svg" }, + "film": { "value": "assets/icons/film.svg" }, + "folder": { "value": "assets/icons/folder.svg" }, + "gift": { "value": "assets/icons/gift.svg" }, + "github": { "value": "assets/icons/github.svg" }, + "globe": { "value": "assets/icons/globe.svg" }, + "grid": { "value": "assets/icons/grid.svg" } + } + } +} diff --git a/examples/advanced/assets-base64-embed/properties/assets/images.json b/examples/advanced/assets-base64-embed/properties/assets/images.json new file mode 100644 index 000000000..61b273e18 --- /dev/null +++ b/examples/advanced/assets-base64-embed/properties/assets/images.json @@ -0,0 +1,7 @@ +{ + "asset": { + "image": { + "logo": { "value": "assets/images/logo.png" } + } + } +} diff --git a/example/basic/properties/color/base.json b/examples/advanced/assets-base64-embed/properties/color/base.json similarity index 68% rename from example/basic/properties/color/base.json rename to examples/advanced/assets-base64-embed/properties/color/base.json index 3822ab513..02a99d700 100644 --- a/example/basic/properties/color/base.json +++ b/examples/advanced/assets-base64-embed/properties/color/base.json @@ -5,7 +5,9 @@ "light" : { "value": "#CCCCCC" }, "medium": { "value": "#999999" }, "dark" : { "value": "#111111" } - } + }, + "red": { "value": "#FF0000" }, + "green": { "value": "#00FF00" } } } } diff --git a/examples/advanced/assets-base64-embed/properties/color/font.json b/examples/advanced/assets-base64-embed/properties/color/font.json new file mode 100644 index 000000000..df0b84832 --- /dev/null +++ b/examples/advanced/assets-base64-embed/properties/color/font.json @@ -0,0 +1,9 @@ +{ + "color": { + "font": { + "base" : { "value": "{color.base.red.value}" }, + "secondary": { "value": "{color.base.green.value}" }, + "tertiary" : { "value": "{color.base.gray.light.value}" } + } + } +} diff --git a/example/basic/properties/size/font.json b/examples/advanced/assets-base64-embed/properties/size/font.json similarity index 100% rename from example/basic/properties/size/font.json rename to examples/advanced/assets-base64-embed/properties/size/font.json diff --git a/example/s3/.gitignore b/examples/advanced/auto-rebuild-watcher/.gitignore similarity index 100% rename from example/s3/.gitignore rename to examples/advanced/auto-rebuild-watcher/.gitignore diff --git a/examples/advanced/auto-rebuild-watcher/README.md b/examples/advanced/auto-rebuild-watcher/README.md new file mode 100644 index 000000000..8dbafc87b --- /dev/null +++ b/examples/advanced/auto-rebuild-watcher/README.md @@ -0,0 +1,31 @@ +## How to use a watcher to auto-rebuild + +This example shows how to use a "watcher" to rebuild automatically the files every time a property file is updated. + +This is very handy when there are continuous changes to the token values (e.g. during development) and we want to avoid to run the "build" command at every update. + +#### Running the example + +First of all, set up the required dependencies running the command `npm install` in your local CLI environment (if you prefer to use *yarn* update the commands accordingly). + +At this point, if you want to build once the tokens you can run `npm run build`. This command will generate the files in the `build` folder. + +If instead you want to automatically build the tokens every time a property file is updated, run the command `npm run watch` in your CLI. + +This will start to watch the files in the "properties" folder, and whenever a file is updated and saved, the files in `build` are re-generated with the new/updated values. + +If you want to see it in action, open one of the files generated in "build", open a property file and update one of the values: you will see immediately updated also the generated file. + +**Important**: when in "watch" mode, to interrupt and exit the process and get back to your command line, use the `ctrl-c` command in your terminal. + +#### How does it work + +The "watch" runner will start a process (using a special filesystem watcher called [Chokidar](https://github.com/paulmillr/chokidar)) that will listen to changes to a list of "watched" files. Whenever one of this file is changed/updated (more precisely, is saved to disk) the watch process will trigger a command specified by the user (as an argument passed to the watcher). + +In this example, we have selected all the JSON files in the `props` folder (using the glob pattern `properties/**/*.json`) but you can specify your own path of watched files. + +The command that we automatically run at every update is the `npm run build` command, passed as parameter to the watcher via `-c 'npm run build'`. + +#### What to look at + +Open the `package.json` file and see how in the "scripts" block there is an additional entry for "watch". This is the way the "watch" mode is invoked and run. \ No newline at end of file diff --git a/example/basic/config.json b/examples/advanced/auto-rebuild-watcher/config.json similarity index 100% rename from example/basic/config.json rename to examples/advanced/auto-rebuild-watcher/config.json diff --git a/examples/advanced/auto-rebuild-watcher/package.json b/examples/advanced/auto-rebuild-watcher/package.json new file mode 100644 index 000000000..f5cf42e5c --- /dev/null +++ b/examples/advanced/auto-rebuild-watcher/package.json @@ -0,0 +1,22 @@ +{ + "name": "style-dictionary-auto-rebuild-watcher", + "version": "1.0.0", + "description": "", + "main": "build/index.js", + "files": [ + "build", + "properties" + ], + "scripts": { + "build": "node_modules/.bin/style-dictionary build", + "clean": "rm -rf build", + "watch": "npm run build && chokidar 'properties/**/*.json' -c 'npm run build'", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "Apache-2.0", + "devDependencies": { + "chokidar-cli": "^1.2.0", + "style-dictionary": "2.6.0" + } +} \ No newline at end of file diff --git a/examples/advanced/auto-rebuild-watcher/properties/color/base.json b/examples/advanced/auto-rebuild-watcher/properties/color/base.json new file mode 100644 index 000000000..02a99d700 --- /dev/null +++ b/examples/advanced/auto-rebuild-watcher/properties/color/base.json @@ -0,0 +1,13 @@ +{ + "color": { + "base": { + "gray": { + "light" : { "value": "#CCCCCC" }, + "medium": { "value": "#999999" }, + "dark" : { "value": "#111111" } + }, + "red": { "value": "#FF0000" }, + "green": { "value": "#00FF00" } + } + } +} diff --git a/examples/advanced/auto-rebuild-watcher/properties/color/font.json b/examples/advanced/auto-rebuild-watcher/properties/color/font.json new file mode 100644 index 000000000..df0b84832 --- /dev/null +++ b/examples/advanced/auto-rebuild-watcher/properties/color/font.json @@ -0,0 +1,9 @@ +{ + "color": { + "font": { + "base" : { "value": "{color.base.red.value}" }, + "secondary": { "value": "{color.base.green.value}" }, + "tertiary" : { "value": "{color.base.gray.light.value}" } + } + } +} diff --git a/examples/advanced/auto-rebuild-watcher/properties/size/font.json b/examples/advanced/auto-rebuild-watcher/properties/size/font.json new file mode 100644 index 000000000..24e7b8034 --- /dev/null +++ b/examples/advanced/auto-rebuild-watcher/properties/size/font.json @@ -0,0 +1,22 @@ +{ + "size": { + "font": { + "small" : { + "value": "0.75", + "comment": "the small size of the font" + }, + "medium": { + "value": "1", + "comment": "the medium size of the font" + }, + "large" : { + "value": "2", + "comment": "the large size of the font" + }, + "base" : { + "value": "{size.font.medium.value}", + "comment": "the base size of the font" + } + } + } +} diff --git a/examples/advanced/custom-templates/.gitignore b/examples/advanced/custom-templates/.gitignore new file mode 100644 index 000000000..3e2e84b08 --- /dev/null +++ b/examples/advanced/custom-templates/.gitignore @@ -0,0 +1,2 @@ +build/ +node_modules/ diff --git a/examples/advanced/custom-templates/README.md b/examples/advanced/custom-templates/README.md new file mode 100644 index 000000000..be84e8427 --- /dev/null +++ b/examples/advanced/custom-templates/README.md @@ -0,0 +1,75 @@ +## Custom templates + +This example shows how to use "custom" templates to generate design tokens files with custom formats. This is useful when you need to distribute your design tokens and integrate them with custom pipelines or scripts, that expect specific formats, or if you have very specific needs that are not covered out-of-the-box by Style Dictionary. + +**Notice**: before starting to dig into all the possible customisations that you can have, try the default settings offered by the library, look at the output files, and see if they can suit your needs. Probably they will do. If they don't, think how you want the output files generated, and see which one of the API methods you can use for that specific scope. + +#### Running the example + +First of all, set up the required dependencies running the command `npm install` in your local CLI environment (if you prefer to use *yarn* update the commands accordingly). + +At this point, if you want to build the tokens you can run `npm run build`. This command will generate the files in the `build` folder. + +#### How does it work + +The "build" command will run the custom script `build.js`, that contains three different custom templates, one for every platform declared in the `config.js` file. For example, this is the custom template declaration for the "android" platform: + +``` +StyleDictionary.registerTemplate({ + name: 'custom/template/android-xml', + template: __dirname + '/templates/android-xml.template' +}); +``` + +As you can see, the `registerTemplate` [API method](https://amzn.github.io/style-dictionary/#/api?id=registertemplate) is invoked, passing a custom name for the template (you can choose whatever you like, it's just a string) and a path to a templating file (these templates expect the Lodash ["template"](https://lodash.com/docs/4.17.10#template) syntax). + +The template is then used in the `config.js` file and passed to a `file` declaration for a platform (look at the `config.js` file in the example to see how it is used). + +Using this approach to create custom file formats for the generation of design token files is quite simple, but is not the only method that can be used. Alternatively, you can use the `registerFormat` [API method](https://amzn.github.io/style-dictionary/#/api?id=registerformat). In this case, the method still expects a custom name, but instead of a template file as a second argument, it expects a formatting function that returns the content to be saved to file: + +``` +const templateCustomXml = handlebars.compile(fs.readFileSync(__dirname + '/templates/android-xml_alt.hbs', 'utf8')); + +StyleDictionary.registerFormat({ + name: 'custom/format/android-xml', + formatter: function(dictionary, platform) { + return templateCustomXml({ + properties: dictionary.properties, + allProperties: dictionary.allProperties, + options: platform + }); + } +}); +``` + +For the formatting function, it's possible to use any templating language (Lodash, Mustache, PUG, anything that can return a string). In the example, we have used three different languages to show the differences. + +#### What to look at + +Open the `config.js` file and see how for each platform there are two kinds of `files` declarations, one that uses a custom template and one that uses a custom format. + +``` +"android": { + "transformGroup": "android", + "buildPath": "build/android/", + "files": [{ + "destination": "tokens_template.xml", + "template": "custom/template/android-xml" + },{ + "destination": "tokens_format.xml", + "format": "custom/format/android-xml" + }] +} +``` + +Now open the `build.js` script and look at how these custom template/formats are declared. As said above, we show both the possible approaches, using both the `registerTemplate` and `registerFormat` API methods to highlight the differences between the two. The first one is simpler, but relies on Lodash "template" syntax, the second is slightly more complex, but you can use whatever templating language you prefer. + +One interesting thing to notice is that the same file `templates/web-scss.template` is used in both a `registerTemplate` and `registerFormat` declaration. This is to show how, in reality, these two methods are completely equivalent. + +Finally, look at the different template files in the `templates` folder and see how they are built to generate custom file formats in output: + +* **web-scss.template**: this is a template that uses [Lodash](https://lodash.com/docs/4.17.10#template), and shows how you can create a custom format for Sass/Scss files. The same approach can be used if you need other custom formats for the web (or other platforms too). +* **android-xml.template**: this template too uses Lodash, and shows how to create a custom XML format for Android, that can be read as "resource file". This is just one of the many possible formats for Android, so if you need to create one speak with your developers to agree on the format they want. +* **android-xml_alt.hbs**: this is an alternative example of custom XML format for Android, that uses [Handlebar](https://handlebarsjs.com) as templating language. +* **ios-plist.template**: this template too uses Lodash, and shows how to create a custom PLIST format for iOS, that can be read as "resource file". This is just one of the many possible formats for iOS, so if you need to create one speak with your developers to agree on the format they want. +* **ios-plist_alt.pug**: this is an alternative example of custom XML format for Android, that uses [Pug](https://pugjs.org/api/getting-started.html) as templating language. diff --git a/examples/advanced/custom-templates/build.js b/examples/advanced/custom-templates/build.js new file mode 100644 index 000000000..2329627af --- /dev/null +++ b/examples/advanced/custom-templates/build.js @@ -0,0 +1,81 @@ +const StyleDictionary = require('style-dictionary').extend(__dirname + '/config.json'); +const fs = require('fs'); +const _ = require('lodash'); +const handlebars = require('handlebars'); +const pug = require('pug'); + + +console.log('Build started...'); +console.log('\n=============================================='); + + +// DECLARE CUSTOM TEMPLATES +// Notice: these templates expect the Lodash "template" syntax + +StyleDictionary.registerTemplate({ + name: 'custom/template/scss', + template: __dirname + '/templates/web-scss.template' +}); + +StyleDictionary.registerTemplate({ + name: 'custom/template/ios-plist', + template: __dirname + '/templates/ios-plist.template' +}); + +StyleDictionary.registerTemplate({ + name: 'custom/template/android-xml', + template: __dirname + '/templates/android-xml.template' +}); + + +// DECLARE CUSTOM FORMATS VIA CUSTOM TEMPLATES +// Notice: this is an alternative way to use custom templates to generate token files with custom formats + +// in this case we are using the same template as above, to declare a custom format +const templateCustomScss = _.template(fs.readFileSync(__dirname + '/templates/web-scss.template')); + +StyleDictionary.registerFormat({ + name: 'custom/format/scss', + formatter: function(dictionary, platform) { + return templateCustomScss({ + allProperties: dictionary.allProperties + }); + } +}); + +// In this case we are using an alternative templating engine (Handlebars) +const templateCustomXml = handlebars.compile(fs.readFileSync(__dirname + '/templates/android-xml_alt.hbs', 'utf8')); + +StyleDictionary.registerFormat({ + name: 'custom/format/android-xml', + formatter: function(dictionary, platform) { + return templateCustomXml({ + // this is just to show that the formatter function takes a "dictionary" and "platform" parameters + // (and dictionary has a "properties" and "allProperties" attributes) + // and returns a string. for more details about the "formatter" function refer to the documentation + allProperties: dictionary.allProperties, + properties: dictionary.properties, + options: platform + }); + } +}); + +// ... and here another templating engine (Pug) +const templateCustomPlist = pug.compileFile(__dirname + '/templates/ios-plist_alt.pug', { pretty: true }); + +StyleDictionary.registerFormat({ + name: 'custom/format/ios-plist', + formatter: function(dictionary) { + return templateCustomPlist({ + allProperties: dictionary.allProperties + }); + } +}); + + +// FINALLY, BUILD ALL THE PLATFORMS +StyleDictionary.buildAllPlatforms(); + + +console.log('\n=============================================='); +console.log('\nBuild completed!'); diff --git a/examples/advanced/custom-templates/config.json b/examples/advanced/custom-templates/config.json new file mode 100644 index 000000000..5e23aea8a --- /dev/null +++ b/examples/advanced/custom-templates/config.json @@ -0,0 +1,38 @@ +{ + "source": ["properties/**/*.json"], + "platforms": { + "scss": { + "transformGroup": "web", + "buildPath": "build/web/", + "files": [{ + "destination": "tokens_template.scss", + "template": "custom/template/scss" + },{ + "destination": "tokens_format.scss", + "format": "custom/format/scss" + }] + }, + "android": { + "transformGroup": "android", + "buildPath": "build/android/", + "files": [{ + "destination": "tokens_template.xml", + "template": "custom/template/android-xml" + },{ + "destination": "tokens_format.xml", + "format": "custom/format/android-xml" + }] + }, + "ios": { + "transformGroup": "ios", + "buildPath": "build/ios/", + "files": [{ + "destination": "tokens_template.plist", + "template": "custom/template/ios-plist" + },{ + "destination": "tokens_format.plist", + "format": "custom/format/ios-plist" + }] + } + } +} diff --git a/examples/advanced/custom-templates/package.json b/examples/advanced/custom-templates/package.json new file mode 100644 index 000000000..bf3d0bf60 --- /dev/null +++ b/examples/advanced/custom-templates/package.json @@ -0,0 +1,24 @@ +{ + "name": "style-dictionary-custom-templates", + "version": "1.0.0", + "description": "", + "main": "build/index.js", + "files": [ + "build", + "properties" + ], + "scripts": { + "build": "node ./build.js", + "clean": "rm -rf build", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "Apache-2.0", + "devDependencies": { + "fs": "^0.0.1-security", + "handlebars": "^4.0.12", + "lodash": "^4.17.11", + "pug": "^2.0.3", + "style-dictionary": "2.6.0" + } +} \ No newline at end of file diff --git a/examples/advanced/custom-templates/properties/color/base.json b/examples/advanced/custom-templates/properties/color/base.json new file mode 100644 index 000000000..02a99d700 --- /dev/null +++ b/examples/advanced/custom-templates/properties/color/base.json @@ -0,0 +1,13 @@ +{ + "color": { + "base": { + "gray": { + "light" : { "value": "#CCCCCC" }, + "medium": { "value": "#999999" }, + "dark" : { "value": "#111111" } + }, + "red": { "value": "#FF0000" }, + "green": { "value": "#00FF00" } + } + } +} diff --git a/examples/advanced/custom-templates/properties/color/font.json b/examples/advanced/custom-templates/properties/color/font.json new file mode 100644 index 000000000..df0b84832 --- /dev/null +++ b/examples/advanced/custom-templates/properties/color/font.json @@ -0,0 +1,9 @@ +{ + "color": { + "font": { + "base" : { "value": "{color.base.red.value}" }, + "secondary": { "value": "{color.base.green.value}" }, + "tertiary" : { "value": "{color.base.gray.light.value}" } + } + } +} diff --git a/examples/advanced/custom-templates/properties/size/font.json b/examples/advanced/custom-templates/properties/size/font.json new file mode 100644 index 000000000..24e7b8034 --- /dev/null +++ b/examples/advanced/custom-templates/properties/size/font.json @@ -0,0 +1,22 @@ +{ + "size": { + "font": { + "small" : { + "value": "0.75", + "comment": "the small size of the font" + }, + "medium": { + "value": "1", + "comment": "the medium size of the font" + }, + "large" : { + "value": "2", + "comment": "the large size of the font" + }, + "base" : { + "value": "{size.font.medium.value}", + "comment": "the base size of the font" + } + } + } +} diff --git a/examples/advanced/custom-templates/templates/android-xml.template b/examples/advanced/custom-templates/templates/android-xml.template new file mode 100644 index 000000000..013273c61 --- /dev/null +++ b/examples/advanced/custom-templates/templates/android-xml.template @@ -0,0 +1,30 @@ +<% +var allProperties = _.each(allProperties, function(prop) { + if(prop.attributes.category === 'color') { + prop.tag = 'color'; + } else if(prop.attributes.category === 'size') { + prop.tag = 'dimen'; + } else if(prop.attributes.category === 'time' || prop.attributes.category === 'opacity' || prop.attributes.category === 'multiplier') { + prop.tag = 'double'; + } else if(prop.attributes.category === 'content') { + prop.tag = 'string'; + } else { + prop.tag = 'item'; + } +}); %> + +<% _.each(allProperties, function(prop) { + // Notice: this is an alternative way to use Lodash templating syntax, + // that uses string concatenation and the print() function to have + // more control over the indentation, whitespace, newlines, etc. + var output = ""; + output += "\t<" + prop.tag + " name=\"" + prop.name + "\">"; + output += prop.value; + output += ""; + if(prop.comment) { + output += ""; + } + output += "\n"; + print(output); +}); +%> diff --git a/examples/advanced/custom-templates/templates/android-xml_alt.hbs b/examples/advanced/custom-templates/templates/android-xml_alt.hbs new file mode 100644 index 000000000..7b9a44063 --- /dev/null +++ b/examples/advanced/custom-templates/templates/android-xml_alt.hbs @@ -0,0 +1,4 @@ + +{{#each allProperties}} +{{value}} +{{/each}} diff --git a/examples/advanced/custom-templates/templates/ios-plist.template b/examples/advanced/custom-templates/templates/ios-plist.template new file mode 100644 index 000000000..3344a70fc --- /dev/null +++ b/examples/advanced/custom-templates/templates/ios-plist.template @@ -0,0 +1,24 @@ + + + +<% +var allProperties = _.each(allProperties, function(prop) { + if(prop.type === 'color') { + prop.tag = 'string'; + } else if(prop.type === 'size') { + prop.tag = 'integer'; + } else if(prop.type === 'time' || prop.type === 'opacity') { + prop.tag = 'real'; + } else if(prop.type === 'content') { + prop.tag = 'string'; + } else { + prop.tag = 'string'; + } +}); +%> + + <% _.each(allProperties, function(prop) { + %><%= prop.name %><<%= prop.tag %>><%= prop.value %>><% if (prop.comment) { %><% } %> + <% }); %> + + \ No newline at end of file diff --git a/examples/advanced/custom-templates/templates/ios-plist_alt.pug b/examples/advanced/custom-templates/templates/ios-plist_alt.pug new file mode 100644 index 000000000..9a7659b09 --- /dev/null +++ b/examples/advanced/custom-templates/templates/ios-plist_alt.pug @@ -0,0 +1,24 @@ + +each prop in allProperties + case prop.attributes.category + when 'color' + - var tag = 'string' + when 'size' + - var tag = 'integer' + when 'time' + - var tag = 'real' + when 'opacity' + - var tag = 'real' + when 'content' + - var tag = 'string' + default + - var tag = 'string' + key #{prop.name} + dict + if prop.comment + // #{prop.comment} + if prop.type + key type + string #{prop.type} + key value + #{tag}(name=prop.name) #{prop.value} diff --git a/examples/advanced/custom-templates/templates/web-scss.template b/examples/advanced/custom-templates/templates/web-scss.template new file mode 100644 index 000000000..f24364c8d --- /dev/null +++ b/examples/advanced/custom-templates/templates/web-scss.template @@ -0,0 +1,3 @@ +<% _.each(allProperties, function(prop) { +%>$<%= prop.name %>: <%= prop.value %>;<% if (prop.comment) { %> // <%= prop.comment %><% } %> +<% }); %> \ No newline at end of file diff --git a/examples/advanced/custom-transforms/.gitignore b/examples/advanced/custom-transforms/.gitignore new file mode 100644 index 000000000..3e2e84b08 --- /dev/null +++ b/examples/advanced/custom-transforms/.gitignore @@ -0,0 +1,2 @@ +build/ +node_modules/ diff --git a/examples/advanced/custom-transforms/README.md b/examples/advanced/custom-transforms/README.md new file mode 100644 index 000000000..54d15a822 --- /dev/null +++ b/examples/advanced/custom-transforms/README.md @@ -0,0 +1,90 @@ +## Custom tranforms (and transformGroups) + +This example shows how to use custom tranforms (and transformGroups) to apply custom "tranformations" to the properties when converted to design tokens. + +Transforms are functions that transform a property (in a non-destructive way). The reason for *transforms* is that in this way each platform can consume the property in different ways (eg. changing *pixel* values to *pt* values for iOS, and *dp* or *sp* for Android). + +**Remember**: transforms are performed sequentially, so the order you use transforms matters. + +The need for custom transforms is that Style Dictionary expects the properties to be declared according to certain criteria, in order to use the pre-defined transforms and formats/templates. For example, the *web* transformGroup consists of the *attribute/cti*, *name/cti/kebab*, *size/px* and *color/css* transforms. +The *size/px* adds 'px' to the end of the number, and is applied only if `prop.attributes.category === 'size'`. This means that your property needs to be expressed without units, and be under the *'size'* "category. If you need a different logic or you want to organise your properties differently, probably you can't use the out-of-the-box transformation groups, but you have to declare your custom ones. + +If [custom templates](../custom-templates/) are the way to allow users to customise the format of the *output* of Style Dictionary, custom transforms are the way to allow them to customise both the *input* (the property names/values/attributes) and the *output* (the actual values expressed in the design tokens). For this reasons, custom transforms are probably one of the **most powerful features** of Style Dictionary: they make it extremely versatile, allowing limitless possibilities of extension and customisation of the entire pipeline from properties to design tokens. + +#### Running the example + +First of all, set up the required dependencies running the command `npm install` in your local CLI environment (if you prefer to use *yarn* update the commands accordingly). + +At this point, if you want to build the tokens you can run `npm run build`. This command will generate the files in the `build` folder. + +#### How does it work + +To declare a custom **transform**, you have to call the `registerTransform` method: + +``` +StyleDictionary.registerTransform({ + name: 'ratio/%', + type: 'value', + matcher: function(prop) { + return prop.group === 'ratio'; + }, + transformer: function(prop) { + return `${Math.floor(100 * prop.value)}%`; + } +}); +``` + +More information can be found on the [documentation](https://amzn.github.io/style-dictionary/#/api?id=registertransform). + +Since the transformGroups provided by Style Dictionary are pre-defined lists of transform, this means that in order to be used, this transform needs to be included in a new list of transforms. + +To register this custom **transformGroup** , you have to call the `registerTransformGroup` method: + +``` +StyleDictionary.registerTransformGroup({ + name: 'custom/web', + transforms: ['...', 'ratio/%', '...'] +}); +``` + +More information can be found on the [documentation](https://amzn.github.io/style-dictionary/#/api?id=registertransformgroup). + +Once registered, the custom group can be associated to one or more **platforms** in the `config.json` file: + +``` +{ + "source": ["properties/**/*.json"], + "platforms": { + "web": { + "transformGroup": "custom/web", + "buildPath": "build/web/", + "files": [{ + "destination": "tokens.js", + "format": "javascript/es6" + }] + ... + +``` + +When you register a new group, you can use a new array of transforms, or you can "extend" an existing group (see the code in the `build.js` file). Even though the second option seems simpler, we suggest to always declare explicitly your array: it's clearer to see what transformations will be applied, and you will always be in full control of the code. + +Tip: to know what transforms are included in a pre-defined group you can [refer to the documentation](https://amzn.github.io/style-dictionary/#/transform_groups) or you can add a `console.log(StyleDictionary.transformGroup['group_name'])` +in your code and look the array of transforms associated with the it, directly in your console. + +#### What to look at + +Open the `config.js` file and see how for each platform there is a `transformGroup` declaration. In this specific example, all the transformGroups applied to the platforms are custom. + +Now open a property file (eg. `colors/font/spacing.json`) to see how we have associated custom attributes to the properties, to be used later in the matchers functions. See also how the values are unitless, where the units are applied at build time accordingly to the destination platform. Compare the values in the input JSON files, and the values that appear in the files generated in `build`, and you will see where and how the transformations have been applied. + +Now open the `build.js` script and look at how these custom transforms/transformGroups are declared and registered via the `registerTransform` and `registerTransform` API methods. We have added as many comments as possible to make the code clear and show the interesting parts of it. + +A few things to notice in the file: + +- the name of a custom "tranform" can be the same as an existing pre-defined method; in that case the pre-defined method is simply overwritten +- beyond the existing attributes, you can use custom attributes to create **matcher** functions, used to filter the properties and apply the transform only to those that match the filter condition. +- if you don't specify a **matcher**, the transformation will be applied to all the properties +- the transformation can be applied not only to the **value** of a property, but also to its **name** (and also to its attributes) + + +**IMPORTANT**: the registration of custom transforms needs to be done _before_ applying the configuration (the methods needs to be already declared and registered in Style Dictionary to be used when extending it with the configuration). See the code in the `build.js` for more details. diff --git a/examples/advanced/custom-transforms/build.js b/examples/advanced/custom-transforms/build.js new file mode 100644 index 000000000..7a1741fa1 --- /dev/null +++ b/examples/advanced/custom-transforms/build.js @@ -0,0 +1,117 @@ +const StyleDictionary = require('style-dictionary'); + +console.log('Build started...'); +console.log('\n=============================================='); + + +// REGISTER THE CUSTOM TRANFORMS + +StyleDictionary.registerTransform({ + name: 'size/px', // notice: the name is an override of an existing predefined method (yes, you can do it) + type: 'value', + matcher: function(prop) { + // this is just an example of a possible filter (based on the "cti" values) to show how a "matcher" works + return prop.attributes.category === 'font' || prop.attributes.category === 'margin'; + }, + transformer: function(prop) { + return `${prop.value}px`; + } +}); + +StyleDictionary.registerTransform({ + name: 'ratio/%', + type: 'value', + matcher: function(prop) { + // here we are using a custom attribute, declared in the property, to match the values where apply the transform + return prop.group === 'ratio'; + }, + transformer: function(prop) { + return `${Math.floor(100 * prop.value)}%`; + } +}); + +StyleDictionary.registerTransform({ + name: 'hexRGB/hexARGB', + type: 'value', + matcher: function(prop) { + return prop.group === 'color'; + }, + transformer: function(prop) { + // for sake of simplicity, in this example we assume colors are always in the format #xxxxxx + return prop.value.replace(/^#/,'#FF'); + } +}); + +StyleDictionary.registerTransform({ + name: 'unitless/dp-sp', + type: 'value', + matcher: function(prop) { + return prop.group === 'typography' || prop.group === 'spacing'; + }, + transformer: function(prop) { + // in Android font sizes are expressed in "sp" units + let unit = (prop.group === 'typography') ? 'sp' : 'dp'; + return `${prop.value}${unit}`; + } +}); + +StyleDictionary.registerTransform({ // this is just a silly example, to show how you can apply transform to + name: 'name/squiggle', + type: 'name', + // notice: if you don't specify a matcher, the transformation will be applied to all the properties + transformer: function(prop) { + return prop.path.join('~'); + } +}); + + +// REGISTER THE CUSTOM TRANFORM GROUPS + +// if you want to see what a pre-defined group contains, uncomment the next line: +// console.log(StyleDictionary.transformGroup['group_name']); + +StyleDictionary.registerTransformGroup({ + name: 'custom/web', + // notice: here the "size/px" transform is not the pre-defined one, but the custom one we have declared above + transforms: ['attribute/cti', 'name/cti/constant', 'size/px', 'color/css', 'time/seconds', 'ratio/%'] +}); + +StyleDictionary.registerTransformGroup({ + name: 'custom/scss', + // this is just to show a possibility, if you want to add a few transforms to a pre-defined group + // (even so, we suggest to use the previous approach, which is more explicit and clear) + transforms: StyleDictionary.transformGroup['scss'].concat(['size/px', 'ratio/%']) +}); + +StyleDictionary.registerTransformGroup({ + name: 'custom/android', + // as you can see, here we are completely ignoring the "attribute/cti" transform (it's totally possible), + // because we are relying on custom attributes for the matchers and the custom format for the output + transforms: ['name/squiggle', 'hexRGB/hexARGB', 'unitless/dp-sp'] +}); + + +// REGISTER A CUSTOM FORMAT (to be used for this specific example) + +StyleDictionary.registerFormat({ + name: 'custom/android/xml', + formatter: function(dictionary) { + return dictionary.allProperties.map(function(prop) { + return `${prop.value}`; + }).join('\n'); + } +}); + + +// APPLY THE CONFIGURATION +// Very important: the registration of custom transforms +// needs to be done _before_ applying the configuration +StyleDictionaryExtended = StyleDictionary.extend(__dirname + '/config.json'); + + +// FINALLY, BUILD ALL THE PLATFORMS +StyleDictionaryExtended.buildAllPlatforms(); + + +console.log('\n=============================================='); +console.log('\nBuild completed!'); diff --git a/examples/advanced/custom-transforms/config.json b/examples/advanced/custom-transforms/config.json new file mode 100644 index 000000000..ac0842a43 --- /dev/null +++ b/examples/advanced/custom-transforms/config.json @@ -0,0 +1,29 @@ +{ + "source": ["properties/**/*.json"], + "platforms": { + "web": { + "transformGroup": "custom/web", + "buildPath": "build/web/", + "files": [{ + "destination": "tokens.js", + "format": "javascript/es6" + }] + }, + "scss": { + "transformGroup": "custom/scss", + "buildPath": "build/web/", + "files": [{ + "destination": "tokens.scss", + "format": "scss/variables" + }] + }, + "android": { + "transformGroup": "custom/android", + "buildPath": "build/android/", + "files": [{ + "destination": "tokens.xml", + "format": "custom/android/xml" + }] + } + } +} diff --git a/examples/advanced/custom-transforms/package.json b/examples/advanced/custom-transforms/package.json new file mode 100644 index 000000000..d87d59797 --- /dev/null +++ b/examples/advanced/custom-transforms/package.json @@ -0,0 +1,20 @@ +{ + "name": "style-dictionary-custom-transforms", + "version": "1.0.0", + "description": "", + "main": "build/index.js", + "files": [ + "build", + "properties" + ], + "scripts": { + "build": "node ./build.js", + "clean": "rm -rf build", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "Apache-2.0", + "devDependencies": { + "style-dictionary": "2.6.0" + } +} \ No newline at end of file diff --git a/examples/advanced/custom-transforms/properties/button.json b/examples/advanced/custom-transforms/properties/button.json new file mode 100644 index 000000000..76dbcdd4d --- /dev/null +++ b/examples/advanced/custom-transforms/properties/button.json @@ -0,0 +1,13 @@ +{ + "button": { + "border" : { + "width": { + "value": "1" + }, + "radius": { + "value": "0.01", + "group": "ratio" + } + } + } +} diff --git a/examples/advanced/custom-transforms/properties/colors.json b/examples/advanced/custom-transforms/properties/colors.json new file mode 100644 index 000000000..5610b0a0a --- /dev/null +++ b/examples/advanced/custom-transforms/properties/colors.json @@ -0,0 +1,28 @@ +{ + "color": { + "base": { + "gray": { + "light" : { + "value": "#CCCCCC", + "group": "color" + }, + "medium": { + "value": "#999999", + "group": "color" + }, + "dark" : { + "value": "#111111", + "group": "color" + } + }, + "red": { + "value": "#FF0000", + "group": "color" + }, + "green": { + "value": "#00FF00", + "group": "color" + } + } + } +} diff --git a/examples/advanced/custom-transforms/properties/font.json b/examples/advanced/custom-transforms/properties/font.json new file mode 100644 index 000000000..34a084cde --- /dev/null +++ b/examples/advanced/custom-transforms/properties/font.json @@ -0,0 +1,20 @@ +{ + "font": { + "small" : { + "value": "0.75", + "group": "typography" + }, + "medium": { + "value": "1.5", + "group": "typography" + }, + "large" : { + "value": "2", + "group": "typography" + }, + "base" : { + "value": "1", + "group": "typography" + } + } +} diff --git a/examples/advanced/custom-transforms/properties/spacing.json b/examples/advanced/custom-transforms/properties/spacing.json new file mode 100644 index 000000000..652434111 --- /dev/null +++ b/examples/advanced/custom-transforms/properties/spacing.json @@ -0,0 +1,16 @@ +{ + "margin": { + "small" : { + "value": "0.15", + "group": "spacing" + }, + "medium": { + "value": "0.25", + "group": "spacing" + }, + "large" : { + "value": "0.4", + "group": "spacing" + } + } +} diff --git a/examples/advanced/multi-brand-multi-platform/.gitignore b/examples/advanced/multi-brand-multi-platform/.gitignore new file mode 100644 index 000000000..3e2e84b08 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/.gitignore @@ -0,0 +1,2 @@ +build/ +node_modules/ diff --git a/examples/advanced/multi-brand-multi-platform/README.md b/examples/advanced/multi-brand-multi-platform/README.md new file mode 100644 index 000000000..fa467cc92 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/README.md @@ -0,0 +1,136 @@ +## Multi Brand & Multi Platform + +While it's pretty standard to use a common set of properties to generate the same design tokens for different platforms (only in different format), this example shows how to setup a **multi-brand, multi-platform suite** of design tokens, with values that may depend on the brand (eg. a brand color) or the platform (eg. a font family). + +In this specific case it's necessary to use a **custom build script** to process the properties for each one of the possible brand/platform combinations. In the script the configuration used by Style Dictionary becomes parametric, with "brand" and "platform" used as arguments of a function that returns the "config" object used to extend Style Dictionary. + +The properties are organised in **specific folders**, depending if they are "platform" dependent, "brand" dependent or "global" (independent of platform or brand). The organisation of the files used in this example is not strictly required, but has the advantage that it's easier to see what the properties depend on, and it's easy to use global paths to include the correct files for a specific combination of "brand" and "platform" (see the "source" declaration block in the `getStyleDictionaryConfig` function of the build script). + +#### Running the example + +First of all, set up the required dependencies running the command `npm install` in your local CLI environment (if you prefer to use *yarn* update the commands accordingly). + +At this point, if you want to build the tokens you can run `npm run build`. This command will generate the files in the `build` folder. Unlike other examples, the files are organised not only by "platform", but also organised in "brand" sub-folders. + +#### How does it work + +The "build" command will run the custom script `build.js`. This script loops on all the possible combinations of "platform" (web, iOS, Android) and "brand" ("brand-1", "brand-2" and "brand-3" in the example): + +``` +['brand-1', 'brand-2', 'brand-3'].map(function (brand) { + ['web', 'ios', 'android'].map(function (platform) { + const StyleDictionary = StyleDictionaryPackage.extend(getStyleDictionaryConfig(brand, platform)); + StyleDictionary.buildPlatform(platform); + }) +}) + +``` + +For each combination it receives a parametric configuration object from the `getStyleDictionaryConfig` function, where the input property files to read and the output paths where to write the generaed files depend on the "platform" and "brand" values: + +``` +function getStyleDictionaryConfig(brand, platform) { + return { + "source": [ + `properties/brands/${brand}/*.json`, + "properties/globals/**/*.json", + `properties/platforms/${platform}/*.json` + ], + "platforms": { + "web": { + "transformGroup": "web", + "buildPath": `build/web/${brand}/`, + "files": [{ + "destination": "tokens.scss", + "format": "scss/variables" + }] + }, + ... + } + }; +} +``` +The properties are stored in three different folders: + +* **brands**: this folder contain properties that depend on the "brand", eg. the "primary" and "secondary" colors (generally these are called "brand colors", think of the blue of Facebook, the orange of Amazon, or the red of Gmail). +* **platforms**: this folder contain properties that depend on the "platform", eg. the font family used in the application or website (eg. a font stack like "Tahoma, Arial, 'Helvetica Neue', sans" on web, "San Francisco" in iOS, "Roboto" in Android). +* **global**: this folder contain properties that are common, that don't depend on the specific "platform" or "brand", eg. the base grayscale colors, the font sizes, etc. + +Leveraging the ability of Style Dictionary to reference other properties values as "aliases", we can have generic properties like `font.family.base` or `color.primary` whose values actually depend on the "platform" and "brand" and whose values are computed dynamically at build time depending on the specific "platform/brand" files, included dynamically by the `getStyleDictionaryConfig` function. + +#### What to look at + +Open the `build.js` script and look how the `StyleDictionary.buildPlatform` function is called multiple times, looping on the combination of platform and brand, and how the configuration object is returned by the `getStyleDictionaryConfig` function. + +Now look at the properties folders, and see how they are organised. Open `properties/brands/brand-1/color.json`. You will see this declaration: + +``` +{ + "color": { + "brand": { + "primary" : { "value": "#3B5998" }, + "secondary" : { "value": "#4267B2" } + } + } +} +``` + +The actual values depend on the "brand" (compare this file with `brand-2/color.json` and `brand-3/color.json`. These values are used as "aliases" in the `properties/global/color/base.json` file: + +``` +{ + "color": { + "base": { + ... + }, + "primary" : { "value": "{color.brand.primary.value}" }, + "secondary" : { "value": "{color.brand.secondary.value}" }, + ... + } +} +``` + +Depending on the file included at build time, the actual value of `color.primary` will depend on the "brand". To see how this works out, open the file `build/web/brand-1/tokens.scss` and compare it with the similar files for "brand-2" and "brand-3": you will see how the values for `color.primary`, `color.action.primary` are different for different brands, and how they are actually the values declared in the "brands" source folders. + +In the same way, now open `properties/platforms/android/font.json` and you will see: + +``` +{ + "font": { + "platform": { + "system": { "value": "Roboto" } + } + } +} +``` +the value `font.platform.system` is consumed by the `properties/globals/font/index.json` file: + +``` +{ + "font": { + "family": { + "headers" : { "value": "Montserrat" }, + "base" : { "value": "{font.platform.system.value}" } + } + } +} +``` +In this way the design tokens for the different platforms will be: + +``` +// WEB +$font-family-headers: Montserrat; +$font-family-base: Tahoma, Arial, 'Helvetica Neue', sans; +``` + +``` +// IOS +#define FontFamilyHeaders @"Montserrat" +#define FontFamilyBase @"San Francisco" + +``` + +``` +// ANDROID +// TODO - here you would see that the font-family-base is "Roboto" +``` diff --git a/examples/advanced/multi-brand-multi-platform/build.js b/examples/advanced/multi-brand-multi-platform/build.js new file mode 100644 index 000000000..630e2cd86 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/build.js @@ -0,0 +1,67 @@ +const StyleDictionaryPackage = require('style-dictionary'); + +// HAVE THE STYLE DICTIONARY CONFIG DYNAMICALLY GENERATED + +function getStyleDictionaryConfig(brand, platform) { + return { + "source": [ + `properties/brands/${brand}/*.json`, + "properties/globals/**/*.json", + `properties/platforms/${platform}/*.json` + ], + "platforms": { + "web": { + "transformGroup": "web", + "buildPath": `build/web/${brand}/`, + "files": [{ + "destination": "tokens.scss", + "format": "scss/variables" + }] + }, + "android": { + "transformGroup": "android", + "buildPath": `build/android/${brand}/`, + "files": [{ + "destination": "tokens.colors.xml", + "template": "android/colors" + },{ + "destination": "tokens.dimens.xml", + "template": "android/dimens" + },{ + "destination": "tokens.font_dimens.xml", + "template": "android/fontDimens" + }] + }, + "ios": { + "transformGroup": "ios", + "buildPath": `build/ios/${brand}/`, + "files": [{ + "destination": "tokens.h", + "template": "ios/macros" + }] + } + } + }; +} + +console.log('Build started...'); + +// PROCESS THE DESIGN TOKENS FOR THE DIFFEREN BRANDS AND PLATFORMS + +['brand-1', 'brand-2', 'brand-3'].map(function (brand) { + ['web', 'ios', 'android'].map(function (platform) { + + console.log('\n=============================================='); + console.log(`\nProcessing: [${platform}] [${brand}]`); + + const StyleDictionary = StyleDictionaryPackage.extend(getStyleDictionaryConfig(brand, platform)); + + StyleDictionary.buildPlatform(platform); + + console.log('\nEnd processing'); + + }) +}) + +console.log('\n=============================================='); +console.log('\nBuild completed!'); \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/package.json b/examples/advanced/multi-brand-multi-platform/package.json new file mode 100644 index 000000000..bdf95456b --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/package.json @@ -0,0 +1,20 @@ +{ + "name": "style-dictionary-auto-rebuild-watcher", + "version": "1.0.0", + "description": "", + "main": "build/index.js", + "files": [ + "build", + "properties" + ], + "scripts": { + "build": "node ./build.js", + "clean": "rm -rf build", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "Apache-2.0", + "devDependencies": { + "style-dictionary": "2.6.0" + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/brands/brand-1/color.json b/examples/advanced/multi-brand-multi-platform/properties/brands/brand-1/color.json new file mode 100644 index 000000000..9d37b50a5 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/brands/brand-1/color.json @@ -0,0 +1,8 @@ +{ + "color": { + "brand": { + "primary" : { "value": "#3B5998" }, + "secondary" : { "value": "#4267B2" } + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/brands/brand-2/color.json b/examples/advanced/multi-brand-multi-platform/properties/brands/brand-2/color.json new file mode 100644 index 000000000..5165743c0 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/brands/brand-2/color.json @@ -0,0 +1,8 @@ +{ + "color": { + "brand": { + "primary" : { "value": "#1DA1F2" }, + "secondary" : { "value": "#AAB8C2" } + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/brands/brand-3/color.json b/examples/advanced/multi-brand-multi-platform/properties/brands/brand-3/color.json new file mode 100644 index 000000000..93b6d5cb6 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/brands/brand-3/color.json @@ -0,0 +1,8 @@ +{ + "color": { + "brand": { + "primary" : { "value": "#EA4335" }, + "secondary" : { "value": "#34A853" } + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/globals/button.json b/examples/advanced/multi-brand-multi-platform/properties/globals/button.json new file mode 100644 index 000000000..61f6ca0be --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/globals/button.json @@ -0,0 +1,14 @@ +{ + "button": { + "border": { + "radius": { + "value": "4px" + } + }, + "text": { + "size": { + "value": "{size.font.medium.value}" + } + } + } +} diff --git a/examples/advanced/multi-brand-multi-platform/properties/globals/color/base.json b/examples/advanced/multi-brand-multi-platform/properties/globals/color/base.json new file mode 100644 index 000000000..40f06ada2 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/globals/color/base.json @@ -0,0 +1,21 @@ +{ + "color": { + "base": { + "black" : { "value": "#000000" }, + "gray": { + "light" : { "value": "#CCCCCC" }, + "medium" : { "value": "#999999" }, + "dark" : { "value": "#111111" } + }, + "red" : { "value": "#FF0000" }, + "green" : { "value": "#00FF00" } + }, + "primary" : { "value": "{color.brand.primary.value}" }, + "secondary" : { "value": "{color.brand.secondary.value}" }, + "action": { + "primary" : { "value": "{color.primary.value}" }, + "secondary" : { "value": "{color.secondary.value}" }, + "tertiary" : { "value": "{color.base.gray.medium.value}" } + } + } +} diff --git a/examples/advanced/multi-brand-multi-platform/properties/globals/color/font.json b/examples/advanced/multi-brand-multi-platform/properties/globals/color/font.json new file mode 100644 index 000000000..30de04c48 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/globals/color/font.json @@ -0,0 +1,10 @@ +{ + "color": { + "font": { + "base" : { "value": "{color.base.black.value}" }, + "primary" : { "value": "{color.primary.value}" }, + "secondary" : { "value": "{color.secondary.value}" }, + "tertiary" : { "value": "{color.base.gray.light.value}" } + } + } +} diff --git a/examples/advanced/multi-brand-multi-platform/properties/globals/font/index.json b/examples/advanced/multi-brand-multi-platform/properties/globals/font/index.json new file mode 100644 index 000000000..ee4cc697f --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/globals/font/index.json @@ -0,0 +1,8 @@ +{ + "font": { + "family": { + "headers" : { "value": "Montserrat" }, + "base" : { "value": "{font.platform.system.value}" } + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/globals/size/font.json b/examples/advanced/multi-brand-multi-platform/properties/globals/size/font.json new file mode 100644 index 000000000..24e7b8034 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/globals/size/font.json @@ -0,0 +1,22 @@ +{ + "size": { + "font": { + "small" : { + "value": "0.75", + "comment": "the small size of the font" + }, + "medium": { + "value": "1", + "comment": "the medium size of the font" + }, + "large" : { + "value": "2", + "comment": "the large size of the font" + }, + "base" : { + "value": "{size.font.medium.value}", + "comment": "the base size of the font" + } + } + } +} diff --git a/examples/advanced/multi-brand-multi-platform/properties/platforms/android/button.json b/examples/advanced/multi-brand-multi-platform/properties/platforms/android/button.json new file mode 100644 index 000000000..f8976a09b --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/platforms/android/button.json @@ -0,0 +1,7 @@ +{ + "button": { + "height": { + "value": "50px" + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/platforms/android/font.json b/examples/advanced/multi-brand-multi-platform/properties/platforms/android/font.json new file mode 100644 index 000000000..6ddbf6346 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/platforms/android/font.json @@ -0,0 +1,7 @@ +{ + "font": { + "platform": { + "system": { "value": "Roboto" } + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/platforms/ios/button.json b/examples/advanced/multi-brand-multi-platform/properties/platforms/ios/button.json new file mode 100644 index 000000000..f8976a09b --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/platforms/ios/button.json @@ -0,0 +1,7 @@ +{ + "button": { + "height": { + "value": "50px" + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/platforms/ios/font.json b/examples/advanced/multi-brand-multi-platform/properties/platforms/ios/font.json new file mode 100644 index 000000000..b58a17f5f --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/platforms/ios/font.json @@ -0,0 +1,7 @@ +{ + "font": { + "platform": { + "system": { "value": "San Francisco" } + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/platforms/web/button.json b/examples/advanced/multi-brand-multi-platform/properties/platforms/web/button.json new file mode 100644 index 000000000..025f67b85 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/platforms/web/button.json @@ -0,0 +1,7 @@ +{ + "button": { + "height": { + "value": "40px" + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/properties/platforms/web/font.json b/examples/advanced/multi-brand-multi-platform/properties/platforms/web/font.json new file mode 100644 index 000000000..9968875fa --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/properties/platforms/web/font.json @@ -0,0 +1,7 @@ +{ + "font": { + "platform": { + "system": { "value": "Tahoma, Arial, 'Helvetica Neue', sans" } + } + } +} \ No newline at end of file diff --git a/examples/advanced/multi-brand-multi-platform/yarn.lock b/examples/advanced/multi-brand-multi-platform/yarn.lock new file mode 100644 index 000000000..76d4c6de8 --- /dev/null +++ b/examples/advanced/multi-brand-multi-platform/yarn.lock @@ -0,0 +1,1580 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + integrity sha1-GdOGodntxufByF04iu28xW0zYC0= + +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +binary-extensions@^1.0.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14" + integrity sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg== + +bluebird@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.0, braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +chalk@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chokidar-cli@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/chokidar-cli/-/chokidar-cli-1.2.1.tgz#50574a63414174c5ac62f495abe09ae3cb6cb8b5" + integrity sha512-JIrV9Z/pT7KjBWp9u+Uba0utdl2rmNaTj6t4ucaFseYDQASHZnWXy6vJIufDX+4FVh081gQZ2odrqorMfQhn7w== + dependencies: + bluebird "3.5.1" + chokidar "2.0.4" + lodash "4.17.10" + yargs "12.0.1" + +chokidar@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" + integrity sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.0" + braces "^2.3.0" + glob-parent "^3.1.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + lodash.debounce "^4.0.8" + normalize-path "^2.1.1" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + upath "^1.0.5" + optionalDependencies: + fsevents "^1.2.2" + +chownr@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" + integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cliui@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi "^2.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +commander@^2.9.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +decamelize@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7" + integrity sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg== + dependencies: + xregexp "4.0.0" + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fs-extra@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b" + integrity sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== + dependencies: + minipass "^2.2.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.2.2: + version "1.2.4" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" + integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.10.0" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob@^7.0.5, glob@^7.1.1: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== + dependencies: + minimatch "^3.0.4" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= + dependencies: + is-extglob "^2.1.1" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= + +lodash@4.17.10: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== + +lodash@^4.16.4: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== + +lru-cache@^4.0.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" + integrity sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= + dependencies: + mimic-fn "^1.0.0" + +micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +minipass@^2.2.1, minipass@^2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.4.tgz#4768d7605ed6194d6d576169b9e12ef71e9d9957" + integrity sha512-mlouk1OHlaUE8Odt1drMtG1bAJA4ZA6B/ehysgV0LUIrDHdKgo1KorZq3pK0b/7Z7LJIQ12MNM6aC+Tn6lUZ5w== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.1.tgz#6734acc045a46e61d596a43bb9d9cd326e19cc42" + integrity sha512-TrfjCjk4jLhcJyGMYymBH6oTXcWjYbUAXTHDbtnWHjZC25h0cdajHuPE1zxb4DVmu8crfh+HwH/WMuyLG0nHBg== + dependencies: + minipass "^2.2.1" + +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +nan@^2.9.2: + version "2.11.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" + integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +needle@^2.2.1: + version "2.2.4" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" + integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + +node-pre-gyp@^0.10.0: + version "0.10.3" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" + integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +npm-bundled@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" + integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== + +npm-packlist@^1.1.6: + version "1.1.12" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" + integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec" + integrity sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-try@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" + integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@^2.0.2, readable-stream@^2.0.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= + dependencies: + resolve-from "^3.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +rimraf@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== + dependencies: + glob "^7.0.5" + +safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +semver@^5.3.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +style-dictionary@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/style-dictionary/-/style-dictionary-2.4.0.tgz#fae92adeeca1839940b61f6cf3e458afecdbb79d" + integrity sha512-DDKRVSSSyodT+8L+mgRvNwwOl4PK1aSVMISAfpendKhMa0suxQTrZVbWX41NDu1zzvO3ciXITu8ao4CEwQ/BAg== + dependencies: + chalk "^2.4.1" + commander "^2.9.0" + fs-extra "^6.0.1" + glob "^7.1.1" + lodash "^4.16.4" + resolve-cwd "^2.0.0" + tinycolor2 "^1.4.1" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +tar@^4: + version "4.4.6" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" + integrity sha512-tMkTnh9EdzxyfW+6GK6fCahagXsnYk6kE6S9Gr9pjVdys769+laCTbodXDhPAjzVtEBazRgP0gYqOjnk9dQzLg== + dependencies: + chownr "^1.0.1" + fs-minipass "^1.2.5" + minipass "^2.3.3" + minizlib "^1.1.0" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +tinycolor2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" + integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.0.5: + version "1.1.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +xregexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" + integrity sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg== + +"y18n@^3.2.1 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + integrity sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k= + +yargs-parser@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== + dependencies: + camelcase "^4.1.0" + +yargs@12.0.1: + version "12.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.1.tgz#6432e56123bb4e7c3562115401e98374060261c2" + integrity sha512-B0vRAp1hRX4jgIOWFtjfNjd9OA9RWYZ6tqGA9/I/IrTMsxmKvtWy+ersM+jzpQqbC3YfLzeABPdeTgcJ9eu1qQ== + dependencies: + cliui "^4.0.0" + decamelize "^2.0.0" + find-up "^3.0.0" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1 || ^4.0.0" + yargs-parser "^10.1.0" diff --git a/examples/advanced/npm-module/.gitignore b/examples/advanced/npm-module/.gitignore new file mode 100644 index 000000000..3e2e84b08 --- /dev/null +++ b/examples/advanced/npm-module/.gitignore @@ -0,0 +1,2 @@ +build/ +node_modules/ diff --git a/examples/advanced/npm-module/README.md b/examples/advanced/npm-module/README.md new file mode 100644 index 000000000..c0aea1263 --- /dev/null +++ b/examples/advanced/npm-module/README.md @@ -0,0 +1,18 @@ +## Style Dictionary as an npm module + +This example shows how to set up a style dictionary as an npm module, either to publish to a local npm service or to publish externally. + +When you publish this npm module, the `prepublishOnly` hook will run, calling the style dictionary build system to create the necessary files. + +#### Running the example + +First of all, set up the required dependencies running the command `npm install` in your local CLI environment (if you prefer to use *yarn* update the commands accordingly). + +At this point, run `npm run build`. This command will generate the files in the `build` folder. + + +#### What to look at + +Open the `package.json` file and see how in this specific example there is an extra [`prepublishOnly`](https://docs.npmjs.com/misc/scripts) command script, that builds the dictionary. + +This command is run automatically before the package is prepared and packed via the `npm publish` command. \ No newline at end of file diff --git a/example/npm/config.json b/examples/advanced/npm-module/config.json similarity index 51% rename from example/npm/config.json rename to examples/advanced/npm-module/config.json index 68ee44d7c..87e55d92c 100644 --- a/example/npm/config.json +++ b/examples/advanced/npm-module/config.json @@ -1,22 +1,20 @@ { "source": ["properties/**/*.json"], "platforms": { - "js": { - "transformGroup": "web", - "buildPath": "build/", - "files": [{ - "destination": "index.js", - "format": "javascript/module" - }] - }, - "scss": { "transformGroup": "scss", - "buildPath": "build/sass/", + "buildPath": "build/scss/", "files": [{ - "destination": "variables.scss", + "destination": "tokens.scss", "format": "scss/variables" }] + }, + "js": { + "transformGroup": "js", + "files": [{ + "destination": "tokens.js", + "format": "javascript/es6" + }] } } } diff --git a/example/npm/package.json b/examples/advanced/npm-module/package.json similarity index 66% rename from example/npm/package.json rename to examples/advanced/npm-module/package.json index 7fcb7cdcc..7c34fb797 100644 --- a/example/npm/package.json +++ b/examples/advanced/npm-module/package.json @@ -5,19 +5,17 @@ "main": "build/index.js", "files": [ "build", - "properties", - "assets", - "LICENSE" + "properties" ], "scripts": { - "build": "node_modules/.bin/style-dictionary", + "build": "node_modules/.bin/style-dictionary build", "clean": "rm -rf build", - "prepublish": "npm run build", + "prepublishOnly": "npm run build", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "Apache-2.0", "devDependencies": { - "style-dictionary": "2.5.0" + "style-dictionary": "2.6.0" } } \ No newline at end of file diff --git a/examples/advanced/npm-module/properties/color/base.json b/examples/advanced/npm-module/properties/color/base.json new file mode 100644 index 000000000..02a99d700 --- /dev/null +++ b/examples/advanced/npm-module/properties/color/base.json @@ -0,0 +1,13 @@ +{ + "color": { + "base": { + "gray": { + "light" : { "value": "#CCCCCC" }, + "medium": { "value": "#999999" }, + "dark" : { "value": "#111111" } + }, + "red": { "value": "#FF0000" }, + "green": { "value": "#00FF00" } + } + } +} diff --git a/examples/advanced/npm-module/properties/color/font.json b/examples/advanced/npm-module/properties/color/font.json new file mode 100644 index 000000000..df0b84832 --- /dev/null +++ b/examples/advanced/npm-module/properties/color/font.json @@ -0,0 +1,9 @@ +{ + "color": { + "font": { + "base" : { "value": "{color.base.red.value}" }, + "secondary": { "value": "{color.base.green.value}" }, + "tertiary" : { "value": "{color.base.gray.light.value}" } + } + } +} diff --git a/examples/advanced/npm-module/properties/size/font.json b/examples/advanced/npm-module/properties/size/font.json new file mode 100644 index 000000000..24e7b8034 --- /dev/null +++ b/examples/advanced/npm-module/properties/size/font.json @@ -0,0 +1,22 @@ +{ + "size": { + "font": { + "small" : { + "value": "0.75", + "comment": "the small size of the font" + }, + "medium": { + "value": "1", + "comment": "the medium size of the font" + }, + "large" : { + "value": "2", + "comment": "the large size of the font" + }, + "base" : { + "value": "{size.font.medium.value}", + "comment": "the base size of the font" + } + } + } +} diff --git a/examples/advanced/referencing_aliasing/README.md b/examples/advanced/referencing_aliasing/README.md new file mode 100644 index 000000000..6fd8673c7 --- /dev/null +++ b/examples/advanced/referencing_aliasing/README.md @@ -0,0 +1,93 @@ +## Referencing (Aliasing) + +This example shows how to use referencing (or "aliasing") to reference a value -or an attribute– of a property and assign it to the value –or attribute– of another property. + +This is very handy when you want to create a system that uses some basic design definitions (base colors, base font sizes, base scales, etc) but then exposes them in a more complex and detailed set of design tokens, typically to describe a complete UI pattern library. + +#### Running the example + +First of all, set up the required dependencies running the command `npm install` in your local CLI environment (if you prefer to use *yarn* update the commands accordingly). + +At this point, you can run `npm run build`. This command will generate the output file in the `build` folder. + +#### How does it work + +The "build" command processes the JSON files in the `properties` folder. Whenever it finds a reference declared via this syntax: + +``` + property: { + "value": "{ref.to.object.value}" + } +``` +the build process resolves the reference using the declared path (`ref.to.object`) to retrieve the actual value of the referenced property inside the Style Dictionary object. + +**Notice**: if the path is not valid, doesn't exist or is a circular reference, Style Dictionary generates an error in the console. + +#### What to look at + +Open the JSON files in the `properties` folder and see how certain properties are referencing the values of other properties via "aliases". + +For example, open `color/base.json` and see how the value of the "primary" color is a **reference** to the value of the "green" color, declared as: + +``` + "primary": { "value": "{color.base.green.value}" } + +``` +In this case, the string `"{color.base.green.value}"` is resolved at build time, and gets its value from the value of the "green" base color, `"#00FF00"`. + +The reference can point to another property in a **different JSON file**. For example open `color/font.json` and see how the value for the base/secondary font colors are references to the properties declared in `color/base.json`: + +``` +{ + "color": { + "font": { + "base" : { "value": "{color.base.red.value}" }, + "secondary": { "value": "{color.base.green.value}" } + ... +``` + +It is also possible to create **chains of references**, where a value references an alias that is, in turn, another alias of a value, and so on. If you open `button/button.json` you can see that the value of the primary color for the button is an alias of `color.primary.value`, that we just saw above is an alias of `color.base.green.value`: + +``` +{ + "button": { + "color": { + "primary": { + "value": "{color.primary.value}" + ... +``` + +The value associated to a property can be an **object** (eg. an RGB color). In that case, the reference still works. If you open `color/font.json` you will see that the "faded" color of text is a reference to `color.base.gray.medium.value`, but if you look in `color/base.json` you will see that the value of the "medium gray" color is not a string, but an RGB oject: + +``` +{ + "color": { + "base": { + ... + "gray": { + "medium": { "value": { "r": 146, "g": 153, "b": 162 } } + +``` +In that case Style Dictionary still resolves correctly the alias to the corresponding value: + +``` +"color-base-gray-medium": "#9299a2" +``` + +You can also reference **other attributes of a property**, not only its value. For example in `button/button.json` the value of text size is composed as concatenation (remember, it's a string, think of it as template literals) of two properties of the "global" object, declared in the `globals.json` file: + +``` + "text": { + "size": { + "value": "{globals.baseline}{globals.unit}" + } + } + +``` +this at build time gets resolved to: + +``` +"button-text-size": "16px" +``` + +Of course this is just an example: the real applications can be the most different depending on the context and the needs. For example, look at the [multi-brand-multi-platform](../multi-brand-multi-platform) demo, to see how the aliasing is used to create a powerful theming system. \ No newline at end of file diff --git a/examples/advanced/referencing_aliasing/config.json b/examples/advanced/referencing_aliasing/config.json new file mode 100644 index 000000000..51b2de809 --- /dev/null +++ b/examples/advanced/referencing_aliasing/config.json @@ -0,0 +1,13 @@ +{ + "source": ["properties/**/*.json"], + "platforms": { + "example": { + "transformGroup": "web", + "buildPath": "build/json/", + "files": [{ + "destination": "variables.json", + "format": "json/flat" + }] + } + } +} diff --git a/examples/advanced/referencing_aliasing/package.json b/examples/advanced/referencing_aliasing/package.json new file mode 100644 index 000000000..9fce1883d --- /dev/null +++ b/examples/advanced/referencing_aliasing/package.json @@ -0,0 +1,20 @@ +{ + "name": "style-dictionary-referencing_aliasing", + "version": "1.0.0", + "description": "", + "main": "build/index.js", + "files": [ + "build", + "properties" + ], + "scripts": { + "build": "node_modules/.bin/style-dictionary build", + "clean": "rm -rf build", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "Apache-2.0", + "devDependencies": { + "style-dictionary": "2.6.0" + } +} \ No newline at end of file diff --git a/examples/advanced/referencing_aliasing/properties/button/button.json b/examples/advanced/referencing_aliasing/properties/button/button.json new file mode 100644 index 000000000..538b3afa7 --- /dev/null +++ b/examples/advanced/referencing_aliasing/properties/button/button.json @@ -0,0 +1,20 @@ +{ + "button": { + "color": { + "primary": { + "value": "{color.primary.value}" + }, + "secondary": { + "value": "{color.secondary.value}" + }, + "danger": { + "value": "{color.base.red.value}" + } + }, + "text": { + "size": { + "value": "{globals.baseline}{globals.unit}" + } + } + } +} diff --git a/examples/advanced/referencing_aliasing/properties/color/base.json b/examples/advanced/referencing_aliasing/properties/color/base.json new file mode 100644 index 000000000..d59f0ef31 --- /dev/null +++ b/examples/advanced/referencing_aliasing/properties/color/base.json @@ -0,0 +1,17 @@ +{ + "color": { + "base": { + "white": { "value": "#FFFFFF" }, + "gray": { + "light" : { "value": "#CCCCCC" }, + "medium": { "value": { "r": 146, "g": 153, "b": 162 } }, + "dark" : { "value": "#111111" } + }, + "red": { "value": "#FF0000" }, + "green": { "value": "#00FF00" }, + "blue": { "value": "#0000FF" } + }, + "primary": { "value": "{color.base.green.value}" }, + "secondary": { "value": "{color.base.blue.value}" } + } +} diff --git a/examples/advanced/referencing_aliasing/properties/color/font.json b/examples/advanced/referencing_aliasing/properties/color/font.json new file mode 100644 index 000000000..b1e48cd55 --- /dev/null +++ b/examples/advanced/referencing_aliasing/properties/color/font.json @@ -0,0 +1,9 @@ +{ + "color": { + "font": { + "base" : { "value": "{color.base.gray.dark.value}" }, + "faded": { "value": "{color.base.gray.medium.value}" }, + "error": { "value": "{color.base.red.value}" } + } + } +} diff --git a/examples/advanced/referencing_aliasing/properties/globals.json b/examples/advanced/referencing_aliasing/properties/globals.json new file mode 100644 index 000000000..bc7728320 --- /dev/null +++ b/examples/advanced/referencing_aliasing/properties/globals.json @@ -0,0 +1,6 @@ +{ + "globals": { + "baseline": "16", + "unit": "px" + } +} diff --git a/examples/advanced/referencing_aliasing/properties/size/font.json b/examples/advanced/referencing_aliasing/properties/size/font.json new file mode 100644 index 000000000..c7b30e838 --- /dev/null +++ b/examples/advanced/referencing_aliasing/properties/size/font.json @@ -0,0 +1,22 @@ +{ + "size": { + "font": { + "small" : { + "value": "12", + "comment": "the small size of the font" + }, + "medium": { + "value": "16", + "comment": "the medium size of the font" + }, + "large" : { + "value": "18", + "comment": "the large size of the font" + }, + "base" : { + "value": "{size.font.medium.value}", + "comment": "the base size of the font" + } + } + } +} diff --git a/examples/advanced/s3/.gitignore b/examples/advanced/s3/.gitignore new file mode 100644 index 000000000..3e2e84b08 --- /dev/null +++ b/examples/advanced/s3/.gitignore @@ -0,0 +1,2 @@ +build/ +node_modules/ diff --git a/examples/advanced/s3/README.md b/examples/advanced/s3/README.md new file mode 100644 index 000000000..823ea1fc6 --- /dev/null +++ b/examples/advanced/s3/README.md @@ -0,0 +1,22 @@ +##Connect Style Dictionary with an Amazon S3 bucket + +This example shows how to set up a style dictionary to build files for different platforms (web, iOS, Android) and upload those build artifacts, together with a group of assets, to an S3 bucket. + +The platforms can then pull these files down during their build process. + +#### Running the example + +If you just want to see which files are generated, run the command `npm run build` in your local CLI environment. + +If instead you want to see the full process, run the command `npm start`: this will start the style dictionary build process, save the output files and copy the assets into the `build` directory, then it will upload everything from the build directory into an S3 bucket. + +Important: in this case you need to make sure you have you computer set up to upload to your aws account, see [https://github.com/awslabs/aws-nodejs-sample](https://github.com/awslabs/aws-nodejs-sample) for a sample setup. + +#### The "copy" step + +The asset files are copied into the folder `build` thanks to the action `copy_assets` declared in the `config.js` file. This action expects a folder specifically called `assets` in the root of the project. + + +#### The "upload" step + +The upload to the S3 container in this example is done via a custom script, `upload.js`, which is not part of the standad Style Dictionary package. If you want you can adapt this script to your needs, or create a new custom script that will work with your specific storage solution. \ No newline at end of file diff --git a/example/react/assets/fonts/MaterialIcons-Regular.eot b/examples/advanced/s3/assets/fonts/MaterialIcons-Regular.eot similarity index 100% rename from example/react/assets/fonts/MaterialIcons-Regular.eot rename to examples/advanced/s3/assets/fonts/MaterialIcons-Regular.eot diff --git a/example/react/assets/fonts/MaterialIcons-Regular.ttf b/examples/advanced/s3/assets/fonts/MaterialIcons-Regular.ttf similarity index 100% rename from example/react/assets/fonts/MaterialIcons-Regular.ttf rename to examples/advanced/s3/assets/fonts/MaterialIcons-Regular.ttf diff --git a/example/react/assets/fonts/MaterialIcons-Regular.woff b/examples/advanced/s3/assets/fonts/MaterialIcons-Regular.woff similarity index 100% rename from example/react/assets/fonts/MaterialIcons-Regular.woff rename to examples/advanced/s3/assets/fonts/MaterialIcons-Regular.woff diff --git a/example/react/assets/fonts/MaterialIcons-Regular.woff2 b/examples/advanced/s3/assets/fonts/MaterialIcons-Regular.woff2 similarity index 100% rename from example/react/assets/fonts/MaterialIcons-Regular.woff2 rename to examples/advanced/s3/assets/fonts/MaterialIcons-Regular.woff2 diff --git a/example/react/assets/fonts/OpenSans-Regular.ttf b/examples/advanced/s3/assets/fonts/OpenSans-Regular.ttf similarity index 100% rename from example/react/assets/fonts/OpenSans-Regular.ttf rename to examples/advanced/s3/assets/fonts/OpenSans-Regular.ttf diff --git a/example/react/assets/fonts/Roboto-Regular.ttf b/examples/advanced/s3/assets/fonts/Roboto-Regular.ttf similarity index 100% rename from example/react/assets/fonts/Roboto-Regular.ttf rename to examples/advanced/s3/assets/fonts/Roboto-Regular.ttf diff --git a/examples/advanced/s3/assets/icons/alert-circle.svg b/examples/advanced/s3/assets/icons/alert-circle.svg new file mode 100644 index 000000000..6b41c0b95 --- /dev/null +++ b/examples/advanced/s3/assets/icons/alert-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/alert-octagon.svg b/examples/advanced/s3/assets/icons/alert-octagon.svg new file mode 100644 index 000000000..6943b6d02 --- /dev/null +++ b/examples/advanced/s3/assets/icons/alert-octagon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/alert-triangle.svg b/examples/advanced/s3/assets/icons/alert-triangle.svg new file mode 100644 index 000000000..59e65b15b --- /dev/null +++ b/examples/advanced/s3/assets/icons/alert-triangle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/archive.svg b/examples/advanced/s3/assets/icons/archive.svg new file mode 100644 index 000000000..428882c87 --- /dev/null +++ b/examples/advanced/s3/assets/icons/archive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/book-open.svg b/examples/advanced/s3/assets/icons/book-open.svg new file mode 100644 index 000000000..5e0ca0ab7 --- /dev/null +++ b/examples/advanced/s3/assets/icons/book-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/book.svg b/examples/advanced/s3/assets/icons/book.svg new file mode 100644 index 000000000..12ffcbc46 --- /dev/null +++ b/examples/advanced/s3/assets/icons/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/bookmark.svg b/examples/advanced/s3/assets/icons/bookmark.svg new file mode 100644 index 000000000..2239cc580 --- /dev/null +++ b/examples/advanced/s3/assets/icons/bookmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/briefcase.svg b/examples/advanced/s3/assets/icons/briefcase.svg new file mode 100644 index 000000000..e3af05060 --- /dev/null +++ b/examples/advanced/s3/assets/icons/briefcase.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/calendar.svg b/examples/advanced/s3/assets/icons/calendar.svg new file mode 100644 index 000000000..6c7fd870d --- /dev/null +++ b/examples/advanced/s3/assets/icons/calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/camera.svg b/examples/advanced/s3/assets/icons/camera.svg new file mode 100644 index 000000000..0e7f06037 --- /dev/null +++ b/examples/advanced/s3/assets/icons/camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/check-circle.svg b/examples/advanced/s3/assets/icons/check-circle.svg new file mode 100644 index 000000000..f2f4fd1af --- /dev/null +++ b/examples/advanced/s3/assets/icons/check-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/check-square.svg b/examples/advanced/s3/assets/icons/check-square.svg new file mode 100644 index 000000000..72ab7a806 --- /dev/null +++ b/examples/advanced/s3/assets/icons/check-square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/database.svg b/examples/advanced/s3/assets/icons/database.svg new file mode 100644 index 000000000..c296fbcfd --- /dev/null +++ b/examples/advanced/s3/assets/icons/database.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/delete.svg b/examples/advanced/s3/assets/icons/delete.svg new file mode 100644 index 000000000..8c6074b96 --- /dev/null +++ b/examples/advanced/s3/assets/icons/delete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/dollar-sign.svg b/examples/advanced/s3/assets/icons/dollar-sign.svg new file mode 100644 index 000000000..1a124d269 --- /dev/null +++ b/examples/advanced/s3/assets/icons/dollar-sign.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/download-cloud.svg b/examples/advanced/s3/assets/icons/download-cloud.svg new file mode 100644 index 000000000..f3126fc39 --- /dev/null +++ b/examples/advanced/s3/assets/icons/download-cloud.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/edit-1.svg b/examples/advanced/s3/assets/icons/edit-1.svg new file mode 100644 index 000000000..ed7fdfdd5 --- /dev/null +++ b/examples/advanced/s3/assets/icons/edit-1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/edit-2.svg b/examples/advanced/s3/assets/icons/edit-2.svg new file mode 100644 index 000000000..867fde42e --- /dev/null +++ b/examples/advanced/s3/assets/icons/edit-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/edit-3.svg b/examples/advanced/s3/assets/icons/edit-3.svg new file mode 100644 index 000000000..310732cc4 --- /dev/null +++ b/examples/advanced/s3/assets/icons/edit-3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/external-link.svg b/examples/advanced/s3/assets/icons/external-link.svg new file mode 100644 index 000000000..6236df3e0 --- /dev/null +++ b/examples/advanced/s3/assets/icons/external-link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/file-text.svg b/examples/advanced/s3/assets/icons/file-text.svg new file mode 100644 index 000000000..4197ddd40 --- /dev/null +++ b/examples/advanced/s3/assets/icons/file-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/file.svg b/examples/advanced/s3/assets/icons/file.svg new file mode 100644 index 000000000..378519ab6 --- /dev/null +++ b/examples/advanced/s3/assets/icons/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/film.svg b/examples/advanced/s3/assets/icons/film.svg new file mode 100644 index 000000000..ac46360d2 --- /dev/null +++ b/examples/advanced/s3/assets/icons/film.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/folder.svg b/examples/advanced/s3/assets/icons/folder.svg new file mode 100644 index 000000000..134458b98 --- /dev/null +++ b/examples/advanced/s3/assets/icons/folder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/gift.svg b/examples/advanced/s3/assets/icons/gift.svg new file mode 100644 index 000000000..d2c14bd69 --- /dev/null +++ b/examples/advanced/s3/assets/icons/gift.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/github.svg b/examples/advanced/s3/assets/icons/github.svg new file mode 100644 index 000000000..ff0af4811 --- /dev/null +++ b/examples/advanced/s3/assets/icons/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/globe.svg b/examples/advanced/s3/assets/icons/globe.svg new file mode 100644 index 000000000..0a0586d36 --- /dev/null +++ b/examples/advanced/s3/assets/icons/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/assets/icons/grid.svg b/examples/advanced/s3/assets/icons/grid.svg new file mode 100644 index 000000000..8ef2e9d87 --- /dev/null +++ b/examples/advanced/s3/assets/icons/grid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/advanced/s3/config.json b/examples/advanced/s3/config.json new file mode 100644 index 000000000..81a2c3452 --- /dev/null +++ b/examples/advanced/s3/config.json @@ -0,0 +1,82 @@ +{ + "source": ["properties/**/*.json"], + "platforms": { + "scss": { + "transformGroup": "scss", + "buildPath": "build/scss/", + "files": [{ + "destination": "assets.scss", + "format": "scss/variables" + }] + }, + "android": { + "transformGroup": "android", + "buildPath": "build/android/", + "files": [{ + "destination": "font_dimens.xml", + "format": "android/fontDimens" + },{ + "destination": "colors.xml", + "format": "android/colors" + }] + }, + "ios": { + "transformGroup": "ios", + "buildPath": "build/ios/", + "files": [{ + "destination": "StyleDictionaryColor.h", + "format": "ios/colors.h", + "className": "StyleDictionaryColor", + "type": "StyleDictionaryColorName", + "filter": { + "attributes": { + "category": "color" + } + } + },{ + "destination": "StyleDictionaryColor.m", + "format": "ios/colors.m", + "className": "StyleDictionaryColor", + "type": "StyleDictionaryColorName", + "filter": { + "attributes": { + "category": "color" + } + } + },{ + "destination": "StyleDictionarySize.h", + "format": "ios/static.h", + "className": "StyleDictionarySize", + "type": "float", + "filter": { + "attributes": { + "category": "size" + } + } + },{ + "destination": "StyleDictionarySize.m", + "format": "ios/static.m", + "className": "StyleDictionarySize", + "type": "float", + "filter": { + "attributes": { + "category": "size" + } + } + }] + }, + "json/asset": { + "transformGroup": "web", + "buildPath": "build/json/", + "files": [{ + "destination": "assets.json", + "format": "json/asset" + }] + }, + "assets/copy": { + "transformGroup": "assets", + "buildPath": "build/", + "actions": ["copy_assets"] + } + } +} diff --git a/example/s3/package.json b/examples/advanced/s3/package.json similarity index 76% rename from example/s3/package.json rename to examples/advanced/s3/package.json index d42b3e16b..b0306b2e1 100644 --- a/example/s3/package.json +++ b/examples/advanced/s3/package.json @@ -4,9 +4,10 @@ "description": "", "main": "build.js", "scripts": { - "build": "node_modules/.bin/style-dictionary", + "build": "node_modules/.bin/style-dictionary build", "upload": "node upload.js", "start": "npm run build && npm run upload", + "clean": "rm -rf build", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", @@ -14,6 +15,6 @@ "devDependencies": { "aws-sdk": "^2.7.21", "fs-extra": "^1.0.0", - "style-dictionary": "2.5.0" + "style-dictionary": "2.6.0" } } \ No newline at end of file diff --git a/examples/advanced/s3/properties/assets/fonts.json b/examples/advanced/s3/properties/assets/fonts.json new file mode 100644 index 000000000..d992a28ef --- /dev/null +++ b/examples/advanced/s3/properties/assets/fonts.json @@ -0,0 +1,18 @@ +{ + "asset": { + "font": { + "materialicons": { + "ttf" : { "value": "assets/fonts/MaterialIcons-Regular.ttf" }, + "eot" : { "value": "assets/fonts/MaterialIcons-Regular.eot" }, + "woff" : { "value": "assets/fonts/MaterialIcons-Regular.woff" }, + "woff2": { "value": "assets/fonts/MaterialIcons-Regular.woff2" } + }, + "opensans": { + "ttf" : { "value": "assets/fonts/OpenSans-Regular.ttf" } + }, + "roboto": { + "ttf" : { "value": "assets/fonts/Roboto-Regular.ttf" } + } + } + } +} diff --git a/examples/advanced/s3/properties/assets/icons.json b/examples/advanced/s3/properties/assets/icons.json new file mode 100644 index 000000000..83ca09fb1 --- /dev/null +++ b/examples/advanced/s3/properties/assets/icons.json @@ -0,0 +1,34 @@ +{ + "asset": { + "icon": { + "alert-circle": { "value": "assets/icons/alert-circle.svg" }, + "alert-octagon": { "value": "assets/icons/alert-octagon.svg" }, + "alert-triangle": { "value": "assets/icons/alert-triangle.svg" }, + "archive": { "value": "assets/icons/archive.svg" }, + "book-open": { "value": "assets/icons/book-open.svg" }, + "book": { "value": "assets/icons/book.svg" }, + "bookmark": { "value": "assets/icons/bookmark.svg" }, + "briefcase": { "value": "assets/icons/briefcase.svg" }, + "calendar": { "value": "assets/icons/calendar.svg" }, + "camera": { "value": "assets/icons/camera.svg" }, + "check-circle": { "value": "assets/icons/check-circle.svg" }, + "check-square": { "value": "assets/icons/check-square.svg" }, + "database": { "value": "assets/icons/database.svg" }, + "delete": { "value": "assets/icons/delete.svg" }, + "dollar-sign": { "value": "assets/icons/dollar-sign.svg" }, + "download-cloud": { "value": "assets/icons/download-cloud.svg" }, + "edit-1": { "value": "assets/icons/edit-1.svg" }, + "edit-2": { "value": "assets/icons/edit-2.svg" }, + "edit-3": { "value": "assets/icons/edit-3.svg" }, + "external-link": { "value": "assets/icons/external-link.svg" }, + "file-text": { "value": "assets/icons/file-text.svg" }, + "file": { "value": "assets/icons/file.svg" }, + "film": { "value": "assets/icons/film.svg" }, + "folder": { "value": "assets/icons/folder.svg" }, + "gift": { "value": "assets/icons/gift.svg" }, + "github": { "value": "assets/icons/github.svg" }, + "globe": { "value": "assets/icons/globe.svg" }, + "grid": { "value": "assets/icons/grid.svg" } + } + } +} diff --git a/examples/advanced/s3/properties/color/base.json b/examples/advanced/s3/properties/color/base.json new file mode 100644 index 000000000..02a99d700 --- /dev/null +++ b/examples/advanced/s3/properties/color/base.json @@ -0,0 +1,13 @@ +{ + "color": { + "base": { + "gray": { + "light" : { "value": "#CCCCCC" }, + "medium": { "value": "#999999" }, + "dark" : { "value": "#111111" } + }, + "red": { "value": "#FF0000" }, + "green": { "value": "#00FF00" } + } + } +} diff --git a/examples/advanced/s3/properties/color/font.json b/examples/advanced/s3/properties/color/font.json new file mode 100644 index 000000000..df0b84832 --- /dev/null +++ b/examples/advanced/s3/properties/color/font.json @@ -0,0 +1,9 @@ +{ + "color": { + "font": { + "base" : { "value": "{color.base.red.value}" }, + "secondary": { "value": "{color.base.green.value}" }, + "tertiary" : { "value": "{color.base.gray.light.value}" } + } + } +} diff --git a/examples/advanced/s3/properties/size/font.json b/examples/advanced/s3/properties/size/font.json new file mode 100644 index 000000000..24e7b8034 --- /dev/null +++ b/examples/advanced/s3/properties/size/font.json @@ -0,0 +1,22 @@ +{ + "size": { + "font": { + "small" : { + "value": "0.75", + "comment": "the small size of the font" + }, + "medium": { + "value": "1", + "comment": "the medium size of the font" + }, + "large" : { + "value": "2", + "comment": "the large size of the font" + }, + "base" : { + "value": "{size.font.medium.value}", + "comment": "the base size of the font" + } + } + } +} diff --git a/example/s3/upload.js b/examples/advanced/s3/upload.js similarity index 100% rename from example/s3/upload.js rename to examples/advanced/s3/upload.js diff --git a/example/basic/README.md b/examples/basic/README.md similarity index 84% rename from example/basic/README.md rename to examples/basic/README.md index dbdabab7d..72e422181 100644 --- a/example/basic/README.md +++ b/examples/basic/README.md @@ -105,33 +105,6 @@ Pretty nifty! This shows a few things happening: 1. The build system resolves references to other style properties. `{size.font.medium.value}` gets resolved properly 1. The build system handles references to property values in other files as well as you can see in `properties/color/font.json` - -Different representations of style information: - - - - - - - - - - - - - - - - - - - - - - - -
 AndroidSCSSObjective-C
Color`#CCCCCC``$color-base-gray-light: #CCCCCC;``[UIColor colorWithRed:0.80f green:0.80f blue:0.80f alpha:1.0f]`
Font size`12.00sp``$size-font-small: 0.75rem;``const float SizeFontSmall = 12.0f;`
- Now lets make a change and see how that affects things. Open up `properties/color/base.json` and change `"#111111"` to `"#000000"`. After you make that change, save the file and re-run the build command `style-dictionary build`. Open up the build files and take a look. **Huzzah!** diff --git a/examples/basic/config.json b/examples/basic/config.json new file mode 100644 index 000000000..942e328ac --- /dev/null +++ b/examples/basic/config.json @@ -0,0 +1,69 @@ +{ + "source": ["properties/**/*.json"], + "platforms": { + "scss": { + "transformGroup": "scss", + "buildPath": "build/scss/", + "files": [{ + "destination": "_variables.scss", + "format": "scss/variables" + }] + }, + "android": { + "transformGroup": "android", + "buildPath": "build/android/", + "files": [{ + "destination": "font_dimens.xml", + "format": "android/fontDimens" + },{ + "destination": "colors.xml", + "format": "android/colors" + }] + }, + "ios": { + "transformGroup": "ios", + "buildPath": "build/ios/", + "files": [{ + "destination": "StyleDictionaryColor.h", + "format": "ios/colors.h", + "className": "StyleDictionaryColor", + "type": "StyleDictionaryColorName", + "filter": { + "attributes": { + "category": "color" + } + } + },{ + "destination": "StyleDictionaryColor.m", + "format": "ios/colors.m", + "className": "StyleDictionaryColor", + "type": "StyleDictionaryColorName", + "filter": { + "attributes": { + "category": "color" + } + } + },{ + "destination": "StyleDictionarySize.h", + "format": "ios/static.h", + "className": "StyleDictionarySize", + "type": "float", + "filter": { + "attributes": { + "category": "size" + } + } + },{ + "destination": "StyleDictionarySize.m", + "format": "ios/static.m", + "className": "StyleDictionarySize", + "type": "float", + "filter": { + "attributes": { + "category": "size" + } + } + }] + } + } +} diff --git a/examples/basic/properties/color/base.json b/examples/basic/properties/color/base.json new file mode 100644 index 000000000..02a99d700 --- /dev/null +++ b/examples/basic/properties/color/base.json @@ -0,0 +1,13 @@ +{ + "color": { + "base": { + "gray": { + "light" : { "value": "#CCCCCC" }, + "medium": { "value": "#999999" }, + "dark" : { "value": "#111111" } + }, + "red": { "value": "#FF0000" }, + "green": { "value": "#00FF00" } + } + } +} diff --git a/examples/basic/properties/color/font.json b/examples/basic/properties/color/font.json new file mode 100644 index 000000000..df0b84832 --- /dev/null +++ b/examples/basic/properties/color/font.json @@ -0,0 +1,9 @@ +{ + "color": { + "font": { + "base" : { "value": "{color.base.red.value}" }, + "secondary": { "value": "{color.base.green.value}" }, + "tertiary" : { "value": "{color.base.gray.light.value}" } + } + } +} diff --git a/examples/basic/properties/size/font.json b/examples/basic/properties/size/font.json new file mode 100644 index 000000000..24e7b8034 --- /dev/null +++ b/examples/basic/properties/size/font.json @@ -0,0 +1,22 @@ +{ + "size": { + "font": { + "small" : { + "value": "0.75", + "comment": "the small size of the font" + }, + "medium": { + "value": "1", + "comment": "the medium size of the font" + }, + "large" : { + "value": "2", + "comment": "the large size of the font" + }, + "base" : { + "value": "{size.font.medium.value}", + "comment": "the base size of the font" + } + } + } +} diff --git a/example/complete/.gitignore b/examples/complete/.gitignore similarity index 100% rename from example/complete/.gitignore rename to examples/complete/.gitignore diff --git a/example/complete/LICENSE b/examples/complete/LICENSE similarity index 100% rename from example/complete/LICENSE rename to examples/complete/LICENSE diff --git a/example/complete/README.md b/examples/complete/README.md similarity index 100% rename from example/complete/README.md rename to examples/complete/README.md diff --git a/example/complete/StyleDictionary.podspec b/examples/complete/StyleDictionary.podspec similarity index 100% rename from example/complete/StyleDictionary.podspec rename to examples/complete/StyleDictionary.podspec diff --git a/example/complete/android/.gitignore b/examples/complete/android/.gitignore similarity index 100% rename from example/complete/android/.gitignore rename to examples/complete/android/.gitignore diff --git a/example/complete/android/build.gradle b/examples/complete/android/build.gradle similarity index 100% rename from example/complete/android/build.gradle rename to examples/complete/android/build.gradle diff --git a/example/complete/android/demo/build.gradle b/examples/complete/android/demo/build.gradle similarity index 100% rename from example/complete/android/demo/build.gradle rename to examples/complete/android/demo/build.gradle diff --git a/example/complete/android/demo/proguard-rules.pro b/examples/complete/android/demo/proguard-rules.pro similarity index 100% rename from example/complete/android/demo/proguard-rules.pro rename to examples/complete/android/demo/proguard-rules.pro diff --git a/example/complete/android/demo/src/androidTest/java/com/amazon/styledictionaryexample/ApplicationTest.java b/examples/complete/android/demo/src/androidTest/java/com/amazon/styledictionaryexample/ApplicationTest.java similarity index 100% rename from example/complete/android/demo/src/androidTest/java/com/amazon/styledictionaryexample/ApplicationTest.java rename to examples/complete/android/demo/src/androidTest/java/com/amazon/styledictionaryexample/ApplicationTest.java diff --git a/example/complete/android/demo/src/main/AndroidManifest.xml b/examples/complete/android/demo/src/main/AndroidManifest.xml similarity index 100% rename from example/complete/android/demo/src/main/AndroidManifest.xml rename to examples/complete/android/demo/src/main/AndroidManifest.xml diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/BaseActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/BaseActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/BaseActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/BaseActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/ColorAdapter.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/ColorAdapter.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/ColorAdapter.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/ColorAdapter.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/MainActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/MainActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/MainActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/MainActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BackgroundColorActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BackgroundColorActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BackgroundColorActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BackgroundColorActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BaseColorActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BaseColorActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BaseColorActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BaseColorActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BaseColorListItem.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BaseColorListItem.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BaseColorListItem.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/BaseColorListItem.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/ColorDetailFragment.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/ColorDetailFragment.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/ColorDetailFragment.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/ColorDetailFragment.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/ColorsActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/ColorsActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/ColorsActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/ColorsActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/FontColorActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/FontColorActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/FontColorActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/color/FontColorActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconDetailActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconDetailActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconDetailActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconDetailActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconDetailFragment.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconDetailFragment.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconDetailFragment.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconDetailFragment.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconListActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconListActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconListActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/icon/IconListActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/models/Property.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/models/Property.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/models/Property.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/models/Property.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/models/StyleDictionaryNode.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/models/StyleDictionaryNode.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/models/StyleDictionaryNode.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/models/StyleDictionaryNode.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertiesActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertiesActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertiesActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertiesActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyDetailActivity.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyDetailActivity.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyDetailActivity.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyDetailActivity.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyFragment.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyFragment.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyFragment.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyFragment.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyRecyclerViewAdapter.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyRecyclerViewAdapter.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyRecyclerViewAdapter.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/property/PropertyRecyclerViewAdapter.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StringHelper.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StringHelper.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StringHelper.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StringHelper.java diff --git a/example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StyleDictionaryHelper.java b/examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StyleDictionaryHelper.java similarity index 100% rename from example/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StyleDictionaryHelper.java rename to examples/complete/android/demo/src/main/java/com/amazon/styledictionaryexample/util/StyleDictionaryHelper.java diff --git a/example/complete/android/demo/src/main/res/anim/slide_from_left.xml b/examples/complete/android/demo/src/main/res/anim/slide_from_left.xml similarity index 100% rename from example/complete/android/demo/src/main/res/anim/slide_from_left.xml rename to examples/complete/android/demo/src/main/res/anim/slide_from_left.xml diff --git a/example/complete/android/demo/src/main/res/anim/slide_from_right.xml b/examples/complete/android/demo/src/main/res/anim/slide_from_right.xml similarity index 100% rename from example/complete/android/demo/src/main/res/anim/slide_from_right.xml rename to examples/complete/android/demo/src/main/res/anim/slide_from_right.xml diff --git a/example/complete/android/demo/src/main/res/anim/slide_to_left.xml b/examples/complete/android/demo/src/main/res/anim/slide_to_left.xml similarity index 100% rename from example/complete/android/demo/src/main/res/anim/slide_to_left.xml rename to examples/complete/android/demo/src/main/res/anim/slide_to_left.xml diff --git a/example/complete/android/demo/src/main/res/anim/slide_to_right.xml b/examples/complete/android/demo/src/main/res/anim/slide_to_right.xml similarity index 100% rename from example/complete/android/demo/src/main/res/anim/slide_to_right.xml rename to examples/complete/android/demo/src/main/res/anim/slide_to_right.xml diff --git a/example/complete/android/demo/src/main/res/layout/activity_background_color.xml b/examples/complete/android/demo/src/main/res/layout/activity_background_color.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/activity_background_color.xml rename to examples/complete/android/demo/src/main/res/layout/activity_background_color.xml diff --git a/example/complete/android/demo/src/main/res/layout/activity_base_color.xml b/examples/complete/android/demo/src/main/res/layout/activity_base_color.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/activity_base_color.xml rename to examples/complete/android/demo/src/main/res/layout/activity_base_color.xml diff --git a/example/complete/android/demo/src/main/res/layout/activity_colors.xml b/examples/complete/android/demo/src/main/res/layout/activity_colors.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/activity_colors.xml rename to examples/complete/android/demo/src/main/res/layout/activity_colors.xml diff --git a/example/complete/android/demo/src/main/res/layout/activity_font_color.xml b/examples/complete/android/demo/src/main/res/layout/activity_font_color.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/activity_font_color.xml rename to examples/complete/android/demo/src/main/res/layout/activity_font_color.xml diff --git a/example/complete/android/demo/src/main/res/layout/activity_icon_detail.xml b/examples/complete/android/demo/src/main/res/layout/activity_icon_detail.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/activity_icon_detail.xml rename to examples/complete/android/demo/src/main/res/layout/activity_icon_detail.xml diff --git a/example/complete/android/demo/src/main/res/layout/activity_icon_list.xml b/examples/complete/android/demo/src/main/res/layout/activity_icon_list.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/activity_icon_list.xml rename to examples/complete/android/demo/src/main/res/layout/activity_icon_list.xml diff --git a/example/complete/android/demo/src/main/res/layout/activity_main.xml b/examples/complete/android/demo/src/main/res/layout/activity_main.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/activity_main.xml rename to examples/complete/android/demo/src/main/res/layout/activity_main.xml diff --git a/example/complete/android/demo/src/main/res/layout/activity_properties.xml b/examples/complete/android/demo/src/main/res/layout/activity_properties.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/activity_properties.xml rename to examples/complete/android/demo/src/main/res/layout/activity_properties.xml diff --git a/example/complete/android/demo/src/main/res/layout/activity_property_detail.xml b/examples/complete/android/demo/src/main/res/layout/activity_property_detail.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/activity_property_detail.xml rename to examples/complete/android/demo/src/main/res/layout/activity_property_detail.xml diff --git a/example/complete/android/demo/src/main/res/layout/background_color_list_item.xml b/examples/complete/android/demo/src/main/res/layout/background_color_list_item.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/background_color_list_item.xml rename to examples/complete/android/demo/src/main/res/layout/background_color_list_item.xml diff --git a/example/complete/android/demo/src/main/res/layout/base_color_list_content.xml b/examples/complete/android/demo/src/main/res/layout/base_color_list_content.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/base_color_list_content.xml rename to examples/complete/android/demo/src/main/res/layout/base_color_list_content.xml diff --git a/example/complete/android/demo/src/main/res/layout/base_color_list_header.xml b/examples/complete/android/demo/src/main/res/layout/base_color_list_header.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/base_color_list_header.xml rename to examples/complete/android/demo/src/main/res/layout/base_color_list_header.xml diff --git a/example/complete/android/demo/src/main/res/layout/fragment_color_detail.xml b/examples/complete/android/demo/src/main/res/layout/fragment_color_detail.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/fragment_color_detail.xml rename to examples/complete/android/demo/src/main/res/layout/fragment_color_detail.xml diff --git a/example/complete/android/demo/src/main/res/layout/fragment_property_list.xml b/examples/complete/android/demo/src/main/res/layout/fragment_property_list.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/fragment_property_list.xml rename to examples/complete/android/demo/src/main/res/layout/fragment_property_list.xml diff --git a/example/complete/android/demo/src/main/res/layout/fragment_property_list_item.xml b/examples/complete/android/demo/src/main/res/layout/fragment_property_list_item.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/fragment_property_list_item.xml rename to examples/complete/android/demo/src/main/res/layout/fragment_property_list_item.xml diff --git a/example/complete/android/demo/src/main/res/layout/icon_detail.xml b/examples/complete/android/demo/src/main/res/layout/icon_detail.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/icon_detail.xml rename to examples/complete/android/demo/src/main/res/layout/icon_detail.xml diff --git a/example/complete/android/demo/src/main/res/layout/icon_list_content.xml b/examples/complete/android/demo/src/main/res/layout/icon_list_content.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/icon_list_content.xml rename to examples/complete/android/demo/src/main/res/layout/icon_list_content.xml diff --git a/example/complete/android/demo/src/main/res/layout/list_item_color.xml b/examples/complete/android/demo/src/main/res/layout/list_item_color.xml similarity index 100% rename from example/complete/android/demo/src/main/res/layout/list_item_color.xml rename to examples/complete/android/demo/src/main/res/layout/list_item_color.xml diff --git a/example/complete/android/demo/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/complete/android/demo/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from example/complete/android/demo/src/main/res/mipmap-hdpi/ic_launcher.png rename to examples/complete/android/demo/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/example/complete/android/demo/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/complete/android/demo/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from example/complete/android/demo/src/main/res/mipmap-mdpi/ic_launcher.png rename to examples/complete/android/demo/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/example/complete/android/demo/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/complete/android/demo/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from example/complete/android/demo/src/main/res/mipmap-xhdpi/ic_launcher.png rename to examples/complete/android/demo/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/example/complete/android/demo/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/complete/android/demo/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from example/complete/android/demo/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to examples/complete/android/demo/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/example/complete/android/demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/complete/android/demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from example/complete/android/demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to examples/complete/android/demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/example/complete/android/demo/src/main/res/values-v21/styles.xml b/examples/complete/android/demo/src/main/res/values-v21/styles.xml similarity index 100% rename from example/complete/android/demo/src/main/res/values-v21/styles.xml rename to examples/complete/android/demo/src/main/res/values-v21/styles.xml diff --git a/example/complete/android/demo/src/main/res/values-w820dp/dimens.xml b/examples/complete/android/demo/src/main/res/values-w820dp/dimens.xml similarity index 100% rename from example/complete/android/demo/src/main/res/values-w820dp/dimens.xml rename to examples/complete/android/demo/src/main/res/values-w820dp/dimens.xml diff --git a/example/complete/android/demo/src/main/res/values/dimens.xml b/examples/complete/android/demo/src/main/res/values/dimens.xml similarity index 100% rename from example/complete/android/demo/src/main/res/values/dimens.xml rename to examples/complete/android/demo/src/main/res/values/dimens.xml diff --git a/example/complete/android/demo/src/main/res/values/strings.xml b/examples/complete/android/demo/src/main/res/values/strings.xml similarity index 100% rename from example/complete/android/demo/src/main/res/values/strings.xml rename to examples/complete/android/demo/src/main/res/values/strings.xml diff --git a/example/complete/android/demo/src/main/res/values/styles.xml b/examples/complete/android/demo/src/main/res/values/styles.xml similarity index 100% rename from example/complete/android/demo/src/main/res/values/styles.xml rename to examples/complete/android/demo/src/main/res/values/styles.xml diff --git a/example/complete/android/demo/src/test/java/com/amazon/styledictionaryexample/ExampleUnitTest.java b/examples/complete/android/demo/src/test/java/com/amazon/styledictionaryexample/ExampleUnitTest.java similarity index 100% rename from example/complete/android/demo/src/test/java/com/amazon/styledictionaryexample/ExampleUnitTest.java rename to examples/complete/android/demo/src/test/java/com/amazon/styledictionaryexample/ExampleUnitTest.java diff --git a/example/complete/android/gradle.properties b/examples/complete/android/gradle.properties similarity index 100% rename from example/complete/android/gradle.properties rename to examples/complete/android/gradle.properties diff --git a/example/complete/android/gradle/wrapper/gradle-wrapper.jar b/examples/complete/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from example/complete/android/gradle/wrapper/gradle-wrapper.jar rename to examples/complete/android/gradle/wrapper/gradle-wrapper.jar diff --git a/example/complete/android/gradle/wrapper/gradle-wrapper.properties b/examples/complete/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from example/complete/android/gradle/wrapper/gradle-wrapper.properties rename to examples/complete/android/gradle/wrapper/gradle-wrapper.properties diff --git a/example/complete/android/gradlew b/examples/complete/android/gradlew similarity index 100% rename from example/complete/android/gradlew rename to examples/complete/android/gradlew diff --git a/example/complete/android/gradlew.bat b/examples/complete/android/gradlew.bat similarity index 100% rename from example/complete/android/gradlew.bat rename to examples/complete/android/gradlew.bat diff --git a/example/complete/android/settings.gradle b/examples/complete/android/settings.gradle similarity index 100% rename from example/complete/android/settings.gradle rename to examples/complete/android/settings.gradle diff --git a/example/complete/android/styledictionary/build.gradle b/examples/complete/android/styledictionary/build.gradle similarity index 100% rename from example/complete/android/styledictionary/build.gradle rename to examples/complete/android/styledictionary/build.gradle diff --git a/example/complete/android/styledictionary/proguard-rules.pro b/examples/complete/android/styledictionary/proguard-rules.pro similarity index 100% rename from example/complete/android/styledictionary/proguard-rules.pro rename to examples/complete/android/styledictionary/proguard-rules.pro diff --git a/example/complete/android/styledictionary/src/androidTest/java/com/example/styledictionary/ExampleInstrumentedTest.java b/examples/complete/android/styledictionary/src/androidTest/java/com/example/styledictionary/ExampleInstrumentedTest.java similarity index 100% rename from example/complete/android/styledictionary/src/androidTest/java/com/example/styledictionary/ExampleInstrumentedTest.java rename to examples/complete/android/styledictionary/src/androidTest/java/com/example/styledictionary/ExampleInstrumentedTest.java diff --git a/example/complete/android/styledictionary/src/main/AndroidManifest.xml b/examples/complete/android/styledictionary/src/main/AndroidManifest.xml similarity index 100% rename from example/complete/android/styledictionary/src/main/AndroidManifest.xml rename to examples/complete/android/styledictionary/src/main/AndroidManifest.xml diff --git a/example/complete/android/styledictionary/src/main/res/values/strings.xml b/examples/complete/android/styledictionary/src/main/res/values/strings.xml similarity index 100% rename from example/complete/android/styledictionary/src/main/res/values/strings.xml rename to examples/complete/android/styledictionary/src/main/res/values/strings.xml diff --git a/example/complete/android/styledictionary/src/test/java/com/example/styledictionary/ExampleUnitTest.java b/examples/complete/android/styledictionary/src/test/java/com/example/styledictionary/ExampleUnitTest.java similarity index 100% rename from example/complete/android/styledictionary/src/test/java/com/example/styledictionary/ExampleUnitTest.java rename to examples/complete/android/styledictionary/src/test/java/com/example/styledictionary/ExampleUnitTest.java diff --git a/example/s3/assets/fonts/MaterialIcons-Regular.eot b/examples/complete/assets/fonts/MaterialIcons-Regular.eot similarity index 100% rename from example/s3/assets/fonts/MaterialIcons-Regular.eot rename to examples/complete/assets/fonts/MaterialIcons-Regular.eot diff --git a/example/s3/assets/fonts/MaterialIcons-Regular.ttf b/examples/complete/assets/fonts/MaterialIcons-Regular.ttf similarity index 100% rename from example/s3/assets/fonts/MaterialIcons-Regular.ttf rename to examples/complete/assets/fonts/MaterialIcons-Regular.ttf diff --git a/example/s3/assets/fonts/MaterialIcons-Regular.woff b/examples/complete/assets/fonts/MaterialIcons-Regular.woff similarity index 100% rename from example/s3/assets/fonts/MaterialIcons-Regular.woff rename to examples/complete/assets/fonts/MaterialIcons-Regular.woff diff --git a/example/s3/assets/fonts/MaterialIcons-Regular.woff2 b/examples/complete/assets/fonts/MaterialIcons-Regular.woff2 similarity index 100% rename from example/s3/assets/fonts/MaterialIcons-Regular.woff2 rename to examples/complete/assets/fonts/MaterialIcons-Regular.woff2 diff --git a/examples/complete/assets/fonts/OpenSans-Regular.ttf b/examples/complete/assets/fonts/OpenSans-Regular.ttf new file mode 100755 index 000000000..db433349b Binary files /dev/null and b/examples/complete/assets/fonts/OpenSans-Regular.ttf differ diff --git a/examples/complete/assets/fonts/Roboto-Regular.ttf b/examples/complete/assets/fonts/Roboto-Regular.ttf new file mode 100755 index 000000000..3e6e2e761 Binary files /dev/null and b/examples/complete/assets/fonts/Roboto-Regular.ttf differ diff --git a/example/complete/config.json b/examples/complete/config.json similarity index 100% rename from example/complete/config.json rename to examples/complete/config.json diff --git a/example/complete/ios/Classes/StyleDictionary.h b/examples/complete/ios/Classes/StyleDictionary.h similarity index 100% rename from example/complete/ios/Classes/StyleDictionary.h rename to examples/complete/ios/Classes/StyleDictionary.h diff --git a/example/complete/ios/Classes/StyleDictionary.m b/examples/complete/ios/Classes/StyleDictionary.m similarity index 100% rename from example/complete/ios/Classes/StyleDictionary.m rename to examples/complete/ios/Classes/StyleDictionary.m diff --git a/example/complete/ios/Classes/StyleDictionaryButton.h b/examples/complete/ios/Classes/StyleDictionaryButton.h similarity index 100% rename from example/complete/ios/Classes/StyleDictionaryButton.h rename to examples/complete/ios/Classes/StyleDictionaryButton.h diff --git a/example/complete/ios/Classes/StyleDictionaryButton.m b/examples/complete/ios/Classes/StyleDictionaryButton.m similarity index 100% rename from example/complete/ios/Classes/StyleDictionaryButton.m rename to examples/complete/ios/Classes/StyleDictionaryButton.m diff --git a/example/complete/ios/Classes/UIButton+StyleDictionary.h b/examples/complete/ios/Classes/UIButton+StyleDictionary.h similarity index 100% rename from example/complete/ios/Classes/UIButton+StyleDictionary.h rename to examples/complete/ios/Classes/UIButton+StyleDictionary.h diff --git a/example/complete/ios/Classes/UIButton+StyleDictionary.m b/examples/complete/ios/Classes/UIButton+StyleDictionary.m similarity index 100% rename from example/complete/ios/Classes/UIButton+StyleDictionary.m rename to examples/complete/ios/Classes/UIButton+StyleDictionary.m diff --git a/example/complete/ios/Classes/UIColor+StyleDictionary.h b/examples/complete/ios/Classes/UIColor+StyleDictionary.h similarity index 100% rename from example/complete/ios/Classes/UIColor+StyleDictionary.h rename to examples/complete/ios/Classes/UIColor+StyleDictionary.h diff --git a/example/complete/ios/Classes/UIColor+StyleDictionary.m b/examples/complete/ios/Classes/UIColor+StyleDictionary.m similarity index 100% rename from example/complete/ios/Classes/UIColor+StyleDictionary.m rename to examples/complete/ios/Classes/UIColor+StyleDictionary.m diff --git a/example/complete/ios/Classes/UIFont+MaterialIcons.h b/examples/complete/ios/Classes/UIFont+MaterialIcons.h similarity index 100% rename from example/complete/ios/Classes/UIFont+MaterialIcons.h rename to examples/complete/ios/Classes/UIFont+MaterialIcons.h diff --git a/example/complete/ios/Classes/UIFont+MaterialIcons.m b/examples/complete/ios/Classes/UIFont+MaterialIcons.m similarity index 100% rename from example/complete/ios/Classes/UIFont+MaterialIcons.m rename to examples/complete/ios/Classes/UIFont+MaterialIcons.m diff --git a/example/complete/ios/Demo/Podfile b/examples/complete/ios/Demo/Podfile similarity index 100% rename from example/complete/ios/Demo/Podfile rename to examples/complete/ios/Demo/Podfile diff --git a/example/complete/ios/Demo/Podfile.lock b/examples/complete/ios/Demo/Podfile.lock similarity index 100% rename from example/complete/ios/Demo/Podfile.lock rename to examples/complete/ios/Demo/Podfile.lock diff --git a/example/complete/ios/Demo/Pods/Local Podspecs/StyleDictionary.podspec.json b/examples/complete/ios/Demo/Pods/Local Podspecs/StyleDictionary.podspec.json similarity index 100% rename from example/complete/ios/Demo/Pods/Local Podspecs/StyleDictionary.podspec.json rename to examples/complete/ios/Demo/Pods/Local Podspecs/StyleDictionary.podspec.json diff --git a/example/complete/ios/Demo/Pods/Manifest.lock b/examples/complete/ios/Demo/Pods/Manifest.lock similarity index 100% rename from example/complete/ios/Demo/Pods/Manifest.lock rename to examples/complete/ios/Demo/Pods/Manifest.lock diff --git a/example/complete/ios/Demo/Pods/Pods.xcodeproj/project.pbxproj b/examples/complete/ios/Demo/Pods/Pods.xcodeproj/project.pbxproj similarity index 100% rename from example/complete/ios/Demo/Pods/Pods.xcodeproj/project.pbxproj rename to examples/complete/ios/Demo/Pods/Pods.xcodeproj/project.pbxproj diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Info.plist b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Info.plist similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Info.plist rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Info.plist diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-acknowledgements.markdown b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-acknowledgements.markdown similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-acknowledgements.markdown rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-acknowledgements.markdown diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-acknowledgements.plist b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-acknowledgements.plist similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-acknowledgements.plist rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-acknowledgements.plist diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-dummy.m b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-dummy.m similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-dummy.m rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-dummy.m diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-frameworks.sh b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-frameworks.sh similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-frameworks.sh rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-frameworks.sh diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-resources.sh b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-resources.sh similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-resources.sh rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-resources.sh diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-umbrella.h b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-umbrella.h similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-umbrella.h rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo-umbrella.h diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.debug.xcconfig b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.debug.xcconfig similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.debug.xcconfig rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.debug.xcconfig diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.modulemap b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.modulemap similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.modulemap rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.modulemap diff --git a/example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.release.xcconfig b/examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.release.xcconfig similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.release.xcconfig rename to examples/complete/ios/Demo/Pods/Target Support Files/Pods-StyleDictionary_Demo/Pods-StyleDictionary_Demo.release.xcconfig diff --git a/example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/Info.plist b/examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/Info.plist similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/Info.plist rename to examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/Info.plist diff --git a/example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/ResourceBundle-StyleDictionary-Info.plist b/examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/ResourceBundle-StyleDictionary-Info.plist similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/ResourceBundle-StyleDictionary-Info.plist rename to examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/ResourceBundle-StyleDictionary-Info.plist diff --git a/example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-dummy.m b/examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-dummy.m similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-dummy.m rename to examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-dummy.m diff --git a/example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-prefix.pch b/examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-prefix.pch similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-prefix.pch rename to examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-prefix.pch diff --git a/example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-umbrella.h b/examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-umbrella.h similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-umbrella.h rename to examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary-umbrella.h diff --git a/example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary.modulemap b/examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary.modulemap similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary.modulemap rename to examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary.modulemap diff --git a/example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary.xcconfig b/examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary.xcconfig similarity index 100% rename from example/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary.xcconfig rename to examples/complete/ios/Demo/Pods/Target Support Files/StyleDictionary/StyleDictionary.xcconfig diff --git a/example/complete/ios/Demo/StyleDictionary.xcodeproj/project.pbxproj b/examples/complete/ios/Demo/StyleDictionary.xcodeproj/project.pbxproj similarity index 100% rename from example/complete/ios/Demo/StyleDictionary.xcodeproj/project.pbxproj rename to examples/complete/ios/Demo/StyleDictionary.xcodeproj/project.pbxproj diff --git a/example/complete/ios/Demo/StyleDictionary.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/complete/ios/Demo/StyleDictionary.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/complete/ios/Demo/StyleDictionary.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to examples/complete/ios/Demo/StyleDictionary.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/example/complete/ios/Demo/StyleDictionary.xcodeproj/xcshareddata/xcschemes/StyleDictionary-Demo.xcscheme b/examples/complete/ios/Demo/StyleDictionary.xcodeproj/xcshareddata/xcschemes/StyleDictionary-Demo.xcscheme similarity index 100% rename from example/complete/ios/Demo/StyleDictionary.xcodeproj/xcshareddata/xcschemes/StyleDictionary-Demo.xcscheme rename to examples/complete/ios/Demo/StyleDictionary.xcodeproj/xcshareddata/xcschemes/StyleDictionary-Demo.xcscheme diff --git a/example/complete/ios/Demo/StyleDictionary.xcworkspace/contents.xcworkspacedata b/examples/complete/ios/Demo/StyleDictionary.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/complete/ios/Demo/StyleDictionary.xcworkspace/contents.xcworkspacedata rename to examples/complete/ios/Demo/StyleDictionary.xcworkspace/contents.xcworkspacedata diff --git a/example/complete/ios/Demo/StyleDictionary/Base.lproj/LaunchScreen.storyboard b/examples/complete/ios/Demo/StyleDictionary/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Base.lproj/LaunchScreen.storyboard rename to examples/complete/ios/Demo/StyleDictionary/Base.lproj/LaunchScreen.storyboard diff --git a/example/complete/ios/Demo/StyleDictionary/Base.lproj/Main.storyboard b/examples/complete/ios/Demo/StyleDictionary/Base.lproj/Main.storyboard similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Base.lproj/Main.storyboard rename to examples/complete/ios/Demo/StyleDictionary/Base.lproj/Main.storyboard diff --git a/example/complete/ios/Demo/StyleDictionary/Components/CardViewCell.h b/examples/complete/ios/Demo/StyleDictionary/Components/CardViewCell.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/CardViewCell.h rename to examples/complete/ios/Demo/StyleDictionary/Components/CardViewCell.h diff --git a/example/complete/ios/Demo/StyleDictionary/Components/CardViewCell.m b/examples/complete/ios/Demo/StyleDictionary/Components/CardViewCell.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/CardViewCell.m rename to examples/complete/ios/Demo/StyleDictionary/Components/CardViewCell.m diff --git a/example/complete/ios/Demo/StyleDictionary/Components/ColorCell.h b/examples/complete/ios/Demo/StyleDictionary/Components/ColorCell.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/ColorCell.h rename to examples/complete/ios/Demo/StyleDictionary/Components/ColorCell.h diff --git a/example/complete/ios/Demo/StyleDictionary/Components/ColorCell.m b/examples/complete/ios/Demo/StyleDictionary/Components/ColorCell.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/ColorCell.m rename to examples/complete/ios/Demo/StyleDictionary/Components/ColorCell.m diff --git a/example/complete/ios/Demo/StyleDictionary/Components/FontColorViewCell.h b/examples/complete/ios/Demo/StyleDictionary/Components/FontColorViewCell.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/FontColorViewCell.h rename to examples/complete/ios/Demo/StyleDictionary/Components/FontColorViewCell.h diff --git a/example/complete/ios/Demo/StyleDictionary/Components/FontColorViewCell.m b/examples/complete/ios/Demo/StyleDictionary/Components/FontColorViewCell.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/FontColorViewCell.m rename to examples/complete/ios/Demo/StyleDictionary/Components/FontColorViewCell.m diff --git a/example/complete/ios/Demo/StyleDictionary/Components/HeaderCollectionViewCell.h b/examples/complete/ios/Demo/StyleDictionary/Components/HeaderCollectionViewCell.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/HeaderCollectionViewCell.h rename to examples/complete/ios/Demo/StyleDictionary/Components/HeaderCollectionViewCell.h diff --git a/example/complete/ios/Demo/StyleDictionary/Components/HeaderCollectionViewCell.m b/examples/complete/ios/Demo/StyleDictionary/Components/HeaderCollectionViewCell.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/HeaderCollectionViewCell.m rename to examples/complete/ios/Demo/StyleDictionary/Components/HeaderCollectionViewCell.m diff --git a/example/complete/ios/Demo/StyleDictionary/Components/IconViewCell.h b/examples/complete/ios/Demo/StyleDictionary/Components/IconViewCell.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/IconViewCell.h rename to examples/complete/ios/Demo/StyleDictionary/Components/IconViewCell.h diff --git a/example/complete/ios/Demo/StyleDictionary/Components/IconViewCell.m b/examples/complete/ios/Demo/StyleDictionary/Components/IconViewCell.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Components/IconViewCell.m rename to examples/complete/ios/Demo/StyleDictionary/Components/IconViewCell.m diff --git a/example/complete/ios/Demo/StyleDictionary/Images.xcassets/AppIcon.appiconset/Contents.json b/examples/complete/ios/Demo/StyleDictionary/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Images.xcassets/AppIcon.appiconset/Contents.json rename to examples/complete/ios/Demo/StyleDictionary/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/example/complete/ios/Demo/StyleDictionary/Images.xcassets/LaunchImage.launchimage/Contents.json b/examples/complete/ios/Demo/StyleDictionary/Images.xcassets/LaunchImage.launchimage/Contents.json similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Images.xcassets/LaunchImage.launchimage/Contents.json rename to examples/complete/ios/Demo/StyleDictionary/Images.xcassets/LaunchImage.launchimage/Contents.json diff --git a/example/complete/ios/Demo/StyleDictionary/Main.storyboard b/examples/complete/ios/Demo/StyleDictionary/Main.storyboard similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Main.storyboard rename to examples/complete/ios/Demo/StyleDictionary/Main.storyboard diff --git a/example/complete/ios/Demo/StyleDictionary/StyleDictionary-Info.plist b/examples/complete/ios/Demo/StyleDictionary/StyleDictionary-Info.plist similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/StyleDictionary-Info.plist rename to examples/complete/ios/Demo/StyleDictionary/StyleDictionary-Info.plist diff --git a/example/complete/ios/Demo/StyleDictionary/StyleDictionary-Prefix.pch b/examples/complete/ios/Demo/StyleDictionary/StyleDictionary-Prefix.pch similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/StyleDictionary-Prefix.pch rename to examples/complete/ios/Demo/StyleDictionary/StyleDictionary-Prefix.pch diff --git a/example/complete/ios/Demo/StyleDictionary/StyleDictionaryAppDelegate.h b/examples/complete/ios/Demo/StyleDictionary/StyleDictionaryAppDelegate.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/StyleDictionaryAppDelegate.h rename to examples/complete/ios/Demo/StyleDictionary/StyleDictionaryAppDelegate.h diff --git a/example/complete/ios/Demo/StyleDictionary/StyleDictionaryAppDelegate.m b/examples/complete/ios/Demo/StyleDictionary/StyleDictionaryAppDelegate.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/StyleDictionaryAppDelegate.m rename to examples/complete/ios/Demo/StyleDictionary/StyleDictionaryAppDelegate.m diff --git a/example/complete/ios/Demo/StyleDictionary/StyleDictionaryViewController.h b/examples/complete/ios/Demo/StyleDictionary/StyleDictionaryViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/StyleDictionaryViewController.h rename to examples/complete/ios/Demo/StyleDictionary/StyleDictionaryViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/StyleDictionaryViewController.m b/examples/complete/ios/Demo/StyleDictionary/StyleDictionaryViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/StyleDictionaryViewController.m rename to examples/complete/ios/Demo/StyleDictionary/StyleDictionaryViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/BackgroundColorsViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/BackgroundColorsViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/BackgroundColorsViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/BackgroundColorsViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/BackgroundColorsViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/BackgroundColorsViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/BackgroundColorsViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/BackgroundColorsViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/BaseColorViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/BaseColorViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/BaseColorViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/BaseColorViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/BaseColorViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/BaseColorViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/BaseColorViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/BaseColorViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/ColorDetailViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/ColorDetailViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/ColorDetailViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/ColorDetailViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/ColorDetailViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/ColorDetailViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/ColorDetailViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/ColorDetailViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/ColorViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/ColorViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/ColorViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/ColorViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/ColorViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/ColorViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/ColorViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/ColorViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/IconDetailViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/IconDetailViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/IconDetailViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/IconDetailViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/IconDetailViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/IconDetailViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/IconDetailViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/IconDetailViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/IconsViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/IconsViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/IconsViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/IconsViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/IconsViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/IconsViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/IconsViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/IconsViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/PropertiesViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/PropertiesViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/PropertiesViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/PropertiesViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/PropertiesViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/PropertiesViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/PropertiesViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/PropertiesViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/RootViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/RootViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/RootViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/RootViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/RootViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/RootViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/RootViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/RootViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/SizeViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/SizeViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/SizeViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/SizeViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/SizeViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/SizeViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/SizeViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/SizeViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/Views/TextColorViewController.h b/examples/complete/ios/Demo/StyleDictionary/Views/TextColorViewController.h similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/TextColorViewController.h rename to examples/complete/ios/Demo/StyleDictionary/Views/TextColorViewController.h diff --git a/example/complete/ios/Demo/StyleDictionary/Views/TextColorViewController.m b/examples/complete/ios/Demo/StyleDictionary/Views/TextColorViewController.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/Views/TextColorViewController.m rename to examples/complete/ios/Demo/StyleDictionary/Views/TextColorViewController.m diff --git a/example/complete/ios/Demo/StyleDictionary/en.lproj/InfoPlist.strings b/examples/complete/ios/Demo/StyleDictionary/en.lproj/InfoPlist.strings similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/en.lproj/InfoPlist.strings rename to examples/complete/ios/Demo/StyleDictionary/en.lproj/InfoPlist.strings diff --git a/example/complete/ios/Demo/StyleDictionary/main.m b/examples/complete/ios/Demo/StyleDictionary/main.m similarity index 100% rename from example/complete/ios/Demo/StyleDictionary/main.m rename to examples/complete/ios/Demo/StyleDictionary/main.m diff --git a/example/complete/ios/README.md b/examples/complete/ios/README.md similarity index 100% rename from example/complete/ios/README.md rename to examples/complete/ios/README.md diff --git a/example/complete/package.json b/examples/complete/package.json similarity index 83% rename from example/complete/package.json rename to examples/complete/package.json index a4a424aa8..7fb708f77 100644 --- a/example/complete/package.json +++ b/examples/complete/package.json @@ -5,11 +5,12 @@ "main": "build.js", "scripts": { "build": "node_modules/.bin/style-dictionary build", + "clean": "rm -rf build", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "Apache-2.0", "devDependencies": { - "style-dictionary": "2.5.0" + "style-dictionary": "2.6.0" } } \ No newline at end of file diff --git a/example/complete/properties/asset/font.json b/examples/complete/properties/asset/font.json similarity index 100% rename from example/complete/properties/asset/font.json rename to examples/complete/properties/asset/font.json diff --git a/example/complete/properties/color/background.json b/examples/complete/properties/color/background.json similarity index 100% rename from example/complete/properties/color/background.json rename to examples/complete/properties/color/background.json diff --git a/example/complete/properties/color/base.json b/examples/complete/properties/color/base.json similarity index 100% rename from example/complete/properties/color/base.json rename to examples/complete/properties/color/base.json diff --git a/example/complete/properties/color/border.json b/examples/complete/properties/color/border.json similarity index 100% rename from example/complete/properties/color/border.json rename to examples/complete/properties/color/border.json diff --git a/example/complete/properties/color/brand.json b/examples/complete/properties/color/brand.json similarity index 100% rename from example/complete/properties/color/brand.json rename to examples/complete/properties/color/brand.json diff --git a/example/complete/properties/color/chart.json b/examples/complete/properties/color/chart.json similarity index 100% rename from example/complete/properties/color/chart.json rename to examples/complete/properties/color/chart.json diff --git a/example/complete/properties/color/font.json b/examples/complete/properties/color/font.json similarity index 100% rename from example/complete/properties/color/font.json rename to examples/complete/properties/color/font.json diff --git a/example/complete/properties/content/icon.json b/examples/complete/properties/content/icon.json similarity index 100% rename from example/complete/properties/content/icon.json rename to examples/complete/properties/content/icon.json diff --git a/example/complete/properties/font.json b/examples/complete/properties/font.json similarity index 100% rename from example/complete/properties/font.json rename to examples/complete/properties/font.json diff --git a/example/complete/properties/size/font.json b/examples/complete/properties/size/font.json similarity index 100% rename from example/complete/properties/size/font.json rename to examples/complete/properties/size/font.json diff --git a/example/complete/properties/size/icon.json b/examples/complete/properties/size/icon.json similarity index 100% rename from example/complete/properties/size/icon.json rename to examples/complete/properties/size/icon.json diff --git a/example/complete/properties/size/padding.json b/examples/complete/properties/size/padding.json similarity index 100% rename from example/complete/properties/size/padding.json rename to examples/complete/properties/size/padding.json diff --git a/example/complete/properties/time.json b/examples/complete/properties/time.json similarity index 100% rename from example/complete/properties/time.json rename to examples/complete/properties/time.json diff --git a/images/build-diagram.png b/images/build-diagram.png deleted file mode 100644 index 4524d1cd8..000000000 Binary files a/images/build-diagram.png and /dev/null differ diff --git a/images/logo.png b/images/logo.png deleted file mode 100644 index 74bb2e1a1..000000000 Binary files a/images/logo.png and /dev/null differ diff --git a/lib/common/formats.js b/lib/common/formats.js index b9a222bc8..d9f5ad3b2 100644 --- a/lib/common/formats.js +++ b/lib/common/formats.js @@ -33,7 +33,7 @@ function variablesWithPrefix(prefix, properties) { var to_ret_prop = prefix + prop.name + ': ' + (prop.attributes.category==='asset' ? '"'+prop.value+'"' : prop.value) + ';'; if (prop.comment) - to_ret_prop = to_ret_prop.concat(' // ' + prop.comment); + to_ret_prop = to_ret_prop.concat(' /* ' + prop.comment + ' */'); return to_ret_prop; }) .filter(function(strVal) { return !!strVal }) @@ -92,6 +92,47 @@ module.exports = { '\n}\n'; }, + /** + * Creates a Sass file with a flat map based on the style dictionary + * + * @memberof Formats + * @kind member + * @example + * ```scss + * $tokens: ( + * $color-background-base: #f0f0f0; + * $color-background-alt: #eeeeee; + * ) + * ``` + */ + 'sass/map-flat': _.template( + fs.readFileSync(__dirname + '/templates/sass/map-flat.template') + ), + + /** + * Creates a Sass file with a deep map based on the style dictionary + * + * @memberof Formats + * @kind member + * @example + * ```scss + * $color-background-base: #f0f0f0 !default; + * $color-background-alt: #eeeeee !default; + * + * $tokens: { + * 'color': ( + * 'background': ( + * 'base': $color-background-base, + * 'alt': $color-background-alt + * ) + * ) + * ) + * ``` + */ + 'sass/map-deep': _.template( + fs.readFileSync(__dirname + '/templates/sass/map-deep.template') + ), + /** * Creates a SCSS file with variable definitions based on the style dictionary * @@ -585,6 +626,23 @@ module.exports = { return JSON.stringify(minifyDictionary(dictionary.properties), null, 2); }, + /** + * Creates a JSON flat file of the style dictionary. + * + * @memberof Formats + * @kind member + * @example + * ```json + * { + * "color-base-red": "#ff000" + * } + * ``` + */ + 'json/flat': function(dictionary) { + return '{\n' + _.map(dictionary.allProperties, function(prop) { + return ` "${prop.name}": ${JSON.stringify(prop.value)}`; + }).join(',\n') + '\n}'; + }, /** * Creates a sketchpalette file of all the base colors diff --git a/lib/common/templates/sass/map-deep.template b/lib/common/templates/sass/map-deep.template new file mode 100644 index 000000000..bb6cf7a27 --- /dev/null +++ b/lib/common/templates/sass/map-deep.template @@ -0,0 +1,68 @@ +<% +// +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. + +%> +<% + // for backward compatibility we need to have the user explicitly hide it + var showFileHeader = (this.options && this.options.hasOwnProperty('showFileHeader')) ? this.options.showFileHeader : true; + if(showFileHeader) { + var header = ''; + header += "/*\n Do not edit directly"; + header += "\n Generated on " + new Date().toUTCString(); + header += "\n*/\n"; + print(header); + } + + print("\n"); + + // output the list of tokens as Sass variables + // + _.each(allProperties, function(prop) { + var output = ''; + output += '$' + prop.name + ': ' + prop.value + ' !default;' + if(prop.comment) { + output += ' // ' + prop.comment; + } + output += '\n'; + print(output); + }); + + print('\n'); + + // output the list of tokens as a Sass nested map + // (the values are pointing to the variables) + // + print(`$tokens: ${processJsonNode(properties, 0)};\n`); + + // recursive function to process a properties JSON node + // + function processJsonNode(obj, depth) { + var output = ''; + if (obj.hasOwnProperty('value')) { + // if we have found a leaf (a property with a value) append the value + output += `$${obj.name}`; + } else { + // if we have found a group of properties, use the Sass group "(...)" syntax and loop -recursively- on the children + output += '(\n' + output += Object.keys(obj).map(function(newKey) { + var newProp = obj[newKey]; + var indent = ' '.repeat(depth+1); + return `${indent}'${newKey}': ${processJsonNode(newProp, depth + 1)}`; + }).join(',\n'); + output += '\n' + ' '.repeat(depth) + ')'; + } + return output; + } +%> \ No newline at end of file diff --git a/lib/common/templates/sass/map-flat.template b/lib/common/templates/sass/map-flat.template new file mode 100644 index 000000000..91913ad4f --- /dev/null +++ b/lib/common/templates/sass/map-flat.template @@ -0,0 +1,42 @@ +<% +// +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"). +// You may not use this file except in compliance with the License. +// A copy of the License is located at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// or in the "license" file accompanying this file. This file is distributed +// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +// express or implied. See the License for the specific language governing +// permissions and limitations under the License. + +%> +<% + // for backward compatibility we need to have the user explicitly hide it + var showFileHeader = (this.options && this.options.hasOwnProperty('showFileHeader')) ? this.options.showFileHeader : true; + if(showFileHeader) { + var header = ''; + header += "/*\n Do not edit directly"; + header += "\n Generated on " + new Date().toUTCString(); + header += "\n*/\n"; + print(header); + } + + print('\n'); + + var output = ''; + output += '$tokens: (\n'; + output += allProperties.map(function(prop){ + var line = ''; + if(prop.comment) { + line += ' // ' + prop.comment + '\n'; + } + line += ' \'' + prop.name + '\': ' + prop.value + return line; + }).join(',\n'); + output += '\n);'; + print(output); +%> diff --git a/package-lock.json b/package-lock.json index f9bd52c77..ce2ccdf5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "style-dictionary", - "version": "2.5.0", + "version": "2.6.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9bb419c09..34f381c90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "style-dictionary", - "version": "2.5.0", + "version": "2.6.0", "description": "Style once, use everywhere. A build system for creating cross-platform styles.", "keywords": [ "style dictionary", @@ -37,6 +37,7 @@ "scripts": { "lint": "eslint index.js lib/**/*.js test/*.js test/**/*.js", "test": "npm run lint && jest --runInBand", + "test-watch": "npm run lint && jest --runInBand --watch", "coverage": "istanbul cover ./node_modules/mocha/bin/_mocha -- test/*.js test/**/*.js", "preversion": "npm test", "version": "node ./scripts/version.js && npm run generate-docs", diff --git a/scripts/handlebars/templates/formats.hbs b/scripts/handlebars/templates/formats.hbs index 678e51563..4e2cb73e0 100644 --- a/scripts/handlebars/templates/formats.hbs +++ b/scripts/handlebars/templates/formats.hbs @@ -6,7 +6,7 @@ your style dictionary. ### Using formats -You use formats in your config file under platforms > [platform] > files > [file] +You use formats in your config file under platforms > [platform] > files > [file] > format ```json { diff --git a/scripts/handlebars/templates/transform_groups.hbs b/scripts/handlebars/templates/transform_groups.hbs index 2f3935288..03c34a6ac 100644 --- a/scripts/handlebars/templates/transform_groups.hbs +++ b/scripts/handlebars/templates/transform_groups.hbs @@ -1,6 +1,6 @@ # Transform Groups -Transform Groups are a way to easily define and use groups of transforms. They are an array of transforms. You can define custom transform groups with the [`registerTransformGroup`](api.md#registertransformgroup). +Transform Groups are a way to easily use multiple transforms at once. They are an array of transforms. You can define a custom transform group with the [`registerTransformGroup`](api.md#registertransformgroup). You use transformGroups in your config file under platforms > [platform] > transformGroup diff --git a/scripts/version.js b/scripts/version.js index 107c3a620..17203de3b 100644 --- a/scripts/version.js +++ b/scripts/version.js @@ -3,23 +3,12 @@ const glob = require('glob'); const path = require('path'); const execSync = require('child_process').execSync; const PACKAGE = require('../package.json'); -const dirs = glob.sync('./example/*', {}); +const packageJSONs = glob.sync('./examples/**/package.json', {}); -function fileExists(filePath) { - try { - return fs.statSync(filePath).isFile(); - } catch (err) { - return false; - } -} - -dirs.forEach(function(dir) { - let filePath = path.join(dir, 'package.json'); - if (fileExists(filePath)) { - let pkg = fs.readJsonSync( filePath ); - pkg.devDependencies[PACKAGE.name] = PACKAGE.version; - fs.writeFileSync(filePath, JSON.stringify(pkg, null, 2)); - // Add the package.json file to staging so it'll get commited - execSync(`git add ${filePath}`); - } +packageJSONs.forEach(function(filePath) { + let pkg = fs.readJsonSync(filePath); + pkg.devDependencies[PACKAGE.name] = PACKAGE.version; + fs.writeFileSync(filePath, JSON.stringify(pkg, null, 2)); + // Add the package.json file to staging so it'll get commited + execSync(`git add ${filePath}`); });