Removed node stuff
This commit is contained in:
parent
45adfecb30
commit
26ee03976a
9 changed files with 0 additions and 891 deletions
1
node_modules/.bin/cssbeautify
generated
vendored
1
node_modules/.bin/cssbeautify
generated
vendored
|
@ -1 +0,0 @@
|
|||
../cssbeautify/bin/cssbeautify
|
6
node_modules/cssbeautify/.npmignore
generated
vendored
6
node_modules/cssbeautify/.npmignore
generated
vendored
|
@ -1,6 +0,0 @@
|
|||
.git
|
||||
index.html
|
||||
test/
|
||||
assets/
|
||||
images/
|
||||
/node_modules/
|
24
node_modules/cssbeautify/CONTRIBUTING.md
generated
vendored
24
node_modules/cssbeautify/CONTRIBUTING.md
generated
vendored
|
@ -1,24 +0,0 @@
|
|||
# Contribution Guide
|
||||
|
||||
This page describes how to contribute changes to CSS Beautify.
|
||||
|
||||
Please do **not** create a pull request without reading this guide first. Failure to do so may result in the **rejection** of the pull request.
|
||||
|
||||
## CLA
|
||||
|
||||
Before we can accept any contributions, you need to sign [Contributor License Agreement](http://en.wikipedia.org/wiki/Contributor_License_Agreement). You can do that using Sencha Labs [online CLA](http://www.sencha.com/cla).
|
||||
|
||||
## Coding Policies
|
||||
|
||||
Make sure that your code passes [JSLint](http://jslint.com) checks.
|
||||
|
||||
Make sure your patch does break existing tests (open <code>test/index.html</code> in a web browser).
|
||||
|
||||
If you add a new feature, create a new test associated with that. Feature or enhancement pull request without a corresponding test will **not** be merged.
|
||||
|
||||
## Pull Request
|
||||
|
||||
For the actual contribution, please use [Github pull request](http://help.github.com/pull-requests/) workflow.
|
||||
|
||||
Please do not create a pull request for multiple unrelated commits. It is strongly recommended to create a topic branch and make the commits as atomic as possible for the merge. This makes it easy to review all the changes.
|
||||
|
79
node_modules/cssbeautify/README.md
generated
vendored
79
node_modules/cssbeautify/README.md
generated
vendored
|
@ -1,79 +0,0 @@
|
|||
# CSS Beautify #
|
||||
|
||||
CSS Beautify is a JavaScript implementation of reindenter and reformatter for styles written in [CSS](http://www.w3.org/Style/CSS/).
|
||||
|
||||
Given the following style:
|
||||
|
||||
```css
|
||||
menu{color:red} navigation{background-color:#333}
|
||||
```
|
||||
|
||||
CSS Beautify will produce:
|
||||
|
||||
```css
|
||||
menu {
|
||||
color: red
|
||||
}
|
||||
|
||||
navigation {
|
||||
background-color: #333
|
||||
}
|
||||
```
|
||||
|
||||
Try it online at [cssbeautify.com](http://cssbeautify.com). For the
|
||||
command-line use, install Node.js [cssbeautify](https://npmjs.org/package/cssbeautify) package.
|
||||
|
||||
For more examples, see also its [test suite](http://cssbeautify.com/test/).
|
||||
|
||||
## Using cssbeautify() function ##
|
||||
|
||||
Since CSS Beautify is written in pure JavaScript, it can run anywhere that JavaScript can run.
|
||||
|
||||
The API is very simple:
|
||||
|
||||
```javascript
|
||||
var result = cssbeautify(style, options);
|
||||
```
|
||||
|
||||
**options** is an optional object to adjust the formatting. Known options so far are:
|
||||
|
||||
* <code>indent</code> is a string used for the indentation of the declaration (default is 4 spaces)
|
||||
* <code>openbrace</code> defines the placement of open curly brace, either *end-of-line* (default) or *separate-line*.
|
||||
* <code>autosemicolon</code> always inserts a semicolon after the last ruleset (default is *false*)
|
||||
|
||||
Example call:
|
||||
|
||||
```javascript
|
||||
var beautified = cssbeautify('menu{opacity:.7}', {
|
||||
indent: ' ',
|
||||
openbrace: 'separate-line',
|
||||
autosemicolon: true
|
||||
});
|
||||
```
|
||||
|
||||
## Contributing ##
|
||||
|
||||
Contributions are welcomed! Please read the [Contribution Guide](https://github.com/senchalabs/cssbeautify/blob/master/CONTRIBUTING.md) for more info.
|
||||
|
||||
## License ##
|
||||
|
||||
Copyright (C) 2012 Sencha Inc.
|
||||
Copyright (C) 2011 Sencha Inc.
|
||||
|
||||
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.
|
83
node_modules/cssbeautify/bin/cssbeautify
generated
vendored
83
node_modules/cssbeautify/bin/cssbeautify
generated
vendored
|
@ -1,83 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
/*
|
||||
Copyright (C) 2012 Sencha Inc.
|
||||
|
||||
Author: Ariya Hidayat.
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
/*jslint sloppy:true node:true */
|
||||
|
||||
var fs, cssbeautify, fname, content, options, style;
|
||||
|
||||
fs = require('fs');
|
||||
cssbeautify = require('cssbeautify');
|
||||
|
||||
function showUsage() {
|
||||
console.log('Usage:');
|
||||
console.log(' cssbeautify [options] style.css');
|
||||
console.log();
|
||||
console.log('Available options:');
|
||||
console.log();
|
||||
console.log(' -v, --version Shows program version');
|
||||
console.log();
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (process.argv.length <= 2) {
|
||||
showUsage();
|
||||
}
|
||||
|
||||
options = {};
|
||||
|
||||
process.argv.splice(2).forEach(function (entry) {
|
||||
|
||||
if (entry === '-h' || entry === '--help') {
|
||||
showUsage();
|
||||
} else if (entry === '-v' || entry === '--version') {
|
||||
// Keep in sync with package.json
|
||||
console.log('CSS Beautify version 0.3.1');
|
||||
console.log();
|
||||
process.exit(0);
|
||||
} else if (entry.slice(0, 2) === '--') {
|
||||
console.log('Error: unknown option ' + entry + '.');
|
||||
process.exit(1);
|
||||
} else if (typeof fname === 'string') {
|
||||
console.log('Error: more than one input file.');
|
||||
process.exit(1);
|
||||
} else {
|
||||
fname = entry;
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof fname !== 'string') {
|
||||
console.log('Error: no input file.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
content = fs.readFileSync(fname, 'utf-8');
|
||||
style = cssbeautify(content);
|
||||
console.log(style);
|
||||
} catch (e) {
|
||||
console.log('Error: ' + e.message);
|
||||
process.exit(1);
|
||||
}
|
||||
|
469
node_modules/cssbeautify/cssbeautify.js
generated
vendored
469
node_modules/cssbeautify/cssbeautify.js
generated
vendored
|
@ -1,469 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2013 Sencha Inc.
|
||||
Copyright (C) 2012 Sencha Inc.
|
||||
Copyright (C) 2011 Sencha Inc.
|
||||
|
||||
Author: Ariya Hidayat.
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
/*jslint continue: true, indent: 4 */
|
||||
/*global exports:true, module:true, window:true */
|
||||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
function cssbeautify(style, opt) {
|
||||
|
||||
var options, index = 0, length = style.length, blocks, formatted = '',
|
||||
ch, ch2, str, state, State, depth, quote, comment,
|
||||
openbracesuffix = true,
|
||||
autosemicolon = false,
|
||||
trimRight;
|
||||
|
||||
options = arguments.length > 1 ? opt : {};
|
||||
if (typeof options.indent === 'undefined') {
|
||||
options.indent = ' ';
|
||||
}
|
||||
if (typeof options.openbrace === 'string') {
|
||||
openbracesuffix = (options.openbrace === 'end-of-line');
|
||||
}
|
||||
if (typeof options.autosemicolon === 'boolean') {
|
||||
autosemicolon = options.autosemicolon;
|
||||
}
|
||||
|
||||
function isWhitespace(c) {
|
||||
return (c === ' ') || (c === '\n') || (c === '\t') || (c === '\r') || (c === '\f');
|
||||
}
|
||||
|
||||
function isQuote(c) {
|
||||
return (c === '\'') || (c === '"');
|
||||
}
|
||||
|
||||
// FIXME: handle Unicode characters
|
||||
function isName(c) {
|
||||
return (ch >= 'a' && ch <= 'z') ||
|
||||
(ch >= 'A' && ch <= 'Z') ||
|
||||
(ch >= '0' && ch <= '9') ||
|
||||
'-_*.:#[]'.indexOf(c) >= 0;
|
||||
}
|
||||
|
||||
function appendIndent() {
|
||||
var i;
|
||||
for (i = depth; i > 0; i -= 1) {
|
||||
formatted += options.indent;
|
||||
}
|
||||
}
|
||||
|
||||
function openBlock() {
|
||||
formatted = trimRight(formatted);
|
||||
if (openbracesuffix) {
|
||||
formatted += ' {';
|
||||
} else {
|
||||
formatted += '\n';
|
||||
appendIndent();
|
||||
formatted += '{';
|
||||
}
|
||||
if (ch2 !== '\n') {
|
||||
formatted += '\n';
|
||||
}
|
||||
depth += 1;
|
||||
}
|
||||
|
||||
function closeBlock() {
|
||||
var last;
|
||||
depth -= 1;
|
||||
formatted = trimRight(formatted);
|
||||
|
||||
if (formatted.length > 0 && autosemicolon) {
|
||||
last = formatted.charAt(formatted.length - 1);
|
||||
if (last !== ';' && last !== '{') {
|
||||
formatted += ';';
|
||||
}
|
||||
}
|
||||
|
||||
formatted += '\n';
|
||||
appendIndent();
|
||||
formatted += '}';
|
||||
blocks.push(formatted);
|
||||
formatted = '';
|
||||
}
|
||||
|
||||
if (String.prototype.trimRight) {
|
||||
trimRight = function (s) {
|
||||
return s.trimRight();
|
||||
};
|
||||
} else {
|
||||
// old Internet Explorer
|
||||
trimRight = function (s) {
|
||||
return s.replace(/\s+$/, '');
|
||||
};
|
||||
}
|
||||
|
||||
State = {
|
||||
Start: 0,
|
||||
AtRule: 1,
|
||||
Block: 2,
|
||||
Selector: 3,
|
||||
Ruleset: 4,
|
||||
Property: 5,
|
||||
Separator: 6,
|
||||
Expression: 7,
|
||||
URL: 8
|
||||
};
|
||||
|
||||
depth = 0;
|
||||
state = State.Start;
|
||||
comment = false;
|
||||
blocks = [];
|
||||
|
||||
// We want to deal with LF (\n) only
|
||||
style = style.replace(/\r\n/g, '\n');
|
||||
|
||||
while (index < length) {
|
||||
ch = style.charAt(index);
|
||||
ch2 = style.charAt(index + 1);
|
||||
index += 1;
|
||||
|
||||
// Inside a string literal?
|
||||
if (isQuote(quote)) {
|
||||
formatted += ch;
|
||||
if (ch === quote) {
|
||||
quote = null;
|
||||
}
|
||||
if (ch === '\\' && ch2 === quote) {
|
||||
// Don't treat escaped character as the closing quote
|
||||
formatted += ch2;
|
||||
index += 1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Starting a string literal?
|
||||
if (isQuote(ch)) {
|
||||
formatted += ch;
|
||||
quote = ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Comment
|
||||
if (comment) {
|
||||
formatted += ch;
|
||||
if (ch === '*' && ch2 === '/') {
|
||||
comment = false;
|
||||
formatted += ch2;
|
||||
index += 1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (ch === '/' && ch2 === '*') {
|
||||
comment = true;
|
||||
formatted += ch;
|
||||
formatted += ch2;
|
||||
index += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state === State.Start) {
|
||||
|
||||
if (blocks.length === 0) {
|
||||
if (isWhitespace(ch) && formatted.length === 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Copy white spaces and control characters
|
||||
if (ch <= ' ' || ch.charCodeAt(0) >= 128) {
|
||||
state = State.Start;
|
||||
formatted += ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Selector or at-rule
|
||||
if (isName(ch) || (ch === '@')) {
|
||||
|
||||
// Clear trailing whitespaces and linefeeds.
|
||||
str = trimRight(formatted);
|
||||
|
||||
if (str.length === 0) {
|
||||
// If we have empty string after removing all the trailing
|
||||
// spaces, that means we are right after a block.
|
||||
// Ensure a blank line as the separator.
|
||||
if (blocks.length > 0) {
|
||||
formatted = '\n\n';
|
||||
}
|
||||
} else {
|
||||
// After finishing a ruleset or directive statement,
|
||||
// there should be one blank line.
|
||||
if (str.charAt(str.length - 1) === '}' ||
|
||||
str.charAt(str.length - 1) === ';') {
|
||||
|
||||
formatted = str + '\n\n';
|
||||
} else {
|
||||
// After block comment, keep all the linefeeds but
|
||||
// start from the first column (remove whitespaces prefix).
|
||||
while (true) {
|
||||
ch2 = formatted.charAt(formatted.length - 1);
|
||||
if (ch2 !== ' ' && ch2.charCodeAt(0) !== 9) {
|
||||
break;
|
||||
}
|
||||
formatted = formatted.substr(0, formatted.length - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
formatted += ch;
|
||||
state = (ch === '@') ? State.AtRule : State.Selector;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (state === State.AtRule) {
|
||||
|
||||
// ';' terminates a statement.
|
||||
if (ch === ';') {
|
||||
formatted += ch;
|
||||
state = State.Start;
|
||||
continue;
|
||||
}
|
||||
|
||||
// '{' starts a block
|
||||
if (ch === '{') {
|
||||
str = trimRight(formatted);
|
||||
openBlock();
|
||||
state = (str === '@font-face') ? State.Ruleset : State.Block;
|
||||
continue;
|
||||
}
|
||||
|
||||
formatted += ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state === State.Block) {
|
||||
|
||||
// Selector
|
||||
if (isName(ch)) {
|
||||
|
||||
// Clear trailing whitespaces and linefeeds.
|
||||
str = trimRight(formatted);
|
||||
|
||||
if (str.length === 0) {
|
||||
// If we have empty string after removing all the trailing
|
||||
// spaces, that means we are right after a block.
|
||||
// Ensure a blank line as the separator.
|
||||
if (blocks.length > 0) {
|
||||
formatted = '\n\n';
|
||||
}
|
||||
} else {
|
||||
// Insert blank line if necessary.
|
||||
if (str.charAt(str.length - 1) === '}') {
|
||||
formatted = str + '\n\n';
|
||||
} else {
|
||||
// After block comment, keep all the linefeeds but
|
||||
// start from the first column (remove whitespaces prefix).
|
||||
while (true) {
|
||||
ch2 = formatted.charAt(formatted.length - 1);
|
||||
if (ch2 !== ' ' && ch2.charCodeAt(0) !== 9) {
|
||||
break;
|
||||
}
|
||||
formatted = formatted.substr(0, formatted.length - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
appendIndent();
|
||||
formatted += ch;
|
||||
state = State.Selector;
|
||||
continue;
|
||||
}
|
||||
|
||||
// '}' resets the state.
|
||||
if (ch === '}') {
|
||||
closeBlock();
|
||||
state = State.Start;
|
||||
continue;
|
||||
}
|
||||
|
||||
formatted += ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state === State.Selector) {
|
||||
|
||||
// '{' starts the ruleset.
|
||||
if (ch === '{') {
|
||||
openBlock();
|
||||
state = State.Ruleset;
|
||||
continue;
|
||||
}
|
||||
|
||||
// '}' resets the state.
|
||||
if (ch === '}') {
|
||||
closeBlock();
|
||||
state = State.Start;
|
||||
continue;
|
||||
}
|
||||
|
||||
formatted += ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state === State.Ruleset) {
|
||||
|
||||
// '}' finishes the ruleset.
|
||||
if (ch === '}') {
|
||||
closeBlock();
|
||||
state = State.Start;
|
||||
if (depth > 0) {
|
||||
state = State.Block;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Make sure there is no blank line or trailing spaces inbetween
|
||||
if (ch === '\n') {
|
||||
formatted = trimRight(formatted);
|
||||
formatted += '\n';
|
||||
continue;
|
||||
}
|
||||
|
||||
// property name
|
||||
if (!isWhitespace(ch)) {
|
||||
formatted = trimRight(formatted);
|
||||
formatted += '\n';
|
||||
appendIndent();
|
||||
formatted += ch;
|
||||
state = State.Property;
|
||||
continue;
|
||||
}
|
||||
formatted += ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state === State.Property) {
|
||||
|
||||
// ':' concludes the property.
|
||||
if (ch === ':') {
|
||||
formatted = trimRight(formatted);
|
||||
formatted += ': ';
|
||||
state = State.Expression;
|
||||
if (isWhitespace(ch2)) {
|
||||
state = State.Separator;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// '}' finishes the ruleset.
|
||||
if (ch === '}') {
|
||||
closeBlock();
|
||||
state = State.Start;
|
||||
if (depth > 0) {
|
||||
state = State.Block;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
formatted += ch;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state === State.Separator) {
|
||||
|
||||
// Non-whitespace starts the expression.
|
||||
if (!isWhitespace(ch)) {
|
||||
formatted += ch;
|
||||
state = State.Expression;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Anticipate string literal.
|
||||
if (isQuote(ch2)) {
|
||||
state = State.Expression;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state === State.Expression) {
|
||||
|
||||
// '}' finishes the ruleset.
|
||||
if (ch === '}') {
|
||||
closeBlock();
|
||||
state = State.Start;
|
||||
if (depth > 0) {
|
||||
state = State.Block;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// ';' completes the declaration.
|
||||
if (ch === ';') {
|
||||
formatted = trimRight(formatted);
|
||||
formatted += ';\n';
|
||||
state = State.Ruleset;
|
||||
continue;
|
||||
}
|
||||
|
||||
formatted += ch;
|
||||
|
||||
if (ch === '(') {
|
||||
if (formatted.charAt(formatted.length - 2) === 'l' &&
|
||||
formatted.charAt(formatted.length - 3) === 'r' &&
|
||||
formatted.charAt(formatted.length - 4) === 'u') {
|
||||
|
||||
// URL starts with '(' and closes with ')'.
|
||||
state = State.URL;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state === State.URL) {
|
||||
|
||||
|
||||
// ')' finishes the URL (only if it is not escaped).
|
||||
if (ch === ')' && formatted.charAt(formatted.length - 1 !== '\\')) {
|
||||
formatted += ch;
|
||||
state = State.Expression;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// The default action is to copy the character (to prevent
|
||||
// infinite loop).
|
||||
formatted += ch;
|
||||
}
|
||||
|
||||
formatted = blocks.join('') + formatted;
|
||||
|
||||
return formatted;
|
||||
}
|
||||
|
||||
if (typeof exports !== 'undefined') {
|
||||
// Node.js module.
|
||||
module.exports = exports = cssbeautify;
|
||||
} else if (typeof window === 'object') {
|
||||
// Browser loading.
|
||||
window.cssbeautify = cssbeautify;
|
||||
}
|
||||
|
||||
}());
|
8
node_modules/cssbeautify/cssbeautify.sublime-project
generated
vendored
8
node_modules/cssbeautify/cssbeautify.sublime-project
generated
vendored
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"folders":
|
||||
[
|
||||
{
|
||||
"path": "/Users/ariyahidayat/dev/sencha/cssbeautify"
|
||||
}
|
||||
]
|
||||
}
|
179
node_modules/cssbeautify/cssbeautify.sublime-workspace
generated
vendored
179
node_modules/cssbeautify/cssbeautify.sublime-workspace
generated
vendored
File diff suppressed because one or more lines are too long
42
node_modules/cssbeautify/package.json
generated
vendored
42
node_modules/cssbeautify/package.json
generated
vendored
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
"name": "cssbeautify",
|
||||
"description": "Reindent and reformat CSS.",
|
||||
"version": "0.3.1",
|
||||
"homepage": "http://cssbeautify.com",
|
||||
"author": {
|
||||
"name": "Ariya Hidayat",
|
||||
"email": "ariya@sencha.com"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/senchalabs/cssbeautify"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/senchalabs/cssbeautify/issues"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/senchalabs/cssbeautify/blob/master/README.md"
|
||||
}
|
||||
],
|
||||
"main": "cssbeautify.js",
|
||||
"bin": {
|
||||
"cssbeautify": "bin/cssbeautify"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test/runner.js"
|
||||
},
|
||||
"keywords": [
|
||||
"cssbeautify",
|
||||
"css",
|
||||
"formatter"
|
||||
],
|
||||
"readme": "# CSS Beautify #\n\nCSS Beautify is a JavaScript implementation of reindenter and reformatter for styles written in [CSS](http://www.w3.org/Style/CSS/).\n\nGiven the following style:\n\n```css\nmenu{color:red} navigation{background-color:#333}\n```\n\nCSS Beautify will produce:\n\n```css\nmenu {\n color: red\n}\n\nnavigation {\n background-color: #333\n}\n```\n\nTry it online at [cssbeautify.com](http://cssbeautify.com). For the\ncommand-line use, install Node.js [cssbeautify](https://npmjs.org/package/cssbeautify) package.\n\nFor more examples, see also its [test suite](http://cssbeautify.com/test/).\n\n## Using cssbeautify() function ##\n\nSince CSS Beautify is written in pure JavaScript, it can run anywhere that JavaScript can run.\n\nThe API is very simple:\n\n```javascript\nvar result = cssbeautify(style, options);\n```\n\n**options** is an optional object to adjust the formatting. Known options so far are:\n\n * <code>indent</code> is a string used for the indentation of the declaration (default is 4 spaces)\n * <code>openbrace</code> defines the placement of open curly brace, either *end-of-line* (default) or *separate-line*.\n * <code>autosemicolon</code> always inserts a semicolon after the last ruleset (default is *false*)\n\nExample call:\n\n```javascript\nvar beautified = cssbeautify('menu{opacity:.7}', {\n indent: ' ',\n openbrace: 'separate-line',\n autosemicolon: true\n});\n```\n\n## Contributing ##\n\nContributions are welcomed! Please read the [Contribution Guide](https://github.com/senchalabs/cssbeautify/blob/master/CONTRIBUTING.md) for more info.\n\n## License ##\n\nCopyright (C) 2012 Sencha Inc.\nCopyright (C) 2011 Sencha Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n",
|
||||
"readmeFilename": "README.md",
|
||||
"_id": "cssbeautify@0.3.1",
|
||||
"_from": "cssbeautify@"
|
||||
}
|
Reference in a new issue