@romainberger/css-diff
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -6,2 +6,6 @@ 'use strict'; | ||
module.exports = function (source, reversed) { | ||
try { | ||
source = JSON.parse(source); | ||
reversed = JSON.parse(reversed); | ||
} catch (e) {} | ||
var sourceAst = (0, _postcss.parse)(source); | ||
@@ -8,0 +12,0 @@ var reversedAst = (0, _postcss.parse)(reversed); |
{ | ||
"name": "@romainberger/css-diff", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Get the diff between two css", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -1,21 +0,9 @@ | ||
# NPM Module Boilerplate [![Build Status](https://img.shields.io/travis/romainberger/npm-module-boilerplate/master.svg?style=flat-square)](https://travis-ci.org/romainberger/npm-module-boilerplate) | ||
# CSS Diff [![Build Status](https://img.shields.io/travis/romainberger/css-diff/master.svg?style=flat-square)](https://travis-ci.org/romainberger/css-diff) | ||
Personal boilerplate for modules. | ||
Get the diff between two css. | ||
Includes: | ||
## Installation | ||
* [Babel](https://babeljs.io/) stage 0 | ||
* [Mocha](https://mochajs.org/), [Chai](http://chaijs.com/) for testing | ||
* [Flow](http://flowtype.org/) for static type checking | ||
* [Travis CI](https://travis-ci.com/) for continuous integration | ||
## New project initialization | ||
```shell | ||
$ git clone | ||
$ mv npm-module-boilerplate awesome-module | ||
$ cd awesome-module | ||
$ rm -rf .git | ||
$ git init | ||
$ npm install | ||
$ npm install @romainberger/css-diff | ||
``` | ||
@@ -25,12 +13,23 @@ | ||
Run tests: | ||
```js | ||
const cssDiff = require('@romainberger/css-diff') | ||
```shell | ||
$ npm test | ||
``` | ||
const cssA = ` | ||
body { | ||
background: white; | ||
color: red; | ||
} | ||
` | ||
Run flow | ||
const cssB = ` | ||
body { | ||
background: white; | ||
color: blue; | ||
} | ||
` | ||
```shell | ||
$ npm run flow | ||
const diff = cssDiff(cssA, cssB) | ||
// body { | ||
// color: blue; | ||
// } | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34
3583
35