polaris_tokens 1.1.0.pre.beta.7 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -2
  3. data/package.json +1 -1
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ef4032e7bd8111a0e7c6edf60c731b91df4068a
4
- data.tar.gz: e645deab766bad8601dbe3d9c374a6f834b4a2ef
3
+ metadata.gz: b14464d068a6602d40459f6b530e95eca1baca11
4
+ data.tar.gz: 1d130ed7333bab11f97a0b0f5d79f620a6a7039d
5
5
  SHA512:
6
- metadata.gz: e93adf0252e613849507fea6a0e93f2a3e04d1c3eebfef7f3d7b97fd9841007985639842d6e9717feadecb00f015b0cc21a1fc47f2bcc56530feb7fb82d46335
7
- data.tar.gz: 94adf6b829853aa2ead1338b6476d744def265852084123e3c372745fef07862ad921c088a85f8ddb76910a780ca5d67c9d4862f887ff806ea33392ee2036a78
6
+ metadata.gz: 3e8fb19dada0fe237514a81440ee08cf666649330c8c94eceaacd007a0016c83a9eef7bb3e221ccf3e89ed65463a1b17a477687e6fdde4aafb39dac47775f4ca
7
+ data.tar.gz: 6ab10a2208f94d393c604a4df1db5a79771809fae77835687f0ed80066f5301eab02b7874c75f1326afa13f52ef9ea58c17f9a15e1e0f3793fc4737a443389a4
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  <h1 align="center">Polaris design tokens</h1>
2
2
 
3
+ <img src="https://user-images.githubusercontent.com/85783/39013335-ebf76f5e-43cb-11e8-81f2-706259125897.png" alt="" align="center" />
4
+
3
5
  <h3 align="center">Colors, spacing, typography for all platforms</h3>
4
6
 
5
7
  <p align="center"><em>JavaScript · JSON · CSS · SCSS · Sketch · macOS · Adobe Swatch</em></p>
@@ -20,9 +22,11 @@ Design tokens originated at Salesforce, and the best way to describe them is to
20
22
 
21
23
  ## Installation
22
24
 
23
- Polaris design tokens are available on [npm](https://www.npmjs.com/) as the `@shopify/polaris-tokens` package.
25
+ Polaris design tokens are available as both a npm package (`@shopify/polaris-tokens`) on [npm](https://www.npmjs.com/), and as a Ruby gem (`polaris_tokens`) on [RubyGems](https://rubygems.org/).
26
+
27
+ The recommended way to use and install design tokens may vary depending on your project; the most common are documented below.
24
28
 
25
- The recommended way to use and install design tokens may vary depending on your project, the most common are documented below.
29
+ ### JavaScript package installation
26
30
 
27
31
  Using [npm](https://www.npmjs.com/):
28
32
 
@@ -36,6 +40,15 @@ Using [yarn](https://yarnpkg.com/en/):
36
40
  yarn add @shopify/polaris-tokens
37
41
  ```
38
42
 
43
+ ### Ruby on Rails installation
44
+
45
+ Add `polaris_tokens` to your `Gemfile`:
46
+
47
+ ```sh
48
+ $ echo "gem 'polaris_tokens'" >> Gemfile
49
+ $ bundle install
50
+ ```
51
+
39
52
  ## Usage
40
53
 
41
54
  Find all available tokens in the [design tokens documentation](https://shopify.github.io/polaris-tokens/).
@@ -96,6 +109,17 @@ a {
96
109
  }
97
110
  ```
98
111
 
112
+ ### Rails
113
+
114
+ Token files are added to the assets pipeline. In JSON, design token names are formatted in [kebab-case](http://wiki.c2.com/?KebabCase).
115
+
116
+ ```ruby
117
+ require 'json'
118
+ polaris_token_file = Rails.application.assets_manifest.find_sources('colors.json').first
119
+ polaris_colors = JSON.parse(polaris_token_file)
120
+ polaris_colors['color-blue-lighter'] # "rgb(235, 245, 250)"
121
+ ```
122
+
99
123
  ---
100
124
 
101
125
  ## Contributing
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/polaris-tokens",
3
- "version": "1.1.0-beta.7",
3
+ "version": "1.1.0",
4
4
  "description": "Design Tokens for the Polaris Design System",
5
5
  "main": "index.js",
6
6
  "types": "dist/index.d.ts",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polaris_tokens
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre.beta.7
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-19 00:00:00.000000000 Z
11
+ date: 2018-04-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Design Tokens for the Polaris Design System
14
14
  email:
@@ -71,9 +71,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
71
71
  version: 2.4.0
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">"
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 1.3.1
76
+ version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
79
  rubygems_version: 2.6.14