This commit is contained in:
watson8544
2018-10-26 11:57:07 +08:00
parent 283afc64d5
commit 62697f062d
271 changed files with 0 additions and 13405 deletions
-42
View File
@@ -1,42 +0,0 @@
module.exports = {
"env": {
"browser" : true,
"commonjs": true,
"es6" : true,
"node" : true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6,
"sourceType" : "module"
},
"plugins": [
"html"
],
"rules": {
"array-bracket-spacing" : ["error", "never"],
"array-callback-return" : ["error"],
"block-scoped-var" : ["error"],
"block-spacing" : ["error", "always"],
"curly" : ["error"],
"dot-notation" : ["error"],
"eqeqeq" : ["error"],
"indent" : ["error", 4],
"linebreak-style" : ["error", "unix"],
"no-console" : ["warn"],
"no-floating-decimal" : ["error"],
"no-implicit-coercion" : ["error"],
"no-implicit-globals" : ["error"],
"no-loop-func" : ["error"],
"no-return-assign" : ["error"],
"no-template-curly-in-string": ["error"],
"no-unneeded-ternary" : ["error"],
"no-unused-vars" : ["error", { "args": "none" }],
"no-useless-computed-key" : ["error"],
"no-useless-return" : ["error"],
"no-var" : ["error"],
"prefer-const" : ["error"],
"quotes" : ["error", "single"],
"semi" : ["error", "always"]
}
};
-13
View File
@@ -1,13 +0,0 @@
# Folders
build
coverage
dist
node_modules
# Files
*.log
# OS
._*
.cache
.DS_Store
-44
View File
@@ -1,44 +0,0 @@
# Change Log
## 0.4.0
*2018-10-10*
- Added docsify-tabs support and demo.
- Added heading level 5-6 styles.
- Fixed `<small>` line height presentation.
## 0.3.0
*2018-08-07*
- Added `--sidebar-nav-pagelink-background-size` property.
## 0.2.0
*2018-08-07*
- Updated css-vars-ponyfill dependency to address potential issues with
CSS custom properties in legacy browsers.
## 0.1.2
*2018-06-23*
- Updated Simple and Simple-Dark themes: Fixed `--notice-tip-border-color`
value inheriting from `-theme-color`
- Fixed high CPU usage in Safari when using Simple or Simple-Dark themes
## 0.1.1
*2018-06-08*
- Update package.json, index.md and README copy
- Update default theme: remove borders from `<table>` and `<kbd>`
- Update simple theme: change `<blockquote>` style to match important/tip style
## 0.1.0
*2018-06-07*
- Initial release
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2018 John Hildenbiddle
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-21
View File
@@ -1,21 +0,0 @@
# M5Stack
**Welcome to M5Stack Documents!**
## Introduction
**M5 stack is a modular stackable development device. The M stands for Modular and 5 stands for the the units compact 5 x 5 cm size.**
**The M5 stack aims to take the pain out of developing your new inventions and ideas. M5 stack comes packed with sensors, wifi, bluetooth, a screen and its own power supply which avoids the inconvenience of messy wires strewn across breadboards and adding new functionality is as simple as stacking it on top of one of the many expansion modules or plugging in a unit via the handy grove connectors.**
Our a series of core boards are based on **ESP32** chip.
Our aim is "**Stackable Board is Product**". Here's the [Official Website](http://www.m5stack.com)
## Contact & Support
- :computer: Visit [Official Website](http://www.m5stack.com) for newest product
- :busts_in_silhouette: Sign in our [Forum](http://forum.m5stack.com) for more designs with M5Stack
- :mailbox_with_mail: If you have any questions, you can contact us by [Email](tech@m5stack.com)
- :convenience_store: If you want to get our products, access our [store](http://www.aliexpress.com/store/all-wholesale-products/3226069.html?spm=2114.12010108.100004.3.7e3a5379KoyhDo)
View File
-21
View File
@@ -1,21 +0,0 @@
# M5Stack
**Welcome to M5Stack Documents!**
## Introduction
**M5 stack is a modular stackable development device. The M stands for Modular and 5 stands for the the units compact 5 x 5 cm size.**
**The M5 stack aims to take the pain out of developing your new inventions and ideas. M5 stack comes packed with sensors, wifi, bluetooth, a screen and its own power supply which avoids the inconvenience of messy wires strewn across breadboards and adding new functionality is as simple as stacking it on top of one of the many expansion modules or plugging in a unit via the handy grove connectors.**
Our a series of core boards are based on **ESP32** chip.
Our aim is "**Stackable Board is Product**". Here's the [Official Website](http://www.m5stack.com)
## Contact & Support
- :computer: Visit [Official Website](http://www.m5stack.com) for newest product
- :busts_in_silhouette: Sign in our [Forum](http://forum.m5stack.com) for more designs with M5Stack
- :mailbox_with_mail: If you have any questions, you can contact us by [Email](tech@m5stack.com)
- :convenience_store: If you want to get our products, access our [store](http://www.aliexpress.com/store/all-wholesale-products/3226069.html?spm=2114.12010108.100004.3.7e3a5379KoyhDo)
-12
View File
@@ -1,12 +0,0 @@
![logo](assets/img/coverpage_logo.png)
# Style Dictionary
> Style once, use everywhere.
**Style Dictionary** is a build 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, or anything you can think of. 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.
[GitHub](https://github.com/amzn/style-dictionary)
[Get Started](README.md)
![color](#D9F8F5)
-3
View File
@@ -1,3 +0,0 @@
- [中文](/cn/)
- [En](/)
- [日本語](/jp/)
-44
View File
@@ -1,44 +0,0 @@
# Actions
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).
You use actions in your config file under platforms > [platform] > actions
```json
{
"source": ["properties/**/*.json"],
"platforms": {
"android": {
"transformGroup": "android",
"files": [],
"actions": ["copy_assets"]
}
}
}
```
----
## Pre-defined Actions
[lib/common/actions.js](https://github.com/amzn/style-dictionary/blob/master/lib/common/actions.js)
### android/copyImages
Action to copy images into appropriate android directories.
* * *
### copy_assets
Action that copies everything in the assets directory to a new assets directory in the build path of the platform.
* * *
-1
View File
@@ -1 +0,0 @@
[LCD](api_reference/api_lcd)
-295
View File
@@ -1,295 +0,0 @@
# LCD
### buildAllPlatforms
> StyleDictionary.buildAllPlatforms() ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
The only top-level method that needs to be called
to build the Style Dictionary.
**Example**
```js
const StyleDictionary = require('style-dictionary').extend('config.json');
StyleDictionary.buildAllPlatforms();
```
* * *
### buildPlatform
> StyleDictionary.buildPlatform(platform) ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
Takes a platform and performs all transforms to
the properties object (non-mutative) then
builds all the files and performs any actions. This is useful if you only want to
build the artifacts of one platform to speed up the build process.
This method is also used internally in [buildAllPlatforms](#buildAllPlatforms) to
build each platform defined in the config.
| Param | Type | Description |
| --- | --- | --- |
| platform | <code>String</code> | Name of the platform you want to build. |
**Example**
```js
StyleDictionary.buildPlatform('web');
```
```bash
$ style-dictionary build --platform web
```
* * *
### cleanAllPlatforms
> StyleDictionary.cleanAllPlatforms() ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
Does the reverse of [buildAllPlatforms](#buildAllPlatforms) by
performing a clean on each platform. This removes all the files
defined in the platform and calls the undo method on any actions.
* * *
### cleanPlatform
> StyleDictionary.cleanPlatform(platform) ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
Takes a platform and performs all transforms to
the properties object (non-mutative) then
cleans all the files and perfoms the undo method of any [actions](actions.md).
| Param | Type |
| --- | --- |
| platform | <code>String</code> |
* * *
### exportPlatform
> StyleDictionary.exportPlatform(platform) ⇒ <code>Object</code>
Exports a properties object with applied
platform transforms.
This is useful if you want to use a style
dictionary in JS build tools like webpack.
| Param | Type | Description |
| --- | --- | --- |
| platform | <code>String</code> | The platform to be exported. Must be defined on the style dictionary. |
* * *
### extend
> StyleDictionary.extend(config) ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
Create a Style Dictionary
| Param | Type | Description |
| --- | --- | --- |
| config | [<code>Config</code>](#Config) | Configuration options to build your style dictionary. If you pass a string, it will be used as a path to a JSON config file. You can also pass an object with the configuration. |
**Example**
```js
const StyleDictionary = require('style-dictionary').extend('config.json');
const StyleDictionary = require('style-dictionary').extend({
source: ['properties/*.json'],
platforms: {
scss: {
transformGroup: 'scss',
buildPath: 'build/',
files: [{
destination: 'variables.scss',
format: 'scss/variables'
}]
}
// ...
}
});
```
* * *
### registerAction
> StyleDictionary.registerAction(action) ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
Adds a custom action to the style property builder. Custom
actions can do whatever you need, such as: copying files,
base64'ing files, running other build scripts, etc.
After you register a custom action, you then use that
action in a platform your config.json
Actions run after the files in a platform are generated so you
can perform operations on files generated by the style dictionary.
Actions are run sequentially, if you write synchronous code then
it will block other actions, or if you use asynchronous code like Promises
it will not block.
| Param | Type | Description |
| --- | --- | --- |
| action | <code>Object</code> | |
| action.name | <code>String</code> | The name of the action |
| action.do | <code>function</code> | The action in the form of a function. |
| [action.undo] | <code>function</code> | A function that undoes the action. |
**Example**
```js
StyleDictionary.registerAction({
name: 'copy_assets',
do: function(dictionary, config) {
console.log('Copying assets directory');
fs.copySync('assets', config.buildPath + 'assets');
},
undo: function(dictionary, config) {
console.log('Cleaning assets directory');
fs.removeSync(config.buildPath + 'assets');
}
});
```
* * *
### registerFormat
> StyleDictionary.registerFormat(format) ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
Add a custom format to the style dictionary
| Param | Type | Description |
| --- | --- | --- |
| format | <code>Object</code> | |
| format.name | <code>String</code> | Name of the format to be referenced in your config.json |
| format.formatter | <code>function</code> | Function to perform the format. Takes 2 arguments, `dictionary` and `config` Must return a string. |
**Example**
```js
StyleDictionary.registerFormat({
name: 'json',
formatter: function(dictionary, config) {
return JSON.stringify(dictionary.properties, null, 2);
}
})
```
* * *
### registerTemplate
> StyleDictionary.registerTemplate(template) ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
Add a custom template to the Style Dictionary
| Param | Type | Description |
| --- | --- | --- |
| template | <code>Object</code> | |
| template.name | <code>String</code> | The name of your template. You will refer to this in your config.json file. |
| template.template | <code>String</code> | Path to your lodash template |
**Example**
```js
StyleDictionary.registerTemplate({
name: 'Swift/colors',
template: __dirname + '/templates/swift/colors.template'
});
```
* * *
### registerTransform
> StyleDictionary.registerTransform(transform) ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
Add a custom transform to the Style Dictionary
Transforms can manipulate a property's name, value, or attributes
| Param | Type | Description |
| --- | --- | --- |
| transform | <code>Object</code> | Transform object |
| transform.type | <code>String</code> | Type of transform, can be: name, attribute, or value |
| transform.name | <code>String</code> | Name of the transformer so a transformGroup can call a list of transforms. |
| [transform.matcher] | <code>function</code> | Matcher function, return boolean if transform should be applied. If you omit the matcher function, it will match all properties. |
| transform.transformer | <code>function</code> | Performs a transform on a property object, should return a string or object depending on the type. Will only update certain properties so you can't mess up property objects on accident. |
**Example**
```js
StyleDictionary.registerTransform({
name: 'time/seconds',
type: 'value',
matcher: function(prop) {
return prop.attributes.category === 'time';
},
transformer: function(prop) {
// Note the use of prop.original.value,
// before any transforms are performed, the build system
// clones the original property to the 'original' attribute.
return (parseInt(prop.original.value) / 1000).toString() + 's';
}
});
```
* * *
### registerTransformGroup
> StyleDictionary.registerTransformGroup(transformGroup) ⇒ [<code>style-dictionary</code>](#module_style-dictionary)
Add a custom transformGroup to the Style Dictionary, which is a
group of transforms.
| Param | Type | Description |
| --- | --- | --- |
| transformGroup | <code>Object</code> | |
| transformGroup.name | <code>String</code> | Name of the transform group that will be referenced in config.json |
| transformGroup.transforms | <code>Array.&lt;String&gt;</code> | Array of strings that reference the name of transforms to be applied in order. Transforms must be defined and match the name or there will be an error at build time. |
**Example**
```js
StyleDictionary.registerTransformGroup({
name: 'Swift',
transforms: [
'attribute/cti',
'size/pt',
'name/cti'
]
});
```
* * *
-48
View File
@@ -1,48 +0,0 @@
:root {--theme-color: hsl(204, 90%, 45%);}
.markdown-section a {
color: var(--theme-color,#42b983);
}
.markdown-section iframe[src*="buttons.github.io"] {
margin: 0;
}
figure.thumbnails img {
margin: 0.75em 0;
border-radius: 3px;
box-shadow: 0 2px 6px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.15);
}
@media (min-width: 30em) {
figure.thumbnails:after {
content: "";
display: table;
clear: both;
}
figure.thumbnails img {
float: left;
width: calc(50% - 0.75em);
}
figure.thumbnails img:nth-child(even) {
margin-left: 1.5em;
}
@supports (display: flex) {
figure.thumbnails {
display: flex;
align-items: center;
}
figure.thumbnails img {
flex-grow: 1;
width: 0;
}
figure.thumbnails img + img {
margin: 0 0 0 1.5em;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Some files were not shown because too many files have changed in this diff Show More