Skip to content

Commit

Permalink
Add .gitattributes (#203)
Browse files Browse the repository at this point in the history
* Add .gitattributes

This makes it easier for Windows users to contribute.

See https://eslint.org/docs/rules/linebreak-style#using-this-rule-with-version-control-systems

* Normalize line endings in parser-postcss.js
  • Loading branch information
tansongyang authored and CompuIves committed Sep 19, 2017
1 parent 3f3b505 commit 49ac4c0
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 108 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.js text eol=lf
216 changes: 108 additions & 108 deletions static/js/prettier/parser-postcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -11567,24 +11567,24 @@ function Container(opts) {
this.nodes.forEach(function (node) {
node.parent = _this; // eslint-disable-line no-param-reassign
});
} /**
* A node that contains other nodes and support traversing over them
} /**
* A node that contains other nodes and support traversing over them
*/

Container.prototype = Object.create(_Node2.default.prototype);
Container.constructor = _Node2.default;

/**
* Iterate over descendant nodes of the node
*
* @param {RegExp|string} filter - Optional. Only nodes with node.type that
* satisfies the filter will be traversed over
* @param {function} cb - callback to call on each node. Takes theese params:
* node - the node being processed, i - it's index, nodes - the array
* of all nodes
* If false is returned, the iteration breaks
*
* @return (boolean) false, if the iteration was broken
/**
* Iterate over descendant nodes of the node
*
* @param {RegExp|string} filter - Optional. Only nodes with node.type that
* satisfies the filter will be traversed over
* @param {function} cb - callback to call on each node. Takes theese params:
* node - the node being processed, i - it's index, nodes - the array
* of all nodes
* If false is returned, the iteration breaks
*
* @return (boolean) false, if the iteration was broken
*/
Container.prototype.walk = function walk(filter, cb) {
var hasFilter = typeof filter === 'string' || filter instanceof RegExp;
Expand All @@ -11604,15 +11604,15 @@ Container.prototype.walk = function walk(filter, cb) {
return true;
};

/**
* Iterate over immediate children of the node
*
* @param {function} cb - callback to call on each node. Takes theese params:
* node - the node being processed, i - it's index, nodes - the array
* of all nodes
* If false is returned, the iteration breaks
*
* @return (boolean) false, if the iteration was broken
/**
* Iterate over immediate children of the node
*
* @param {function} cb - callback to call on each node. Takes theese params:
* node - the node being processed, i - it's index, nodes - the array
* of all nodes
* If false is returned, the iteration breaks
*
* @return (boolean) false, if the iteration was broken
*/
Container.prototype.each = function each() {
var cb = arguments.length <= 0 || arguments[0] === undefined ? function () {} : arguments[0];
Expand All @@ -11638,8 +11638,8 @@ exports.default = Container;
Object.defineProperty(exports, "__esModule", {
value: true
});
/**
* A very generic node. Pretty much any element of a media query
/**
* A very generic node. Pretty much any element of a media query
*/

function Node(opts) {
Expand Down Expand Up @@ -15198,55 +15198,55 @@ module.exports = unique;
/* 85 */
/***/ (function(module, exports) {

var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
// This works if the window reference is available
if(typeof window === "object")
g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
var g;

// This works in non-strict mode
g = (function() {
return this;
})();

try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
// This works if the window reference is available
if(typeof window === "object")
g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;


/***/ }),
/* 86 */
/***/ (function(module, exports) {

module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
if(!module.children) module.children = [];
Object.defineProperty(module, "loaded", {
enumerable: true,
get: function() {
return module.l;
}
});
Object.defineProperty(module, "id", {
enumerable: true,
get: function() {
return module.i;
}
});
module.webpackPolyfill = 1;
}
return module;
};
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
if(!module.children) module.children = [];
Object.defineProperty(module, "loaded", {
enumerable: true,
get: function() {
return module.l;
}
});
Object.defineProperty(module, "id", {
enumerable: true,
get: function() {
return module.i;
}
});
module.webpackPolyfill = 1;
}
return module;
};


/***/ }),
Expand Down Expand Up @@ -15293,25 +15293,25 @@ var _parsers = __webpack_require__(125);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
* Parses a media query list into an array of nodes. A typical node signature:
* {string} node.type -- one of: 'media-query', 'media-type', 'keyword',
* 'media-feature-expression', 'media-feature', 'colon', 'value'
* {string} node.value -- the contents of a particular element, trimmed
* e.g.: `screen`, `max-width`, `1024px`
* {string} node.after -- whitespaces that follow the element
* {string} node.before -- whitespaces that precede the element
* {string} node.sourceIndex -- the index of the element in a source media
* query list, 0-based
* {object} node.parent -- a link to the parent node (a container)
*
* Some nodes (media queries, media feature expressions) contain other nodes.
* They additionally have:
* {array} node.nodes -- an array of nodes of the type described here
* {funciton} node.each -- traverses direct children of the node, calling
* a callback for each one
* {funciton} node.walk -- traverses ALL descendants of the node, calling
* a callback for each one
/**
* Parses a media query list into an array of nodes. A typical node signature:
* {string} node.type -- one of: 'media-query', 'media-type', 'keyword',
* 'media-feature-expression', 'media-feature', 'colon', 'value'
* {string} node.value -- the contents of a particular element, trimmed
* e.g.: `screen`, `max-width`, `1024px`
* {string} node.after -- whitespaces that follow the element
* {string} node.before -- whitespaces that precede the element
* {string} node.sourceIndex -- the index of the element in a source media
* query list, 0-based
* {object} node.parent -- a link to the parent node (a container)
*
* Some nodes (media queries, media feature expressions) contain other nodes.
* They additionally have:
* {array} node.nodes -- an array of nodes of the type described here
* {funciton} node.each -- traverses direct children of the node, calling
* a callback for each one
* {funciton} node.walk -- traverses ALL descendants of the node, calling
* a callback for each one
*/

function parseMedia(value) {
Expand Down Expand Up @@ -18215,14 +18215,14 @@ var _Container2 = _interopRequireDefault(_Container);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
* Parses a media feature expression, e.g. `max-width: 10px`, `(color)`
*
* @param {string} string - the source expression string, can be inside parens
* @param {Number} index - the index of `string` in the overall input
*
* @return {Array} an array of Nodes, the first element being a media feature,
* the secont - its value (may be missing)
/**
* Parses a media feature expression, e.g. `max-width: 10px`, `(color)`
*
* @param {string} string - the source expression string, can be inside parens
* @param {Number} index - the index of `string` in the overall input
*
* @return {Array} an array of Nodes, the first element being a media feature,
* the secont - its value (may be missing)
*/

function parseMediaFeature(string) {
Expand Down Expand Up @@ -18321,13 +18321,13 @@ function parseMediaFeature(string) {
return result;
}

/**
* Parses a media query, e.g. `screen and (color)`, `only tv`
*
* @param {string} string - the source media query string
* @param {Number} index - the index of `string` in the overall input
*
* @return {Array} an array of Nodes and Containers
/**
* Parses a media query, e.g. `screen and (color)`, `only tv`
*
* @param {string} string - the source media query string
* @param {Number} index - the index of `string` in the overall input
*
* @return {Array} an array of Nodes and Containers
*/

function parseMediaQuery(string) {
Expand Down Expand Up @@ -18483,13 +18483,13 @@ function parseMediaQuery(string) {
return result;
}

/**
* Parses a media query list. Takes a possible `url()` at the start into
* account, and divides the list into media queries that are parsed separately
*
* @param {string} string - the source media query list string
*
* @return {Array} an array of Nodes/Containers
/**
* Parses a media query list. Takes a possible `url()` at the start into
* account, and divides the list into media queries that are parsed separately
*
* @param {string} string - the source media query list string
*
* @return {Array} an array of Nodes/Containers
*/

function parseMediaList(string) {
Expand Down

0 comments on commit 49ac4c0

Please sign in to comment.