Initial commit

This commit is contained in:
Patrick Marsceill
2017-03-09 13:16:08 -05:00
commit b7b0d0d7bf
4147 changed files with 401224 additions and 0 deletions

31
node_modules/sugarss/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,31 @@
# Change Log
## 0.2
* Show error on semicolons and curly brackets.
* Fix source map mappings.
## 0.1.6
* Fix empty comments parsing.
## 0.1.5
* Put comments after declaration semicolon.
* Use PostCSS 5.1.
## 0.1.4
* Fix parsing nested properties.
## 0.1.3
* Fix source map generation.
## 0.1.2
* Fix rule/declaration selection in nested rules.
## 0.1.1
* Fix comment between declaration case.
* Add logo (by Maria Keller).
## 0.1
* Add selector pseudo-classes support.
## 0.0.1
* Initial release.

20
node_modules/sugarss/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2016 Andrey Sitnik <andrey@sitnik.ru>
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.

232
node_modules/sugarss/README.md generated vendored Normal file
View File

@@ -0,0 +1,232 @@
# SugarSS [![Build Status][ci-img]][ci]
<img align="right" width="120" height="155"
title="SugarSS logo by Maria Keller"
src="http://postcss.github.io/sugarss/logo.svg">
Indent-based CSS syntax for [PostCSS].
```sass
a
color: blue
.multiline,
.selector
box-shadow: 1px 0 9px rgba(0, 0, 0, .4),
1px 0 3px rgba(0, 0, 0, .6)
// Mobile
@media (max-width: 400px)
.body
padding: 0 10px
```
As any PostCSS custom syntax, SugarSS has source map, [stylelint]
and [postcss-sorting] support out-of-box.
It was designed to be used with [PreCSS] and [postcss-nested-props].
But you can use it with any PostCSS plugins
or use it without any PostCSS plugins.
With [gulp-sass-to-postcss-mixins] you can use `+mixin` syntax as in Sass.
<a href="https://evilmartians.com/?utm_source=sugarss">
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
alt="Sponsored by Evil Martians" width="236" height="54">
</a>
[gulp-sass-to-postcss-mixins]: https://github.com/akella/gulp-sass-to-postcss-mixins
[postcss-nested-props]: https://github.com/jedmao/postcss-nested-props
[postcss-sorting]: https://github.com/hudochenkov/postcss-sorting
[stylelint]: http://stylelint.io/
[PostCSS]: https://github.com/postcss/postcss
[PreCSS]: https://github.com/jonathantneal/precss
[ci-img]: https://img.shields.io/travis/postcss/sugarss.svg
[ci]: https://travis-ci.org/postcss/sugarss
## Syntax
SugarSS MIME-type is `text/x-sugarss` with `.sss` file extension.
### Indent
We recommend 2 spaces indent. However, SugarSS autodetects indent
and can be used with tabs or spaces.
But it is prohibited to mix spaces and tabs in SugarSS sources.
### Multiline
SugarSS was designed to have intuitively multiline selectors and declaration
values.
There are 3 rules for any types of nodes:
```sass
// 1. New line inside brackets will be ignored
@supports ( (display: flex) and
(display: grid) )
// 2. Comma at the end of the line
@media (max-width: 400px),
(max-height: 800px)
// 3. Backslash before new line
@media screen and \
(min-width: 600px)
```
In selector you can put a new line anywhere. Just keep same indent
for every line of selector:
```sass
.parent >
.child
color: black
```
In declaration value you can put new line anywhere. Just keep bigger indent
for value:
```sass
.one
background: linear-gradient(rgba(0, 0, 0, 0), black)
linear-gradient(red, rgba(255, 0, 0, 0))
.two
background:
linear-gradient(rgba(0, 0, 0, 0), black)
linear-gradient(red, rgba(255, 0, 0, 0))
```
### Comments
SugarSS supports two types of comments:
```sass
/*
Multiline comments
*/
// Inline comments
```
There is no “silent” comments in SugarSS. Output CSS will contain all comments
from `.sss` source. But you can use [postcss-discard-comments]
for Sasss silent/loud comments behaviour.
[postcss-discard-comments]: https://www.npmjs.com/package/postcss-discard-comments
### Rule and Declarations
SugarSS separates selectors and declarations by `:\s` or `:\n` token.
So you must write a space after property name: `color: black` is good,
`color:black` is prohibited.
## Text Editors
* Atom: [language-postcss], [source-preview-postcss] and [build-sugarss]
* Vim: [vim-sugarss]
We are working on syntax highlight support in text editors.
Right now, you can set `Sass` or `Stylus` syntax highlight for `.sss` files.
[language-postcss]: https://atom.io/packages/language-postcss
[source-preview-postcss]: https://atom.io/packages/source-preview-postcss
[build-sugarss]: https://atom.io/packages/build-sugarss
[vim-sugarss]: https://github.com/hhsnopek/vim-sugarss
## Usage
Install SugarSS via npm:
```sh
npm install sugarss --save-dev
```
### SugarSS to CSS
Just set SugarSS to PostCSS `parser` option and PostCSS will compile
SugarSS to CSS.
[Gulp](https://github.com/postcss/gulp-postcss):
```js
var sugarss = require('sugarss');
var postcss = require('gulp-postcss');
var rename = require('gulp-rename');
gulp.task('style', function () {
return gulp.src('src/**/*.sss')
.pipe(postcss(plugins, { parser: sugarss }))
.pipe(rename({ extname: '.css' }))
.pipe(gulp.dest('build'));
});
```
[Webpack](https://github.com/postcss/postcss-loader):
```js
module: {
loaders: [
{
test: /\.sss/,
loader: "style-loader!css-loader!postcss-loader?parser=sugarss"
}
]
}
```
[CLI](https://github.com/postcss/postcss-cli):
```
postcss -u autoprefixer -p sugarss test.sss -o test.css
```
### SugarSS to SugarSS
Sometimes we use PostCSS not to build CSS, but to fix source file.
For example, to sort properties by [postcss-sorting].
For this cases, use `syntax` option, instead of `parser`:
```js
gulp.task('sort', function () {
return gulp.src('src/**/*.sss')
.pipe(postcss([sorting], { syntax: sugarss }))
.pipe(gulp.dest('src'));
});
```
[postcss-sorting]: https://github.com/hudochenkov/postcss-sorting
### CSS to SugarSS
You can even compile existed CSS sources to SugarSS syntax.
Just use `stringifier` option instead of `parser`:
```js
postcss().process(css, { stringifier: sugarss }).then(function (result) {
result.content // Converted SugarSS content
});
```
### Imports
[postcss-import] doesnt support `.sss` file extension, because this plugin
implements W3C specification. If you want smarter `@import`, you should
use [postcss-easy-import] with `extensions` option.
```js
postcss([
easyImport({ extensions: ['.sss'] })
]).process(sss, { parser: sugarss })
```
[postcss-easy-import]: https://github.com/TrySound/postcss-easy-import
[postcss-import]: https://github.com/postcss/postcss-import
## Thanks
Cute project logo was made by [Maria Keller](http://www.mariakellerac.com/).

17
node_modules/sugarss/index.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
'use strict';
exports.__esModule = true;
var _stringify = require('./stringify');
var _stringify2 = _interopRequireDefault(_stringify);
var _parse = require('./parse');
var _parse2 = _interopRequireDefault(_parse);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = { stringify: _stringify2.default, parse: _parse2.default };
module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmVzNiJdLCJuYW1lcyI6WyJzdHJpbmdpZnkiLCJwYXJzZSJdLCJtYXBwaW5ncyI6Ijs7OztBQUFBOzs7O0FBQ0E7Ozs7OztrQkFFZSxFQUFFQSw4QkFBRixFQUFhQyxzQkFBYixFIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0cmluZ2lmeSBmcm9tICcuL3N0cmluZ2lmeSc7XG5pbXBvcnQgcGFyc2UgICAgIGZyb20gJy4vcGFyc2UnO1xuXG5leHBvcnQgZGVmYXVsdCB7IHN0cmluZ2lmeSwgcGFyc2UgfTtcbiJdfQ==

36
node_modules/sugarss/liner.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
'use strict';
exports.__esModule = true;
exports.default = liner;
function liner(tokens) {
var line = [];
var result = [line];
var brackets = 0;
for (var _iterator = tokens, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var token = _ref;
line.push(token);
if (token[0] === '(') {
brackets += 1;
} else if (token[0] === ')') {
brackets -= 1;
} else if (token[0] === 'newline' && brackets === 0) {
line = [];
result.push(line);
}
}
return result;
}
module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpbmVyLmVzNiJdLCJuYW1lcyI6WyJsaW5lciIsInRva2VucyIsImxpbmUiLCJyZXN1bHQiLCJicmFja2V0cyIsInRva2VuIiwicHVzaCJdLCJtYXBwaW5ncyI6Ijs7O2tCQUF3QkEsSztBQUFULFNBQVNBLEtBQVQsQ0FBZUMsTUFBZixFQUF1QjtBQUNsQyxRQUFJQyxPQUFXLEVBQWY7QUFDQSxRQUFJQyxTQUFXLENBQUNELElBQUQsQ0FBZjtBQUNBLFFBQUlFLFdBQVcsQ0FBZjtBQUNBLHlCQUFtQkgsTUFBbkIsa0hBQTRCO0FBQUE7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFBQSxZQUFsQkksS0FBa0I7O0FBQ3hCSCxhQUFLSSxJQUFMLENBQVVELEtBQVY7QUFDQSxZQUFLQSxNQUFNLENBQU4sTUFBYSxHQUFsQixFQUF3QjtBQUNwQkQsd0JBQVksQ0FBWjtBQUNILFNBRkQsTUFFTyxJQUFLQyxNQUFNLENBQU4sTUFBYSxHQUFsQixFQUF3QjtBQUMzQkQsd0JBQVksQ0FBWjtBQUNILFNBRk0sTUFFQSxJQUFLQyxNQUFNLENBQU4sTUFBYSxTQUFiLElBQTBCRCxhQUFhLENBQTVDLEVBQWdEO0FBQ25ERixtQkFBTyxFQUFQO0FBQ0FDLG1CQUFPRyxJQUFQLENBQVlKLElBQVo7QUFDSDtBQUNKO0FBQ0QsV0FBT0MsTUFBUDtBQUNIIiwiZmlsZSI6ImxpbmVyLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gbGluZXIodG9rZW5zKSB7XG4gICAgbGV0IGxpbmUgICAgID0gW107XG4gICAgbGV0IHJlc3VsdCAgID0gW2xpbmVdO1xuICAgIGxldCBicmFja2V0cyA9IDA7XG4gICAgZm9yICggbGV0IHRva2VuIG9mIHRva2VucyApIHtcbiAgICAgICAgbGluZS5wdXNoKHRva2VuKTtcbiAgICAgICAgaWYgKCB0b2tlblswXSA9PT0gJygnICkge1xuICAgICAgICAgICAgYnJhY2tldHMgKz0gMTtcbiAgICAgICAgfSBlbHNlIGlmICggdG9rZW5bMF0gPT09ICcpJyApIHtcbiAgICAgICAgICAgIGJyYWNrZXRzIC09IDE7XG4gICAgICAgIH0gZWxzZSBpZiAoIHRva2VuWzBdID09PSAnbmV3bGluZScgJiYgYnJhY2tldHMgPT09IDAgKSB7XG4gICAgICAgICAgICBsaW5lID0gW107XG4gICAgICAgICAgICByZXN1bHQucHVzaChsaW5lKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gcmVzdWx0O1xufVxuIl19

111
node_modules/sugarss/package.json generated vendored Normal file
View File

@@ -0,0 +1,111 @@
{
"_args": [
[
"sugarss@^0.2.0",
"/Users/pmarsceill/_projects/just-the-docs/node_modules/stylelint"
]
],
"_from": "sugarss@>=0.2.0 <0.3.0",
"_id": "sugarss@0.2.0",
"_inCache": true,
"_installable": true,
"_location": "/sugarss",
"_nodeVersion": "6.7.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/sugarss-0.2.0.tgz_1475852527678_0.7048247170168906"
},
"_npmUser": {
"email": "andrey@sitnik.ru",
"name": "ai"
},
"_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"name": "sugarss",
"raw": "sugarss@^0.2.0",
"rawSpec": "^0.2.0",
"scope": null,
"spec": ">=0.2.0 <0.3.0",
"type": "range"
},
"_requiredBy": [
"/stylelint"
],
"_resolved": "https://registry.npmjs.org/sugarss/-/sugarss-0.2.0.tgz",
"_shasum": "ac34237563327c6ff897b64742bf6aec190ad39e",
"_shrinkwrap": null,
"_spec": "sugarss@^0.2.0",
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/stylelint",
"author": {
"email": "andrey@sitnik.ru",
"name": "Andrey Sitnik"
},
"bugs": {
"url": "https://github.com/postcss/sugarss/issues"
},
"dependencies": {
"postcss": "^5.2.4"
},
"description": "Indent-based CSS syntax for PostCSS",
"devDependencies": {
"ava": "0.16.0",
"babel-cli": "6.16.0",
"babel-core": "6.17.0",
"babel-eslint": "7.0.0",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-precompile-charcodes": "1.0.0",
"babel-preset-es2015": "6.16.0",
"babel-preset-stage-0": "6.16.0",
"eslint": "3.7.1",
"eslint-config-postcss": "2.0.2",
"lint-staged": "3.0.3",
"postcss-parser-tests": "5.0.10",
"pre-commit": "1.1.3"
},
"directories": {},
"dist": {
"shasum": "ac34237563327c6ff897b64742bf6aec190ad39e",
"tarball": "https://registry.npmjs.org/sugarss/-/sugarss-0.2.0.tgz"
},
"gitHead": "ded261e3d6cbb2ba779f8152efc9cfd69990c34f",
"homepage": "https://github.com/postcss/sugarss#readme",
"keywords": [
"css",
"indent",
"parser",
"postcss",
"postcss-syntax",
"syntax"
],
"license": "MIT",
"lint-staged": {
"*.es6": "eslint",
"test/*.js": "eslint"
},
"maintainers": [
{
"name": "ai",
"email": "andrey@sitnik.ru"
}
],
"name": "sugarss",
"optionalDependencies": {},
"pre-commit": [
"lint-staged"
],
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/postcss/sugarss.git"
},
"scripts": {
"build": "npm run clean && babel -s inline -d ./ *.es6",
"clean": "rm *.js || echo 'Already cleaned'",
"lint": "eslint *.es6 test/*.js",
"lint-staged": "lint-staged",
"prepublish": "npm run build",
"test": "npm run build && ava && npm run lint"
},
"version": "0.2.0"
}

39
node_modules/sugarss/parse.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
'use strict';
exports.__esModule = true;
exports.default = parse;
var _input = require('postcss/lib/input');
var _input2 = _interopRequireDefault(_input);
var _preprocess = require('./preprocess');
var _preprocess2 = _interopRequireDefault(_preprocess);
var _tokenize = require('./tokenize');
var _tokenize2 = _interopRequireDefault(_tokenize);
var _parser = require('./parser');
var _parser2 = _interopRequireDefault(_parser);
var _liner = require('./liner');
var _liner2 = _interopRequireDefault(_liner);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function parse(source, opts) {
var input = new _input2.default(source, opts);
var parser = new _parser2.default(input);
parser.tokens = (0, _tokenize2.default)(input);
parser.parts = (0, _preprocess2.default)(input, (0, _liner2.default)(parser.tokens));
parser.loop();
return parser.root;
}
module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmVzNiJdLCJuYW1lcyI6WyJwYXJzZSIsInNvdXJjZSIsIm9wdHMiLCJpbnB1dCIsInBhcnNlciIsInRva2VucyIsInBhcnRzIiwibG9vcCIsInJvb3QiXSwibWFwcGluZ3MiOiI7OztrQkFPd0JBLEs7O0FBUHhCOzs7O0FBRUE7Ozs7QUFDQTs7OztBQUNBOzs7O0FBQ0E7Ozs7OztBQUVlLFNBQVNBLEtBQVQsQ0FBZUMsTUFBZixFQUF1QkMsSUFBdkIsRUFBNkI7QUFDeEMsUUFBSUMsUUFBUSxvQkFBVUYsTUFBVixFQUFrQkMsSUFBbEIsQ0FBWjs7QUFFQSxRQUFJRSxTQUFTLHFCQUFXRCxLQUFYLENBQWI7QUFDQUMsV0FBT0MsTUFBUCxHQUFnQix3QkFBVUYsS0FBVixDQUFoQjtBQUNBQyxXQUFPRSxLQUFQLEdBQWdCLDBCQUFXSCxLQUFYLEVBQWtCLHFCQUFNQyxPQUFPQyxNQUFiLENBQWxCLENBQWhCO0FBQ0FELFdBQU9HLElBQVA7O0FBRUEsV0FBT0gsT0FBT0ksSUFBZDtBQUNIIiwiZmlsZSI6InBhcnNlLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IElucHV0IGZyb20gJ3Bvc3Rjc3MvbGliL2lucHV0JztcblxuaW1wb3J0IHByZXByb2Nlc3MgZnJvbSAnLi9wcmVwcm9jZXNzJztcbmltcG9ydCB0b2tlbml6ZXIgIGZyb20gJy4vdG9rZW5pemUnO1xuaW1wb3J0IFBhcnNlciAgICAgZnJvbSAnLi9wYXJzZXInO1xuaW1wb3J0IGxpbmVyICAgICAgZnJvbSAnLi9saW5lcic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHBhcnNlKHNvdXJjZSwgb3B0cykge1xuICAgIGxldCBpbnB1dCA9IG5ldyBJbnB1dChzb3VyY2UsIG9wdHMpO1xuXG4gICAgbGV0IHBhcnNlciA9IG5ldyBQYXJzZXIoaW5wdXQpO1xuICAgIHBhcnNlci50b2tlbnMgPSB0b2tlbml6ZXIoaW5wdXQpO1xuICAgIHBhcnNlci5wYXJ0cyAgPSBwcmVwcm9jZXNzKGlucHV0LCBsaW5lcihwYXJzZXIudG9rZW5zKSk7XG4gICAgcGFyc2VyLmxvb3AoKTtcblxuICAgIHJldHVybiBwYXJzZXIucm9vdDtcbn1cbiJdfQ==

438
node_modules/sugarss/parser.js generated vendored Normal file

File diff suppressed because one or more lines are too long

121
node_modules/sugarss/preprocess.js generated vendored Normal file

File diff suppressed because one or more lines are too long

124
node_modules/sugarss/stringifier.js generated vendored Normal file

File diff suppressed because one or more lines are too long

17
node_modules/sugarss/stringify.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
'use strict';
exports.__esModule = true;
exports.default = stringify;
var _stringifier = require('./stringifier');
var _stringifier2 = _interopRequireDefault(_stringifier);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function stringify(node, builder) {
var str = new _stringifier2.default(builder);
str.stringify(node);
}
module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmeS5lczYiXSwibmFtZXMiOlsic3RyaW5naWZ5Iiwibm9kZSIsImJ1aWxkZXIiLCJzdHIiXSwibWFwcGluZ3MiOiI7OztrQkFFd0JBLFM7O0FBRnhCOzs7Ozs7QUFFZSxTQUFTQSxTQUFULENBQW1CQyxJQUFuQixFQUF5QkMsT0FBekIsRUFBa0M7QUFDN0MsUUFBSUMsTUFBTSwwQkFBZ0JELE9BQWhCLENBQVY7QUFDQUMsUUFBSUgsU0FBSixDQUFjQyxJQUFkO0FBQ0giLCJmaWxlIjoic3RyaW5naWZ5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFN0cmluZ2lmaWVyIGZyb20gJy4vc3RyaW5naWZpZXInO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBzdHJpbmdpZnkobm9kZSwgYnVpbGRlcikge1xuICAgIGxldCBzdHIgPSBuZXcgU3RyaW5naWZpZXIoYnVpbGRlcik7XG4gICAgc3RyLnN0cmluZ2lmeShub2RlKTtcbn1cbiJdfQ==

287
node_modules/sugarss/tokenize.js generated vendored Normal file

File diff suppressed because one or more lines are too long