Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rtlcss

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtlcss - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

34

bin/rtlcss.js

@@ -35,3 +35,3 @@ #!/usr/bin/env node

console.log('');
var options =
var options =
[

@@ -55,3 +55,3 @@ 'Option ' , 'Description ',

printInfo('RTLCSS version: ' + require('../package.json').version);
printInfo('Report issues to: https://github.com/MohammadYounes/rtlcss/issues');
printInfo('Report issues to: https://github.com/MohammadYounes/rtlcss/issues');
}

@@ -142,3 +142,3 @@

output = input;
}
}
}

@@ -166,3 +166,3 @@

}
if (output) {

@@ -177,3 +177,3 @@ var savePath = outputName;

fs.writeFile(savePath + '.map', result.map, 'utf8', function(err){ err && printError(err); } );
}
}
} else {

@@ -203,3 +203,3 @@ sys.print(result.css);

//process only *.css
if (/\.(css)$/.test(file)) {
if (/\.(css)$/.test(file)) {
//compute output directory

@@ -219,3 +219,10 @@ var relativePath = path.relative(input,file).split(path.sep);

//read and process the file.
fs.readFile(file, 'utf8',function(e,data){ processCSSFile(e,data,rtlFile);});
fs.readFile(file, 'utf8',function(e,data){
try{
processCSSFile(e,data,rtlFile);
}catch(e){
printError('rtlcss: error processing file',file);
printError(e);
}
});
}

@@ -236,5 +243,12 @@ next();

}else{
fs.readFile(input, 'utf8', processCSSFile);
fs.readFile(input, 'utf8', function(e,data){
try{
processCSSFile(e,data);
}catch(e){
printError('rtlcss: error processing file',input);
printError(e);
}
});
}
});
});
}else{

@@ -261,2 +275,2 @@ walk(input, function(error){

});
}
}

@@ -11,3 +11,3 @@ RTLCSS CLI

npm install -g rtlcss
## Command line usage

@@ -19,3 +19,3 @@ ```

### Example

@@ -76,3 +76,3 @@ Convert input.css to output.rtl.css

### STDIN
### STDIN
Read input from `stdin`

@@ -86,3 +86,3 @@ ```

### Directory
Used to indicate input is a directory and not a file.
Used to indicate source/destination are directories - source directory will be processed recursively.
```

@@ -98,2 +98,2 @@ $ rtlcss -d

$ rtlcss --silent
```
```

@@ -88,2 +88,2 @@ function main(options, rules, declarations, properties) {

}
module.exports.configure = main;
module.exports.configure = main;

@@ -73,2 +73,2 @@ function main(configuration) {

}
module.exports.configure = main;
module.exports.configure = main;

@@ -11,2 +11,2 @@ function main(configuration) {

}
module.exports.configure = main;
module.exports.configure = main;

@@ -269,2 +269,2 @@ function main(configuration) {

}
module.exports.configure = main;
module.exports.configure = main;

@@ -111,3 +111,3 @@ (function () {

* Creates a new RTLCSS instance.
*
*
* @options {Object} An object containing RTLCSS settings.

@@ -127,3 +127,3 @@ * @rules {Object} An object containing RTLCSS rule level processing directives.

* Creates a new RTLCSS instance, process the input and return its result.
*
*
* @css {String} A string containing input CSS.

@@ -142,4 +142,4 @@ * @options {Object} An object containing RTLCSS settings.

/**
* Creates a new instance of RTLCSS using the passed configuration object
*
* Creates a new instance of RTLCSS using the passed configuration object
*
* @config {Object} An object containing RTLCSS options, rules, declarations and properties processing directives.

@@ -156,2 +156,2 @@ *

}).call(this);
}).call(this);

@@ -28,2 +28,2 @@ function main(configuration) {

}
module.exports.configure = main;
module.exports.configure = main;

@@ -122,2 +122,1 @@ function main(configuration) {

module.exports.configure = main;
{
"author": "Mohammad Younes",
"name": "rtlcss",
"version": "1.4.0",
"version": "1.4.1",
"description": "Framework for transforming cascading style sheets (CSS) from left-to-right (LTR) to right-to-left (RTL)",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/MohammadYounes/rtlcss/issues?state=open",

@@ -109,3 +109,3 @@ [![GitHub version](https://badge.fury.io/gh/MohammadYounes%2Frtlcss.svg)](http://badge.fury.io/gh/MohammadYounes%2Frtlcss)

| `/*rtl:ignore*/` | Ignores processing of this rule.
| `/*rtl:rename*/` | Forces selector renaming by swapping ***left***, ***right***, ***ltr***, ***rtl***, ***west*** and ***east***.
| `/*rtl:rename*/` | Forces selector renaming by applying [String Map](#stringmap-array).

@@ -200,3 +200,3 @@ **Example**

|**`swapWestEastInUrl`** | `true` | Swaps ***west*** and ***east*** in URLs.
|**`autoRename`** | `true` | Applies to CSS rules containing no directional properties, it will update the selector by swapping ***left***, ***right***, ***ltr***, ***rtl***, ***west*** and ***east***.([more info](https://github.com/MohammadYounes/rtlcss/wiki/Why-Auto-Rename%3F))
|**`autoRename`** | `true` | Applies to CSS rules containing no directional properties, it will update the selector by applying [String Map](#stringmap-array).(See [Why Auto-Rename?](https://github.com/MohammadYounes/rtlcss/wiki/Why-Auto-Rename%3F))
|**`greedy`** | `false` | A `false` value forces selector renaming and url updates to respect word boundaries, for example: `.ultra { ...}` will not be changed to `.urtla {...}`

@@ -218,3 +218,3 @@ |**`stringMap`** | see [String Map](#stringmap-array) | Applies to string replacement in renamed selectors and updated URLs

'scope': options.swapLeftRightInUrl ? '*' : 'selector',
'ignoreCase': false
'ignoreCase': false
}

@@ -239,3 +239,3 @@ },

}
}
}
]

@@ -261,3 +261,3 @@ ```

**Example**
```javascript

@@ -277,3 +277,3 @@

"replace" : ["next", "Next", "NEXT"],
options : {"ignoreCase":false}
options : {"ignoreCase":false}
}

@@ -371,2 +371,5 @@

## Release Notes
* **v1.4.1** [24 Oct. 2014]
* CLI: Print processing errors.
* **v1.4.0** [10 Oct. 2014]

@@ -377,7 +380,7 @@ * CLI: Support processing a directory. see [CLI documentation](https://github.com/MohammadYounes/rtlcss/blob/master/CLI.md#directory)

* Update README.md (typos).
* **v1.3.0** [28 Sep. 2014]
* New feature - String Maps. Add your own set of swappable strings, for example (prev/next).
* Preserves lowercase, UPPERCASE and Capitalization when swapping ***left***, ***right***, ***ltr***, ***rtl***, ***west*** and ***east***.
* **v1.2.0** [26 Sep. 2014]

@@ -384,0 +387,0 @@ * Support !important comments for directives (enables flipping minified stylesheets).

@@ -1025,2 +1025,2 @@ var assert = require("assert");

}
})();
})();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc