diff --git a/.gitignore b/.gitignore index 2528b0b..67b22c8 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,5 @@ Temporary Items # Node node_modules -.idea \ No newline at end of file +.idea +diff.txt \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..3f154a6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,20 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "program": "${workspaceFolder}/lib/auto-git/match/index.js" + }, + { + "type": "node", + "request": "launch", + "name": "启动程序", + "program": "${workspaceFolder}\\index.js" + } + ] +} \ No newline at end of file diff --git a/1.scss b/1.scss deleted file mode 100644 index d0dc8ce..0000000 --- a/1.scss +++ /dev/null @@ -1,6 +0,0 @@ -.content { - &.style { - width: 100px; - height: 100px; - } -} \ No newline at end of file diff --git a/README.md b/README.md index 99c892a..d408251 100644 --- a/README.md +++ b/README.md @@ -22,43 +22,37 @@ Options: ``` # Example -``` -$ node .\lib\diff\ -{ - '\html\index1.html': [ { name: '\\css\\1.css', attr: [Object] } ], - '\html\index2.html': [ { name: '\\css\\3.css', attr: [Object] } ] +change 1.scss +```javascript +.content { + &.style { + width: 100px; + } + .content { + width: 100px; + } + .dd { + width: 100%; + } + .a { + width: 100px + } } -export! -``` -# Export +.cc { + width: 100px; +} ``` -./lib/data/export.json -[{ - "label": "\\html\\index1.html", - "groups": [{ - "label": "\\css\\1.css", - "groups": [{ - "label": ".content" - }, { - "label": ".inner-content" - }, { - "label": ".inner-button" - }, { - "label": ".inner-span" - }] - }] -}, { - "label": "\\html\\index2.html", - "groups": [{ - "label": "\\css\\3.css", - "groups": [{ - "label": ".inner-span" - }] - }] -} +``` +$ node index.js -s -p ./test-webpack + +$ cd examples + +$ node index.js -``` \ No newline at end of file +open localhost:3000 on the browers + +``` diff --git a/examples/dist/export.json b/examples/dist/export.json index 7705629..af6eaad 100644 --- a/examples/dist/export.json +++ b/examples/dist/export.json @@ -1,23 +1 @@ -[{ - "label": "\\html\\index1.html", - "groups": [{ - "label": "\\css\\1.css", - "groups": [{ - "label": ".content" - }, { - "label": ".inner-content" - }, { - "label": ".inner-button" - }, { - "label": ".inner-span" - }] - }] -}, { - "label": "\\html\\index2.html", - "groups": [{ - "label": "\\css\\3.css", - "groups": [{ - "label": ".inner-span" - }] - }] -}] \ No newline at end of file +[{"label":"test-webpack/index.js","groups":[{"label":"test-webpack/src/css/1.scss","groups":[{"label":" .content .a","groups":[{"label":"+width: 100px+"}]}]}]}] \ No newline at end of file diff --git a/examples/index.js b/examples/index.js index 18123e2..35d6582 100644 --- a/examples/index.js +++ b/examples/index.js @@ -1,5 +1,7 @@ const express = require('express'); const app = express(); +const open = require("open"); + const router = express.Router(); router.get('/', function (req, res, next) { req.url = './index.html'; @@ -8,4 +10,7 @@ router.get('/', function (req, res, next) { app.use(router); app.use(express.static('./dist')); -const server = app.listen(3000) \ No newline at end of file +const server = app.listen(3000, () => { + console.log('success on localhost:3000'); + open('http://localhost:3000'); +}) \ No newline at end of file diff --git a/examples/package.json b/examples/package.json new file mode 100644 index 0000000..754ae6d --- /dev/null +++ b/examples/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "open": "^0.0.5" + } +} diff --git a/index.js b/index.js index 7ddbd20..96da50c 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,9 @@ const argv = require('optimist') .alias('s', 'single') .describe('s', 'use type of single') .argv; -const cssControl = require('./lib/index'); +// const cssControl = require('./lib/index'); +const combind = require('./lib/combine/index'); + // 遍历目录 let root = process.cwd(); // 遍历类型 @@ -23,5 +25,4 @@ if(argv.p) { root = path.resolve(__dirname, argv.p); } - -cssControl(root, type); \ No newline at end of file +combind(root, type, argv.p); \ No newline at end of file diff --git a/lib/auto-git/1.json b/lib/auto-git/1.json new file mode 100644 index 0000000..3ff8ccc --- /dev/null +++ b/lib/auto-git/1.json @@ -0,0 +1 @@ +{"1.scss":" .content { &.style { width: 100px;- height: 100px; } .content { width: 100px; }+ .dd {+ width: 100%;+ } } .cc { width: 100px; }"} \ No newline at end of file diff --git a/lib/auto-git/2.json b/lib/auto-git/2.json new file mode 100644 index 0000000..fa0a133 --- /dev/null +++ b/lib/auto-git/2.json @@ -0,0 +1 @@ +[[],["diff --git 1.scss 1.scss","index c7b997d..a392025 100644","--- 1.scss","+++ 1.scss","@@ -1,13 +1,15 @@"," .content {"," &.style {"," width: 100px;","- height: 100px;"," }"," .content {"," width: 100px;"," }","+ .dd {","+ width: 100%;","+ }"," }"," "," .cc {"," width: 100px;"," }","\\ No newline at end of file"],["diff --git lib/auto-git/1.json lib/auto-git/1.json","index 2003f1e..9e26dfe 100644","--- lib/auto-git/1.json","+++ lib/auto-git/1.json","@@ -1 +1 @@","-{\"1.scss\":\" .content {\\r &.style {\\r width: 100px;\\rcontent: '- height: 100px;';\\r }\\r .content {\\r width: 100px;\\r }\\rcontent: '+ .inner {';\\rcontent: '+ width: 100px;';\\rcontent: '+ }';\\r }\\r \\r .cc {\\r width: 100px;\\r }\\r\"}","\\ No newline at end of file","+{}","\\ No newline at end of file"],["diff --git lib/auto-git/2.json lib/auto-git/2.json","index 69d7219..57f8573 100644","--- lib/auto-git/2.json","+++ lib/auto-git/2.json","@@ -1 +1 @@","-[[],[\"diff --git 1.scss 1.scss\",\"index c7b997d..6eb8dff 100644\",\"--- 1.scss\",\"+++ 1.scss\",\"@@ -1,13 +1,15 @@\",\" .content {\",\" &.style {\",\" width: 100px;\",\"- height: 100px;\",\" }\",\" .content {\",\" width: 100px;\",\" }\",\"+ .inner {\",\"+ width: 100px;\",\"+ }\",\" }\",\" \",\" .cc {\",\" width: 100px;\",\" }\",\"\\\\ No newline at end of file\"],[\"diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js\",\"index d554f8f..9573a67 100644\",\"--- lib/compliestyles/sass-loader.js\",\"+++ lib/compliestyles/sass-loader.js\",\"@@ -1,25 +1,25 @@\",\" const sass = require('node-sass');\",\" \",\" function sassLoader(path) {\",\" const result = sass.renderSync({\",\" // file: path,\",\"- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',\",\"+ data: \\\".content { \\\\r&.style { \\\\r width: 100px;\\\\r// - height: 100px; \\\\r} \\\\r .content { \\\\rwidth: 100px; }\\\\r// + .inner {\\\\r// + width: 100px;\\\\r// + } \\\\r} \\\\r.cc { \\\\rwidth: 100px; \\\\r}\\\\r\\\",\",\" // outputStyle: 'compressed',\",\" // outFile: '../../1.css',\",\" // sourceMap: true, // or an absolute or relative (to outFile) path\",\" importer: function(url, prev, done) {\",\" // url is the path in import as is, which LibSass encountered.\",\" // prev is the previously resolved path.\",\" // done is an optional callback, either consume it or return value synchronously.\",\" // this.options contains this options hash\",\" }\",\" });\",\" if(result.css) {\",\" return result.css.toString(\\\"utf8\\\");\",\" }\",\" return {};\",\" }\",\" \",\" \",\" \",\" module.exports = sassLoader;\",\"\\\\ No newline at end of file\",\"\"]]","\\ No newline at end of file","+[[],[\"diff --git lib/auto-git/1.json lib/auto-git/1.json\",\"index 2003f1e..9e26dfe 100644\",\"--- lib/auto-git/1.json\",\"+++ lib/auto-git/1.json\",\"@@ -1 +1 @@\",\"-{\\\"1.scss\\\":\\\" .content {\\\\r &.style {\\\\r width: 100px;\\\\rcontent: '- height: 100px;';\\\\r }\\\\r .content {\\\\r width: 100px;\\\\r }\\\\rcontent: '+ .inner {';\\\\rcontent: '+ width: 100px;';\\\\rcontent: '+ }';\\\\r }\\\\r \\\\r .cc {\\\\r width: 100px;\\\\r }\\\\r\\\"}\",\"\\\\ No newline at end of file\",\"+{}\",\"\\\\ No newline at end of file\"],[\"diff --git lib/auto-git/2.json lib/auto-git/2.json\",\"index 69d7219..e8b5916 100644\",\"--- lib/auto-git/2.json\",\"+++ lib/auto-git/2.json\",\"@@ -1 +1 @@\",\"-[[],[\\\"diff --git 1.scss 1.scss\\\",\\\"index c7b997d..6eb8dff 100644\\\",\\\"--- 1.scss\\\",\\\"+++ 1.scss\\\",\\\"@@ -1,13 +1,15 @@\\\",\\\" .content {\\\",\\\" &.style {\\\",\\\" width: 100px;\\\",\\\"- height: 100px;\\\",\\\" }\\\",\\\" .content {\\\",\\\" width: 100px;\\\",\\\" }\\\",\\\"+ .inner {\\\",\\\"+ width: 100px;\\\",\\\"+ }\\\",\\\" }\\\",\\\" \\\",\\\" .cc {\\\",\\\" width: 100px;\\\",\\\" }\\\",\\\"\\\\\\\\ No newline at end of file\\\"],[\\\"diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js\\\",\\\"index d554f8f..9573a67 100644\\\",\\\"--- lib/compliestyles/sass-loader.js\\\",\\\"+++ lib/compliestyles/sass-loader.js\\\",\\\"@@ -1,25 +1,25 @@\\\",\\\" const sass = require('node-sass');\\\",\\\" \\\",\\\" function sassLoader(path) {\\\",\\\" const result = sass.renderSync({\\\",\\\" // file: path,\\\",\\\"- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',\\\",\\\"+ data: \\\\\\\".content { \\\\\\\\r&.style { \\\\\\\\r width: 100px;\\\\\\\\r// - height: 100px; \\\\\\\\r} \\\\\\\\r .content { \\\\\\\\rwidth: 100px; }\\\\\\\\r// + .inner {\\\\\\\\r// + width: 100px;\\\\\\\\r// + } \\\\\\\\r} \\\\\\\\r.cc { \\\\\\\\rwidth: 100px; \\\\\\\\r}\\\\\\\\r\\\\\\\",\\\",\\\" // outputStyle: 'compressed',\\\",\\\" // outFile: '../../1.css',\\\",\\\" // sourceMap: true, // or an absolute or relative (to outFile) path\\\",\\\" importer: function(url, prev, done) {\\\",\\\" // url is the path in import as is, which LibSass encountered.\\\",\\\" // prev is the previously resolved path.\\\",\\\" // done is an optional callback, either consume it or return value synchronously.\\\",\\\" // this.options contains this options hash\\\",\\\" }\\\",\\\" });\\\",\\\" if(result.css) {\\\",\\\" return result.css.toString(\\\\\\\"utf8\\\\\\\");\\\",\\\" }\\\",\\\" return {};\\\",\\\" }\\\",\\\" \\\",\\\" \\\",\\\" \\\",\\\" module.exports = sassLoader;\\\",\\\"\\\\\\\\ No newline at end of file\\\",\\\"\\\"]]\",\"\\\\ No newline at end of file\",\"+[[],[\\\"diff --git lib/auto-git/1.json lib/auto-git/1.json\\\",\\\"index 2003f1e..9e26dfe 100644\\\",\\\"--- lib/auto-git/1.json\\\",\\\"+++ lib/auto-git/1.json\\\",\\\"@@ -1 +1 @@\\\",\\\"-{\\\\\\\"1.scss\\\\\\\":\\\\\\\" .content {\\\\\\\\r &.style {\\\\\\\\r width: 100px;\\\\\\\\rcontent: '- height: 100px;';\\\\\\\\r }\\\\\\\\r .content {\\\\\\\\r width: 100px;\\\\\\\\r }\\\\\\\\rcontent: '+ .inner {';\\\\\\\\rcontent: '+ width: 100px;';\\\\\\\\rcontent: '+ }';\\\\\\\\r }\\\\\\\\r \\\\\\\\r .cc {\\\\\\\\r width: 100px;\\\\\\\\r }\\\\\\\\r\\\\\\\"}\\\",\\\"\\\\\\\\ No newline at end of file\\\",\\\"+{}\\\",\\\"\\\\\\\\ No newline at end of file\\\"],[\\\"diff --git lib/auto-git/2.json lib/auto-git/2.json\\\",\\\"index 69d7219..1c432ad 100644\\\",\\\"--- lib/auto-git/2.json\\\",\\\"+++ lib/auto-git/2.json\\\",\\\"@@ -1 +1 @@\\\",\\\"-[[],[\\\\\\\"diff --git 1.scss 1.scss\\\\\\\",\\\\\\\"index c7b997d..6eb8dff 100644\\\\\\\",\\\\\\\"--- 1.scss\\\\\\\",\\\\\\\"+++ 1.scss\\\\\\\",\\\\\\\"@@ -1,13 +1,15 @@\\\\\\\",\\\\\\\" .content {\\\\\\\",\\\\\\\" &.style {\\\\\\\",\\\\\\\" width: 100px;\\\\\\\",\\\\\\\"- height: 100px;\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" .content {\\\\\\\",\\\\\\\" width: 100px;\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\"+ .inner {\\\\\\\",\\\\\\\"+ width: 100px;\\\\\\\",\\\\\\\"+ }\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" .cc {\\\\\\\",\\\\\\\" width: 100px;\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\"],[\\\\\\\"diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js\\\\\\\",\\\\\\\"index d554f8f..9573a67 100644\\\\\\\",\\\\\\\"--- lib/compliestyles/sass-loader.js\\\\\\\",\\\\\\\"+++ lib/compliestyles/sass-loader.js\\\\\\\",\\\\\\\"@@ -1,25 +1,25 @@\\\\\\\",\\\\\\\" const sass = require('node-sass');\\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" function sassLoader(path) {\\\\\\\",\\\\\\\" const result = sass.renderSync({\\\\\\\",\\\\\\\" // file: path,\\\\\\\",\\\\\\\"- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',\\\\\\\",\\\\\\\"+ data: \\\\\\\\\\\\\\\".content { \\\\\\\\\\\\\\\\r&.style { \\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\r// - height: 100px; \\\\\\\\\\\\\\\\r} \\\\\\\\\\\\\\\\r .content { \\\\\\\\\\\\\\\\rwidth: 100px; }\\\\\\\\\\\\\\\\r// + .inner {\\\\\\\\\\\\\\\\r// + width: 100px;\\\\\\\\\\\\\\\\r// + } \\\\\\\\\\\\\\\\r} \\\\\\\\\\\\\\\\r.cc { \\\\\\\\\\\\\\\\rwidth: 100px; \\\\\\\\\\\\\\\\r}\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\",\\\\\\\",\\\\\\\" // outputStyle: 'compressed',\\\\\\\",\\\\\\\" // outFile: '../../1.css',\\\\\\\",\\\\\\\" // sourceMap: true, // or an absolute or relative (to outFile) path\\\\\\\",\\\\\\\" importer: function(url, prev, done) {\\\\\\\",\\\\\\\" // url is the path in import as is, which LibSass encountered.\\\\\\\",\\\\\\\" // prev is the previously resolved path.\\\\\\\",\\\\\\\" // done is an optional callback, either consume it or return value synchronously.\\\\\\\",\\\\\\\" // this.options contains this options hash\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" });\\\\\\\",\\\\\\\" if(result.css) {\\\\\\\",\\\\\\\" return result.css.toString(\\\\\\\\\\\\\\\"utf8\\\\\\\\\\\\\\\");\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" return {};\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" module.exports = sassLoader;\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\",\\\\\\\"\\\\\\\"]]\\\",\\\"\\\\\\\\ No newline at end of file\\\",\\\"+[[],[\\\\\\\"diff --git lib/auto-git/1.json lib/auto-git/1.json\\\\\\\",\\\\\\\"index 2003f1e..9e26dfe 100644\\\\\\\",\\\\\\\"--- lib/auto-git/1.json\\\\\\\",\\\\\\\"+++ lib/auto-git/1.json\\\\\\\",\\\\\\\"@@ -1 +1 @@\\\\\\\",\\\\\\\"-{\\\\\\\\\\\\\\\"1.scss\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\\r &.style {\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\rcontent: '- height: 100px;';\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\r .content {\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\rcontent: '+ .inner {';\\\\\\\\\\\\\\\\rcontent: '+ width: 100px;';\\\\\\\\\\\\\\\\rcontent: '+ }';\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\r \\\\\\\\\\\\\\\\r .cc {\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\",\\\\\\\"+{}\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\"],[\\\\\\\"diff --git lib/auto-git/2.json lib/auto-git/2.json\\\\\\\",\\\\\\\"index 69d7219..0aaa5d4 100644\\\\\\\",\\\\\\\"--- lib/auto-git/2.json\\\\\\\",\\\\\\\"+++ lib/auto-git/2.json\\\\\\\",\\\\\\\"@@ -1 +1 @@\\\\\\\",\\\\\\\"-[[],[\\\\\\\\\\\\\\\"diff --git 1.scss 1.scss\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"index c7b997d..6eb8dff 100644\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"--- 1.scss\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+++ 1.scss\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"@@ -1,13 +1,15 @@\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" &.style {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"- height: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ .inner {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" .cc {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\"diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"index d554f8f..9573a67 100644\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"--- lib/compliestyles/sass-loader.js\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+++ lib/compliestyles/sass-loader.js\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"@@ -1,25 +1,25 @@\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" const sass = require('node-sass');\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" function sassLoader(path) {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" const result = sass.renderSync({\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // file: path,\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ data: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\".content { \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r&.style { \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r// - height: 100px; \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r} \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r .content { \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rwidth: 100px; }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r// + .inner {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r// + width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r// + } \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r} \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r.cc { \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rwidth: 100px; \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // outputStyle: 'compressed',\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // outFile: '../../1.css',\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // sourceMap: true, // or an absolute or relative (to outFile) path\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" importer: function(url, prev, done) {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // url is the path in import as is, which LibSass encountered.\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // prev is the previously resolved path.\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // done is an optional callback, either consume it or return value synchronously.\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // this.options contains this options hash\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" });\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" if(result.css) {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" return result.css.toString(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"utf8\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" return {};\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" module.exports = sassLoader;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]]\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\",\\\\\\\"+[[],[\\\\\\\\\\\\\\\"diff --git lib/auto-git/1.json lib/auto-git/1.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"index 2003f1e..aec51b9 100644\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"--- lib/auto-git/1.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+++ lib/auto-git/1.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"@@ -1 +1 @@\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"-{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r &.style {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rcontent: '- height: 100px;';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r .content {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rcontent: '+ .inner {';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rcontent: '+ width: 100px;';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rcontent: '+ }';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r .cc {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r &.style {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r height: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r background: #ddd;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rcontent: '+ .dd {';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rcontent: '+ width: 100px;';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rcontent: '+ }';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r .cc {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\"diff --git lib/auto-git/2.json lib/auto-git/2.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"index 69d7219..6e0fb68 100644\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"--- lib/auto-git/2.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+++ lib/auto-git/2.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"@@ -1 +1 @@\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"-[[],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git 1.scss 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index c7b997d..6eb8dff 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"@@ -1,13 +1,15 @@\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" &.style {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\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end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index d554f8f..9573a67 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- lib/compliestyles/sass-loader.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ lib/compliestyles/sass-loader.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"@@ -1,25 +1,25 @@\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const sass = require('node-sass');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function sassLoader(path) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const result = sass.renderSync({\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // file: path,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ data: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // outputStyle: 'compressed',\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // outFile: '../../1.css',\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // sourceMap: true, // or an absolute or relative (to outFile) path\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" importer: function(url, prev, done) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // url is the path in import as is, which LibSass encountered.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // prev is the previously resolved path.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // done is an optional callback, either consume it or return value synchronously.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // this.options contains this options hash\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" });\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if(result.css) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return result.css.toString(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"utf8\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return {};\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" module.exports = sassLoader;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"]]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+[[],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git 1.scss 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index 94c930a..e32f7a6 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\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\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git lib/auto-git/1.json lib/auto-git/1.json\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index fb3c6fb..9cb5257 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- lib/auto-git/1.json\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ lib/auto-git/1.json\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"@@ -1,3 +1 @@\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"-{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .content { &.style { width: 100px; height: 100px; background: #ddd; }+} .cc { width: 100px; }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"-}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .content { &.style { width: 100px; height: 100px; background: #ddd; }+ .dd {+ width: 100px;+ } } .cc { width: 100px; }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git lib/auto-git/2.json lib/auto-git/2.json\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index 699fecb..0c2ad4d 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- lib/auto-git/2.json\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ lib/auto-git/2.json\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"@@ -1 +1 @@\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"-[[],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git 1.scss 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index b408236..94c930a 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"-const {readFile} = require('fs');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+const {readFile, writeFile} = require('fs');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {REG_HEAD} = require('./regex'); // 辅助的正则表达式\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {INCLUDE_FILES} = require('./type');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function read(path) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return new Promise((rsv, rjt) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" readFile(path, (err, data) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (err) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.error('======= 读取文件失败!您可能误删了临时文件 =======');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rjt(err);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rsv(data.toString().split('\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n'));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\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\\\\\\\\\\\\\\\\\\\\"+ let currentLine = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" for (let i = 0, len = lines.length; i < len; i++) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const line = lines[i];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let values;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // 判断head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (values = REG_HEAD.exec(line)) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- // 判断 ---\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- if (line.indexOf('--- ') === 0) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- console.log(line.slice(4));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // 判断不加入line的情况\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ if (line.indexOf('--- ') === 0 || line.indexOf('+++ ') === 0 || line.indexOf('@@ ') === 0 || line.indexOf('index ') === 0 || line.indexOf('//') === 0) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // console.log(1);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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line at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git lib/auto-git/parser.js lib/auto-git/parser.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index ae3d0d0..2e71fd8 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- lib/auto-git/parser.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ lib/auto-git/parser.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"@@ -1,130 +1,130 @@\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" * 将diff得到的文件转为二进制流接着字符串解析为json\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" */\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {readFile, writeFile} = require('fs');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {REG_HEAD} = require('./regex'); // 辅助的正则表达式\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {INCLUDE_FILES} = require('./type');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function read(path) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return new Promise((rsv, rjt) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" readFile(path, (err, data) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (err) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.error('======= 读取文件失败!您可能误删了临时文件 =======');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rjt(err);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rsv(data.toString().split('\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" for (let i = 0, len = lines.length; i < len; i++) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const line = lines[i];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let values;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // 判断head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (values = REG_HEAD.exec(line)) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" styleBlocks.push(currentLine);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\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\\\\\\\" const line = lines[i];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // console.log(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let values;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // console.log(JSON.stringify(line));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // return;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (values = REG_HEAD.exec(line)) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const type = values[1].split('.')[1];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(type); \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (line.indexOf('--- ') === 0 || line.indexOf('+++ ') === 0 || line.indexOf('@@ ') === 0 || line.indexOf('index ') === 0 || line.indexOf('//') === 0) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // console.log(1);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if(name) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" temp[name] += line;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\"]]\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\",\\\\\\\"\\\\\\\"]]\\\",\\\"\\\\\\\\ No newline at end of file\\\",\\\"\\\"]]\",\"\\\\ No newline at end of file\",\"\"]]","\\ No newline at end of file"],["diff --git lib/auto-git/index.js lib/auto-git/index.js","index f1e81e6..8a8c737 100644","--- lib/auto-git/index.js","+++ lib/auto-git/index.js","@@ -1,14 +1,14 @@"," const { runCommand } = require('./command.js');","-const { parser } = require('./parser.js');","+// const { parser } = require('./parser.js');"," "," function AutoGit() {"," runCommand('sh', [`${__dirname}/bin/gitdiff.sh`])"," .then(r => {"," "," })"," .catch(err => {"," console.log(err);"," })"," }"," "," AutoGit()"],["diff --git lib/auto-git/parser.js lib/auto-git/parser.js","index 452f23e..ae3d0d0 100644","--- lib/auto-git/parser.js","+++ lib/auto-git/parser.js","@@ -1,142 +1,130 @@"," /**"," * 将diff得到的文件转为二进制流接着字符串解析为json"," */"," "," const {readFile, writeFile} = require('fs');"," const {REG_HEAD} = require('./regex'); // 辅助的正则表达式"," const {INCLUDE_FILES} = require('./type');"," "," function read(path) {"," return new Promise((rsv, rjt) => {"," readFile(path, (err, data) => {"," if (err) {"," console.error('======= 读取文件失败!您可能误删了临时文件 =======');"," rjt(err);"," }"," rsv(data.toString().split('\\n'));"," })"," })"," }"," /**"," * @desc 将diff分块文件"," * @param {Array} arr "," * @resolve {Array}"," */"," function parsertoBlock(arr) {"," return new Promise((rsv, rjt) => {"," const lines = arr;"," "," let styleBlocks = [];"," let currentLine = [];"," "," for (let i = 0, len = lines.length; i < len; i++) {"," const line = lines[i];"," let values;"," // 判断head"," if (values = REG_HEAD.exec(line)) {"," console.log(line);"," styleBlocks.push(currentLine);"," currentLine = [];"," currentLine.push(line);"," continue;"," }"," currentLine.push(line);"," "," }"," styleBlocks.push(currentLine);"," writeFile('2.json', JSON.stringify(styleBlocks), err=> {"," if(err) {"," console.log(err);"," } else {"," console.log('success');"," }"," })"," rsv(styleBlocks);"," })"," }"," "," function parsertoJson(arr) {"," let files = arr;"," // let data = [];"," let temp = {};"," for(let j = 0; j < files.length; j++) {"," let lines = files[j];"," let name;"," if(lines === '') {"," continue;"," }"," for(let i = 0, len = lines.length; i < len; i++) {","- let line = lines[i];","+ const line = lines[i];"," // console.log(line);"," let values;"," // console.log(JSON.stringify(line));"," // return;"," if (values = REG_HEAD.exec(line)) {"," const type = values[1].split('.')[1];"," console.log(type); "," "," if (INCLUDE_FILES.indexOf(type) === -1) {"," break;"," }"," console.log(JSON.stringify(values))"," name = values[2];"," temp[name] = '';"," // data.length > 0 && data.push(temp);"," // temp = {"," // from: values[1],"," // to: values[2]"," // };"," continue;"," }"," // 判断不加入line的情况","- if (line.indexOf('--- ') === 0 || line.indexOf('+++ ') === 0 || line.indexOf('@@ ') === 0 || line.indexOf('index ') === 0 || line.indexOf('//') === 0 || line.indexOf('\\\\') === 0) {","+ if (line.indexOf('--- ') === 0 || line.indexOf('+++ ') === 0 || line.indexOf('@@ ') === 0 || line.indexOf('index ') === 0 || line.indexOf('//') === 0) {"," // console.log(1);"," continue;"," }","- if(line.indexOf('-') === 0) {","- console.log('-',line);","- // line = line.trim().replace(/^\\-/, '// -');","- line = `content: '${line}';`;","- console.log('1-',line);","- }","- if(line.indexOf('+') === 0) {","- console.log('+',line);","- // line = line.trim().replace(/^\\+/, '// +');","- line = `content: '${line}';`;","- console.log('1+',line);","- }"," if(name) {","- temp[name] += line+'\\r';","+ temp[name] += line;"," }"," }"," }"," "," // console.log(JSON.stringify(temp));"," writeFile('1.json', JSON.stringify(temp), err=> {"," if(err) {"," console.log(err);"," } else {"," console.log('success');"," }"," })"," }"," "," function Parser() {"," return new Promise((rsv, rjt) => {"," read('./temp/diff.txt')"," .then(arr => parsertoBlock(arr))"," .then(arr => parsertoJson(arr))"," .then(result => {"," console.log(result)"," })"," .catch(err => {"," console.log(err)"," })"," })"," }"," "," Parser()"," "," // module.exports = {"," // Parser"," // }","\\ No newline at end of file",""]] \ No newline at end of file diff --git a/lib/auto-git/bin/clear.sh b/lib/auto-git/bin/clear.sh new file mode 100644 index 0000000..4c10641 --- /dev/null +++ b/lib/auto-git/bin/clear.sh @@ -0,0 +1,2 @@ +#! /bin/bash +rm -rf temp/* \ No newline at end of file diff --git a/lib/auto-git/bin/gitdiff.sh b/lib/auto-git/bin/gitdiff.sh new file mode 100644 index 0000000..0565045 --- /dev/null +++ b/lib/auto-git/bin/gitdiff.sh @@ -0,0 +1,2 @@ +#! /bin/bash +git diff --no-prefix -U1000 > ./lib/auto-git/temp/diff.txt \ No newline at end of file diff --git a/lib/auto-git/command.js b/lib/auto-git/command.js new file mode 100644 index 0000000..550d3e9 --- /dev/null +++ b/lib/auto-git/command.js @@ -0,0 +1,18 @@ +const { spawn } = require('child_process'); + +function runCommand(cmd = 'sh', args) { + return new Promise((rsv, rjt) => { + const child = spawn( cmd, args ); + let response = ''; + child.stdout.on('data', buffer => response += buffer.toString()); + child.stdout.on('end', () => { + console.log('shell end!') + rsv(response); + }); + child.stdout.on('error', e => rjt(e)); + }) +}; + +module.exports = { + runCommand +} \ No newline at end of file diff --git a/lib/auto-git/index.js b/lib/auto-git/index.js new file mode 100644 index 0000000..ddf2dab --- /dev/null +++ b/lib/auto-git/index.js @@ -0,0 +1,17 @@ +const { runCommand } = require('./command.js'); +const { Parser } = require('./parser.js'); + +function AutoGit() { + // return Parser(); + return runCommand('sh', [`${__dirname}/bin/gitdiff.sh`]) + .then(r => { + return Parser(); + }) + .catch(err => { + console.log(err); + }) +} + +// AutoGit() + +module.exports = AutoGit; diff --git a/lib/auto-git/match/1.html b/lib/auto-git/match/1.html new file mode 100644 index 0000000..b007c23 --- /dev/null +++ b/lib/auto-git/match/1.html @@ -0,0 +1,59 @@ + + + + + + + Codestin Search App + + + + + \ No newline at end of file diff --git a/lib/auto-git/match/beautifyCss.json b/lib/auto-git/match/beautifyCss.json new file mode 100644 index 0000000..05c71e7 --- /dev/null +++ b/lib/auto-git/match/beautifyCss.json @@ -0,0 +1 @@ +[" .content {"," &.style {"," width: 100px;"," - height: 100px;"," }"," .content {"," width: 100px;"," }"," +.dd {"," +width: 100%;"," +"," }"," }",""," .cc {"," width: 100px;"," }"] \ No newline at end of file diff --git a/lib/auto-git/match/index.js b/lib/auto-git/match/index.js new file mode 100644 index 0000000..00ec277 --- /dev/null +++ b/lib/auto-git/match/index.js @@ -0,0 +1,76 @@ +// const str = " .content { &.style { width: 100px;- height: 100px; } .content { width: 100px; }+ .dd {+ width: 100%;+ } } .cc { width: 100px; }"; +const {BEFORE_REG} = require('../regex'); +const beautify = require('js-beautify').css; + +/** + * @desc 将css解析成AST模版 + * @param {String} str + * @returns {Object} + */ +function match(str) { + const beautifyStr = beautify(str, { indent_size: 2, space_in_empty_paren: true }); + const arr = beautifyStr.split('\n'); + const root = {}; + const matchTree = {}; + let index = 0; + let cacheClass = []; + let curObj = null; + arr.map((item) => { + // debugger; + const isClass = BEFORE_REG.exec(item.trim()); + // 如果找到{ 并且提取出类名, 创建一层结构 + if(isClass) { + let className = isClass[1]; + let isChange = null; + // 找出当前类是否git-+变化 + if(className[0] === '-' || className[0] === '+') { + isChange = className[0]; + className = className.replace('-', '').replace('+', ''); + } + // 如果为根节点,在根节建立 + if(index === 0) { + root[className] = { + attr: [], + child: {}, + isChange: isChange || '' + } + curObj = root[className]; + } else { + // 否则在跟踪变量curObj建立 + curObj['child'][className] = { + attr: [], + child: {}, + isChange: isChange || '' + } + curObj = curObj['child'][className]; + + } + cacheClass.push(className); + index ++; + } else { + // 如果不用建立层级,在attr中加入变化属性 + const line = item.trim(); + if((line[0] === '-' || line[0] === '+') && line.length > 1) { + curObj.attr.push(line); + } + } + // 判断当前的索引是否要根级索引 + if(item.indexOf('}') > -1){ + index --; + let i = 1; + curObj = root[cacheClass[0]]; + // 循环来定位需要网上以及的位置 + while(i < index) { + curObj = curObj['child'][cacheClass[i]]; + i++; + } + // 删除当前位置的缓存对象 + cacheClass.splice(index + 1,1); + } + }); + return root; +} + + +// match(); +module.exports = match diff --git a/lib/auto-git/match/test.js b/lib/auto-git/match/test.js new file mode 100644 index 0000000..9d0a986 --- /dev/null +++ b/lib/auto-git/match/test.js @@ -0,0 +1,54 @@ +const match = require('./index'); +const str = " .content { &.style { width: 100px;- height: 100px; } .content { width: 100px; }+ .dd {+ width: 100%;+ } } .cc { width: 100px; }"; + +console.log(JSON.stringify(match(str))) + +const obj = { + ".content": { + "attr": [], + "child": { + "&.style": { + "attr": [" height: 100px;"], + "child": {}, + "isChange": "" + }, + ".content": { + "attr": [], + "child": {}, + "isChange": "" + }, + ".dd": { + "attr": ["width: 100%;", ""], + "child": {}, + "isChange": "+" + } + }, + "isChange": "" + }, + ".cc": { + "attr": [], + "child": {}, + "isChange": "" + } +}; + +const stylesList = {} +function attrMerge(obj, root) { + Object.keys(obj).map((item) => { + // debugger; + if(obj[item].isChange !== '') { + stylesList[`${root} ${item}`] = obj[item].attr; + } + if(obj[item].isChange === '' && obj[item].attr.length > 0) { + stylesList[`${root} ${item}`] = obj[item].attr; + } + if(Object.getOwnPropertyNames(obj[item].child).length !== 0) { + attrMerge(obj[item].child, `${root} ${item}`) + } + // if(obj[item].isChange === '' && Object.getOwnPropertyNames(obj[item].child).length === 0) { + // stylesList[root] = obj[item].attr; + // } + }) +} +attrMerge(obj, ''); +console.log(JSON.stringify(stylesList)); \ No newline at end of file diff --git a/lib/auto-git/parser.js b/lib/auto-git/parser.js new file mode 100644 index 0000000..3ec31f8 --- /dev/null +++ b/lib/auto-git/parser.js @@ -0,0 +1,209 @@ +/** + * 将diff得到的文件转为二进制流接着字符串解析为json + */ + +const { + readFile, + writeFile +} = require('fs'); +const { + REG_HEAD +} = require('./regex'); // 辅助的正则表达式 +const { + INCLUDE_FILES +} = require('./type'); +const match = require('./match/index'); + +function read(path) { + return new Promise((rsv, rjt) => { + readFile(path, (err, data) => { + if (err) { + console.log(err); + console.error('======= 读取文件失败!您可能误删了临时文件 ======='); + rjt(err); + } + rsv(data.toString().split('\n')); + }) + }) +} +/** + * @desc 将diff分块文件 + * @param {Array} arr + * @resolve {Array} + */ +function parsertoBlock(arr) { + return new Promise((rsv, rjt) => { + const lines = arr; + + let styleBlocks = []; + let currentLine = []; + + for (let i = 0, len = lines.length; i < len; i++) { + const line = lines[i]; + let values; + // 判断head + if (values = REG_HEAD.exec(line)) { + // console.log(line); + styleBlocks.push(currentLine); + currentLine = []; + currentLine.push(line); + continue; + } + currentLine.push(line); + + } + styleBlocks.push(currentLine); + // writeFile('2.json', JSON.stringify(styleBlocks), err => { + // if (err) { + // console.log(err); + // } else { + // console.log('write 2.json success'); + // } + // }) + rsv(styleBlocks); + }) +} + +/** + * @desc 把diff数组过滤成样式对象 + * @param {Array} arr + * @returns + */ +function parsertoJson(arr) { + return new Promise((resolve, reject) => { + let files = arr; + // let data = []; + let temp = {}; + for (let j = 0; j < files.length; j++) { + let lines = files[j]; + let name; + if (lines === '') { + continue; + } + for (let i = 0, len = lines.length; i < len; i++) { + let line = lines[i]; + // console.log(line); + let values; + // return; + if (values = REG_HEAD.exec(line)) { + const type = values[1].split('.')[1]; + // console.log(`${values[1]} type is : ${type}`); + + if (INCLUDE_FILES.indexOf(type) === -1) { + break; + } + name = values[2]; + temp[name] = ''; + + continue; + } + // 判断不加入line的情况 + if (line.indexOf('--- ') === 0 || line.indexOf('+++ ') === 0 || line.indexOf('@@ ') === 0 || line.indexOf('index ') === 0 || line.indexOf('//') === 0 || line.indexOf('\\') === 0) { + // console.log(1); + continue; + } + if (name) { + temp[name] += line; + } + } + } + + // writeFile('1.json', JSON.stringify(temp), err => { + // if (err) { + // console.log(err); + // } else { + // console.log('write 1.json success'); + // } + // }) + resolve(temp); + }) +} +// 引用对象链 +let stylesList = {} + +/** + * @desc 将样式对象解析成AST模版 + * @param {Object} oStyList + */ +function parToFullList(oStyList) { + return new Promise((resolve ,reatjct) => { + const oDiffList = []; + for (let i in oStyList) { + const oItem = {}; + const oMatch = match(oStyList[i]); + oItem['label'] = i; + attrMerge(oMatch, ''); + const trimL = trimStylesList(stylesList); + oItem['groups'] = trimL; + oDiffList.push(JSON.parse(JSON.stringify(oItem))); + stylesList = {}; + } + // console.log(JSON.stringify(oDiffList)); + resolve(oDiffList); + }) +} + +/** + * + * @desc 递归合并styles对象,组合成真正的样式 + * @param {Object} obj + * @param {String} root + */ +function attrMerge(obj, root) { + Object.keys(obj).map((item) => { + if (obj[item].isChange !== '') { + stylesList[`${root} ${item}`] = obj[item].attr; + } + if (obj[item].isChange === '' && obj[item].attr.length > 0) { + stylesList[`${root} ${item}`] = obj[item].attr; + } + if (Object.getOwnPropertyNames(obj[item].child).length !== 0) { + attrMerge(obj[item].child, `${root} ${item}`) + } + }) +} + +/** + * + * @desc 格式化样式对象 + * @param {Object} oList + * @returns + */ +function trimStylesList(oList) { + const groups = []; + Object.keys(oList).map((item) => { + const ogL = {}; + ogL['label'] = item; + ogL.groups = []; + oList[item].map((i) => { + ogL.groups.push({ + label: i + }) + }); + groups.push(ogL); + }) + return groups; +} + + +function Parser() { + return new Promise((rsv, rjt) => { + read(`${process.cwd()}/lib/auto-git/temp/diff.txt`) + .then(res => parsertoBlock(res)) + .then(res => parsertoJson(res)) + .then(res => parToFullList(res)) + .then(result => { + rsv(result); + // console.log(JSON.stringify(result)); + }) + .catch(err => { + console.log(err) + }) + }) +} + +// Parser() + + module.exports = { + Parser + } \ No newline at end of file diff --git a/lib/auto-git/regex.js b/lib/auto-git/regex.js new file mode 100644 index 0000000..3746411 --- /dev/null +++ b/lib/auto-git/regex.js @@ -0,0 +1,6 @@ +const REG_HEAD = /^diff --git "?(.+)"? "?(.+)"?/; +const BEFORE_REG = /((\.|#)?.*)\s{/; +module.exports = { + REG_HEAD, + BEFORE_REG +} \ No newline at end of file diff --git a/lib/auto-git/temp/diff1.txt b/lib/auto-git/temp/diff1.txt new file mode 100644 index 0000000..8d48e90 --- /dev/null +++ b/lib/auto-git/temp/diff1.txt @@ -0,0 +1,211 @@ +diff --git 1.scss 1.scss +index c7b997d..a392025 100644 +--- 1.scss ++++ 1.scss +@@ -1,13 +1,15 @@ + .content { + &.style { + width: 100px; +- height: 100px; + } + .content { + width: 100px; + } ++ .dd { ++ width: 100%; ++ } + } + + .cc { + width: 100px; + } +\ No newline at end of file +diff --git lib/auto-git/1.json lib/auto-git/1.json +index 2003f1e..9e26dfe 100644 +--- lib/auto-git/1.json ++++ lib/auto-git/1.json +@@ -1 +1 @@ +-{"1.scss":" .content {\r &.style {\r width: 100px;\rcontent: '- height: 100px;';\r }\r .content {\r width: 100px;\r }\rcontent: '+ .inner {';\rcontent: '+ width: 100px;';\rcontent: '+ }';\r }\r \r .cc {\r width: 100px;\r }\r"} +\ No newline at end of file ++{} +\ No newline at end of file +diff --git lib/auto-git/2.json lib/auto-git/2.json +index 69d7219..57f8573 100644 +--- lib/auto-git/2.json ++++ lib/auto-git/2.json +@@ -1 +1 @@ +-[[],["diff --git 1.scss 1.scss","index c7b997d..6eb8dff 100644","--- 1.scss","+++ 1.scss","@@ -1,13 +1,15 @@"," .content {"," &.style {"," width: 100px;","- height: 100px;"," }"," .content {"," width: 100px;"," }","+ .inner {","+ width: 100px;","+ }"," }"," "," .cc {"," width: 100px;"," }","\\ No newline at end of file"],["diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js","index d554f8f..9573a67 100644","--- lib/compliestyles/sass-loader.js","+++ lib/compliestyles/sass-loader.js","@@ -1,25 +1,25 @@"," const sass = require('node-sass');"," "," function sassLoader(path) {"," const result = sass.renderSync({"," // file: path,","- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',","+ data: \".content { \\r&.style { \\r width: 100px;\\r// - height: 100px; \\r} \\r .content { \\rwidth: 100px; }\\r// + .inner {\\r// + width: 100px;\\r// + } \\r} \\r.cc { \\rwidth: 100px; \\r}\\r\","," // outputStyle: 'compressed',"," // outFile: '../../1.css',"," // sourceMap: true, // or an absolute or relative (to outFile) path"," importer: function(url, prev, done) {"," // url is the path in import as is, which LibSass encountered."," // prev is the previously resolved path."," // done is an optional callback, either consume it or return value synchronously."," // this.options contains this options hash"," }"," });"," if(result.css) {"," return result.css.toString(\"utf8\");"," }"," return {};"," }"," "," "," "," module.exports = sassLoader;","\\ No newline at end of file",""]] +\ No newline at end of file ++[[],["diff --git lib/auto-git/1.json lib/auto-git/1.json","index 2003f1e..9e26dfe 100644","--- lib/auto-git/1.json","+++ lib/auto-git/1.json","@@ -1 +1 @@","-{\"1.scss\":\" .content {\\r &.style {\\r width: 100px;\\rcontent: '- height: 100px;';\\r }\\r .content {\\r width: 100px;\\r }\\rcontent: '+ .inner {';\\rcontent: '+ width: 100px;';\\rcontent: '+ }';\\r }\\r \\r .cc {\\r width: 100px;\\r }\\r\"}","\\ No newline at end of file","+{}","\\ No newline at end of file"],["diff --git lib/auto-git/2.json lib/auto-git/2.json","index 69d7219..e8b5916 100644","--- lib/auto-git/2.json","+++ lib/auto-git/2.json","@@ -1 +1 @@","-[[],[\"diff --git 1.scss 1.scss\",\"index c7b997d..6eb8dff 100644\",\"--- 1.scss\",\"+++ 1.scss\",\"@@ -1,13 +1,15 @@\",\" .content {\",\" &.style {\",\" width: 100px;\",\"- height: 100px;\",\" }\",\" .content {\",\" width: 100px;\",\" }\",\"+ .inner {\",\"+ width: 100px;\",\"+ }\",\" }\",\" \",\" .cc {\",\" width: 100px;\",\" }\",\"\\\\ No newline at end of file\"],[\"diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js\",\"index d554f8f..9573a67 100644\",\"--- lib/compliestyles/sass-loader.js\",\"+++ lib/compliestyles/sass-loader.js\",\"@@ -1,25 +1,25 @@\",\" const sass = require('node-sass');\",\" \",\" function sassLoader(path) {\",\" const result = sass.renderSync({\",\" // file: path,\",\"- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',\",\"+ data: \\\".content { \\\\r&.style { \\\\r width: 100px;\\\\r// - height: 100px; \\\\r} \\\\r .content { \\\\rwidth: 100px; }\\\\r// + .inner {\\\\r// + width: 100px;\\\\r// + } \\\\r} \\\\r.cc { \\\\rwidth: 100px; \\\\r}\\\\r\\\",\",\" // outputStyle: 'compressed',\",\" // outFile: '../../1.css',\",\" // sourceMap: true, // or an absolute or relative (to outFile) path\",\" importer: function(url, prev, done) {\",\" // url is the path in import as is, which LibSass encountered.\",\" // prev is the previously resolved path.\",\" // done is an optional callback, either consume it or return value synchronously.\",\" // this.options contains this options hash\",\" }\",\" });\",\" if(result.css) {\",\" return result.css.toString(\\\"utf8\\\");\",\" }\",\" return {};\",\" }\",\" \",\" \",\" \",\" module.exports = sassLoader;\",\"\\\\ No newline at end of file\",\"\"]]","\\ No newline at end of file","+[[],[\"diff --git lib/auto-git/1.json lib/auto-git/1.json\",\"index 2003f1e..9e26dfe 100644\",\"--- lib/auto-git/1.json\",\"+++ lib/auto-git/1.json\",\"@@ -1 +1 @@\",\"-{\\\"1.scss\\\":\\\" .content {\\\\r &.style {\\\\r width: 100px;\\\\rcontent: '- height: 100px;';\\\\r }\\\\r .content {\\\\r width: 100px;\\\\r }\\\\rcontent: '+ .inner {';\\\\rcontent: '+ width: 100px;';\\\\rcontent: '+ }';\\\\r }\\\\r \\\\r .cc {\\\\r width: 100px;\\\\r }\\\\r\\\"}\",\"\\\\ No newline at end of file\",\"+{}\",\"\\\\ No newline at end of file\"],[\"diff --git lib/auto-git/2.json lib/auto-git/2.json\",\"index 69d7219..1c432ad 100644\",\"--- lib/auto-git/2.json\",\"+++ lib/auto-git/2.json\",\"@@ -1 +1 @@\",\"-[[],[\\\"diff --git 1.scss 1.scss\\\",\\\"index c7b997d..6eb8dff 100644\\\",\\\"--- 1.scss\\\",\\\"+++ 1.scss\\\",\\\"@@ -1,13 +1,15 @@\\\",\\\" .content {\\\",\\\" &.style {\\\",\\\" width: 100px;\\\",\\\"- height: 100px;\\\",\\\" }\\\",\\\" .content {\\\",\\\" width: 100px;\\\",\\\" }\\\",\\\"+ .inner {\\\",\\\"+ width: 100px;\\\",\\\"+ }\\\",\\\" }\\\",\\\" \\\",\\\" .cc {\\\",\\\" width: 100px;\\\",\\\" }\\\",\\\"\\\\\\\\ No newline at end of file\\\"],[\\\"diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js\\\",\\\"index d554f8f..9573a67 100644\\\",\\\"--- lib/compliestyles/sass-loader.js\\\",\\\"+++ lib/compliestyles/sass-loader.js\\\",\\\"@@ -1,25 +1,25 @@\\\",\\\" const sass = require('node-sass');\\\",\\\" \\\",\\\" function sassLoader(path) {\\\",\\\" const result = sass.renderSync({\\\",\\\" // file: path,\\\",\\\"- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',\\\",\\\"+ data: \\\\\\\".content { \\\\\\\\r&.style { \\\\\\\\r width: 100px;\\\\\\\\r// - height: 100px; \\\\\\\\r} \\\\\\\\r .content { \\\\\\\\rwidth: 100px; }\\\\\\\\r// + .inner {\\\\\\\\r// + width: 100px;\\\\\\\\r// + } \\\\\\\\r} \\\\\\\\r.cc { \\\\\\\\rwidth: 100px; \\\\\\\\r}\\\\\\\\r\\\\\\\",\\\",\\\" // outputStyle: 'compressed',\\\",\\\" // outFile: '../../1.css',\\\",\\\" // sourceMap: true, // or an absolute or relative (to outFile) path\\\",\\\" importer: function(url, prev, done) {\\\",\\\" // url is the path in import as is, which LibSass encountered.\\\",\\\" // prev is the previously resolved path.\\\",\\\" // done is an optional callback, either consume it or return value synchronously.\\\",\\\" // this.options contains this options hash\\\",\\\" }\\\",\\\" });\\\",\\\" if(result.css) {\\\",\\\" return result.css.toString(\\\\\\\"utf8\\\\\\\");\\\",\\\" }\\\",\\\" return {};\\\",\\\" }\\\",\\\" \\\",\\\" \\\",\\\" \\\",\\\" module.exports = sassLoader;\\\",\\\"\\\\\\\\ No newline at end of file\\\",\\\"\\\"]]\",\"\\\\ No newline at end of file\",\"+[[],[\\\"diff --git lib/auto-git/1.json lib/auto-git/1.json\\\",\\\"index 2003f1e..9e26dfe 100644\\\",\\\"--- lib/auto-git/1.json\\\",\\\"+++ lib/auto-git/1.json\\\",\\\"@@ -1 +1 @@\\\",\\\"-{\\\\\\\"1.scss\\\\\\\":\\\\\\\" .content {\\\\\\\\r &.style {\\\\\\\\r width: 100px;\\\\\\\\rcontent: '- height: 100px;';\\\\\\\\r }\\\\\\\\r .content {\\\\\\\\r width: 100px;\\\\\\\\r }\\\\\\\\rcontent: '+ .inner {';\\\\\\\\rcontent: '+ width: 100px;';\\\\\\\\rcontent: '+ }';\\\\\\\\r }\\\\\\\\r \\\\\\\\r .cc {\\\\\\\\r width: 100px;\\\\\\\\r }\\\\\\\\r\\\\\\\"}\\\",\\\"\\\\\\\\ No newline at end of file\\\",\\\"+{}\\\",\\\"\\\\\\\\ No newline at end of file\\\"],[\\\"diff --git lib/auto-git/2.json lib/auto-git/2.json\\\",\\\"index 69d7219..0aaa5d4 100644\\\",\\\"--- lib/auto-git/2.json\\\",\\\"+++ lib/auto-git/2.json\\\",\\\"@@ -1 +1 @@\\\",\\\"-[[],[\\\\\\\"diff --git 1.scss 1.scss\\\\\\\",\\\\\\\"index c7b997d..6eb8dff 100644\\\\\\\",\\\\\\\"--- 1.scss\\\\\\\",\\\\\\\"+++ 1.scss\\\\\\\",\\\\\\\"@@ -1,13 +1,15 @@\\\\\\\",\\\\\\\" .content {\\\\\\\",\\\\\\\" &.style {\\\\\\\",\\\\\\\" width: 100px;\\\\\\\",\\\\\\\"- height: 100px;\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" .content {\\\\\\\",\\\\\\\" width: 100px;\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\"+ .inner {\\\\\\\",\\\\\\\"+ width: 100px;\\\\\\\",\\\\\\\"+ }\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" .cc {\\\\\\\",\\\\\\\" width: 100px;\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\"],[\\\\\\\"diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js\\\\\\\",\\\\\\\"index d554f8f..9573a67 100644\\\\\\\",\\\\\\\"--- lib/compliestyles/sass-loader.js\\\\\\\",\\\\\\\"+++ lib/compliestyles/sass-loader.js\\\\\\\",\\\\\\\"@@ -1,25 +1,25 @@\\\\\\\",\\\\\\\" const sass = require('node-sass');\\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" function sassLoader(path) {\\\\\\\",\\\\\\\" const result = sass.renderSync({\\\\\\\",\\\\\\\" // file: path,\\\\\\\",\\\\\\\"- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',\\\\\\\",\\\\\\\"+ data: \\\\\\\\\\\\\\\".content { \\\\\\\\\\\\\\\\r&.style { \\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\r// - height: 100px; \\\\\\\\\\\\\\\\r} \\\\\\\\\\\\\\\\r .content { \\\\\\\\\\\\\\\\rwidth: 100px; }\\\\\\\\\\\\\\\\r// + .inner {\\\\\\\\\\\\\\\\r// + width: 100px;\\\\\\\\\\\\\\\\r// + } \\\\\\\\\\\\\\\\r} \\\\\\\\\\\\\\\\r.cc { \\\\\\\\\\\\\\\\rwidth: 100px; \\\\\\\\\\\\\\\\r}\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\",\\\\\\\",\\\\\\\" // outputStyle: 'compressed',\\\\\\\",\\\\\\\" // outFile: '../../1.css',\\\\\\\",\\\\\\\" // sourceMap: true, // or an absolute or relative (to outFile) path\\\\\\\",\\\\\\\" importer: function(url, prev, done) {\\\\\\\",\\\\\\\" // url is the path in import as is, which LibSass encountered.\\\\\\\",\\\\\\\" // prev is the previously resolved path.\\\\\\\",\\\\\\\" // done is an optional callback, either consume it or return value synchronously.\\\\\\\",\\\\\\\" // this.options contains this options hash\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" });\\\\\\\",\\\\\\\" if(result.css) {\\\\\\\",\\\\\\\" return result.css.toString(\\\\\\\\\\\\\\\"utf8\\\\\\\\\\\\\\\");\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" return {};\\\\\\\",\\\\\\\" }\\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" \\\\\\\",\\\\\\\" module.exports = sassLoader;\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\",\\\\\\\"\\\\\\\"]]\\\",\\\"\\\\\\\\ No newline at end of file\\\",\\\"+[[],[\\\\\\\"diff --git lib/auto-git/1.json lib/auto-git/1.json\\\\\\\",\\\\\\\"index 2003f1e..aec51b9 100644\\\\\\\",\\\\\\\"--- lib/auto-git/1.json\\\\\\\",\\\\\\\"+++ lib/auto-git/1.json\\\\\\\",\\\\\\\"@@ -1 +1 @@\\\\\\\",\\\\\\\"-{\\\\\\\\\\\\\\\"1.scss\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\\r &.style {\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\rcontent: '- height: 100px;';\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\r .content {\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\rcontent: '+ .inner {';\\\\\\\\\\\\\\\\rcontent: '+ width: 100px;';\\\\\\\\\\\\\\\\rcontent: '+ }';\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\r \\\\\\\\\\\\\\\\r .cc {\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\",\\\\\\\"+{\\\\\\\\\\\\\\\"1.scss\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\\r &.style {\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\r height: 100px;\\\\\\\\\\\\\\\\r background: #ddd;\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\rcontent: '+ .dd {';\\\\\\\\\\\\\\\\rcontent: '+ width: 100px;';\\\\\\\\\\\\\\\\rcontent: '+ }';\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\r \\\\\\\\\\\\\\\\r .cc {\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\r }\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\"],[\\\\\\\"diff --git lib/auto-git/2.json lib/auto-git/2.json\\\\\\\",\\\\\\\"index 69d7219..6e0fb68 100644\\\\\\\",\\\\\\\"--- lib/auto-git/2.json\\\\\\\",\\\\\\\"+++ lib/auto-git/2.json\\\\\\\",\\\\\\\"@@ -1 +1 @@\\\\\\\",\\\\\\\"-[[],[\\\\\\\\\\\\\\\"diff --git 1.scss 1.scss\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"index c7b997d..6eb8dff 100644\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"--- 1.scss\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+++ 1.scss\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"@@ -1,13 +1,15 @@\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" &.style {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"- height: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ .inner {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" .cc {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\"diff --git lib/compliestyles/sass-loader.js lib/compliestyles/sass-loader.js\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"index d554f8f..9573a67 100644\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"--- lib/compliestyles/sass-loader.js\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+++ lib/compliestyles/sass-loader.js\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"@@ -1,25 +1,25 @@\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" const sass = require('node-sass');\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" function sassLoader(path) {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" const result = sass.renderSync({\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // file: path,\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"- data: ' .content { &.style { width: 100px; height: 100px;// - background: #ddd;// + }// + .content {// + width: 100px; } } .cc { width: 100px; }',\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ data: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\".content { \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r&.style { \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r// - height: 100px; \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r} \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r .content { \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rwidth: 100px; }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r// + .inner {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r// + width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r// + } \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r} \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r.cc { \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rwidth: 100px; \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\r\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // outputStyle: 'compressed',\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // outFile: '../../1.css',\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // sourceMap: true, // or an absolute or relative (to outFile) path\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" importer: function(url, prev, done) {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // url is the path in import as is, which LibSass encountered.\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // prev is the previously resolved path.\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // done is an optional callback, either consume it or return value synchronously.\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" // this.options contains this options hash\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" });\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" if(result.css) {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" return result.css.toString(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"utf8\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" return {};\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" module.exports = sassLoader;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]]\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\",\\\\\\\"+[[],[\\\\\\\\\\\\\\\"diff --git 1.scss 1.scss\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"index 94c930a..e32f7a6 100644\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"--- 1.scss\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+++ 1.scss\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"@@ -1,11 +1,14 @@\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" &.style {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" height: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" background: #ddd;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ .dd {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+ }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" .cc {\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\"diff --git lib/auto-git/1.json lib/auto-git/1.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"index fb3c6fb..9cb5257 100644\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"--- lib/auto-git/1.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+++ lib/auto-git/1.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"@@ -1,3 +1 @@\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"-{\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .content { &.style { width: 100px; height: 100px; background: #ddd; }+} .cc { width: 100px; }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"-}\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .content { &.style { width: 100px; height: 100px; background: #ddd; }+ .dd {+ width: 100px;+ } } .cc { width: 100px; }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\"diff --git lib/auto-git/2.json lib/auto-git/2.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"index 699fecb..0c2ad4d 100644\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"--- lib/auto-git/2.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+++ lib/auto-git/2.json\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"@@ -1 +1 @@\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"-[[],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git 1.scss 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index b408236..94c930a 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"@@ -1,10 +1,11 @@\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .content {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" &.style {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" height: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" background: #ddd;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .cc {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" width: 100px;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git lib/auto-git/parser.js lib/auto-git/parser.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index 073d8ff..27b1e0d 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- lib/auto-git/parser.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ lib/auto-git/parser.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"@@ -1,100 +1,129 @@\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" * 将diff得到的文件转为二进制流接着字符串解析为json\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" */\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"-const {readFile} = require('fs');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+const {readFile, writeFile} = require('fs');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {REG_HEAD} = require('./regex'); // 辅助的正则表达式\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {INCLUDE_FILES} = require('./type');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function read(path) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return new Promise((rsv, rjt) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" readFile(path, (err, data) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (err) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.error('======= 读取文件失败!您可能误删了临时文件 =======');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rjt(err);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rsv(data.toString().split('\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n'));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" * @desc 将diff分块文件\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" * @param {Array} arr \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" * @resolve {Array}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" */\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function parsertoBlock(arr) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return new Promise((rsv, rjt) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"-\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const lines = arr;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let styleBlocks = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- let currentLine = '';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ let currentLine = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" for (let i = 0, len = lines.length; i < len; i++) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const line = lines[i];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let values;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // 判断head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (values = REG_HEAD.exec(line)) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" styleBlocks.push(currentLine);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- currentLine = '';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ currentLine = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- currentLine += line;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ currentLine.push(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" styleBlocks.push(currentLine);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ writeFile('2.json', JSON.stringify(styleBlocks), err=> {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ if(err) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ console.log(err);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ } else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ console.log('success');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rsv(styleBlocks);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function parsertoJson(arr) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let files = arr;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- let data = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // let data = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let temp = {};\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" for(let j = 0; j < files.length; j++) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let lines = files[j];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ let name;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if(lines === '') {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" for(let i = 0, len = lines.length; i < len; i++) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const line = lines[i];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // console.log(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ let values;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ console.log(JSON.stringify(line));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // return;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (values = REG_HEAD.exec(line)) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const type = values[1].split('.')[1];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ console.log(type); \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (INCLUDE_FILES.indexOf(type) === -1) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" break;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- data.length > 0 && data.push(temp);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- temp = {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- from: values[1],\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- to: values[2]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- };\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ console.log(JSON.stringify(values))\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ name = values[2];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ temp[name] = '';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // data.length > 0 && data.push(temp);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // temp = {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // from: values[1],\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // to: values[2]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // };\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- // 判断 ---\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- if (line.indexOf('--- ') === 0) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"- console.log(line.slice(4));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // 判断不加入line的情况\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ if (line.indexOf('--- ') === 0 || line.indexOf('+++ ') === 0 || line.indexOf('@@ ') === 0 || line.indexOf('index ') === 0 || line.indexOf('//') === 0) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // console.log(1);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ if(name) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ temp[name] += line;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ // console.log(JSON.stringify(temp));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ writeFile('1.json', JSON.stringify(temp), err=> {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ if(err) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ console.log(err);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ } else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ console.log('success');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function Parser() {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return new Promise((rsv, rjt) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" read('./temp/diff.txt')\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .then(arr => parsertoBlock(arr))\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+ .then(arr => parsertoJson(arr))\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .then(result => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(result)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .catch(err => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(err)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" Parser()\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // module.exports = {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // Parser\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"]]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"+[[],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git 1.scss 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index 94c930a..e32f7a6 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- 1.scss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ 1.scss\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"],[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"diff --git lib/auto-git/parser.js lib/auto-git/parser.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"index ae3d0d0..2e71fd8 100644\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"--- lib/auto-git/parser.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"+++ lib/auto-git/parser.js\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"@@ -1,130 +1,130 @@\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" * 将diff得到的文件转为二进制流接着字符串解析为json\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" */\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {readFile, writeFile} = require('fs');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {REG_HEAD} = require('./regex'); // 辅助的正则表达式\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const {INCLUDE_FILES} = require('./type');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function read(path) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return new Promise((rsv, rjt) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" readFile(path, (err, data) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (err) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.error('======= 读取文件失败!您可能误删了临时文件 =======');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rjt(err);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rsv(data.toString().split('\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n'));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" /**\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" * @desc 将diff分块文件\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" * @param {Array} arr \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" * @resolve {Array}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" */\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function parsertoBlock(arr) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return new Promise((rsv, rjt) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const lines = arr;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let styleBlocks = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let currentLine = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" for (let i = 0, len = lines.length; i < len; i++) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const line = lines[i];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let values;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // 判断head\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (values = REG_HEAD.exec(line)) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" styleBlocks.push(currentLine);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" currentLine = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" currentLine.push(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" currentLine.push(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" styleBlocks.push(currentLine);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" writeFile('2.json', JSON.stringify(styleBlocks), err=> {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if(err) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(err);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" } else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log('success');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" rsv(styleBlocks);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function parsertoJson(arr) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let files = arr;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // let data = [];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let temp = {};\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" for(let j = 0; j < files.length; j++) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let lines = files[j];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let name;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if(lines === '') {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" for(let i = 0, len = lines.length; i < len; i++) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const line = lines[i];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // console.log(line);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" let values;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // console.log(JSON.stringify(line));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // return;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (values = REG_HEAD.exec(line)) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" const type = values[1].split('.')[1];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(type); \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (INCLUDE_FILES.indexOf(type) === -1) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" break;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(JSON.stringify(values))\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" name = values[2];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" temp[name] = '';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // data.length > 0 && data.push(temp);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // temp = {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // from: values[1],\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // to: values[2]\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // };\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // 判断不加入line的情况\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if (line.indexOf('--- ') === 0 || line.indexOf('+++ ') === 0 || line.indexOf('@@ ') === 0 || line.indexOf('index ') === 0 || line.indexOf('//') === 0) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // console.log(1);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" continue;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if(name) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" temp[name] += line;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // console.log(JSON.stringify(temp));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" writeFile('1.json', JSON.stringify(temp), err=> {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" if(err) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(err);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" } else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log('success');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" }\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" function Parser() {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" return new Promise((rsv, rjt) => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" read('./temp/diff.txt')\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .then(arr => parsertoBlock(arr))\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .then(arr => parsertoJson(arr))\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" .then(result => {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" console.log(result)\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" })\\\\\\\\\\\\\\\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"]]\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"]]\\\\\\\",\\\\\\\"\\\\\\\\\\\\\\\\ No newline at end of file\\\\\\\",\\\\\\\"\\\\\\\"]]\\\",\\\"\\\\\\\\ No newline at end of file\\\",\\\"\\\"]]\",\"\\\\ No newline at end of file\",\"\"]]","\\ No newline at end of file",""]] +\ No newline at end of file +diff --git lib/auto-git/index.js lib/auto-git/index.js +index f1e81e6..8a8c737 100644 +--- lib/auto-git/index.js ++++ lib/auto-git/index.js +@@ -1,14 +1,14 @@ + const { runCommand } = require('./command.js'); +-const { parser } = require('./parser.js'); ++// const { parser } = require('./parser.js'); + + function AutoGit() { + runCommand('sh', [`${__dirname}/bin/gitdiff.sh`]) + .then(r => { + + }) + .catch(err => { + console.log(err); + }) + } + + AutoGit() +diff --git lib/auto-git/parser.js lib/auto-git/parser.js +index 452f23e..ae3d0d0 100644 +--- lib/auto-git/parser.js ++++ lib/auto-git/parser.js +@@ -1,142 +1,130 @@ + /** + * 将diff得到的文件转为二进制流接着字符串解析为json + */ + + const {readFile, writeFile} = require('fs'); + const {REG_HEAD} = require('./regex'); // 辅助的正则表达式 + const {INCLUDE_FILES} = require('./type'); + + function read(path) { + return new Promise((rsv, rjt) => { + readFile(path, (err, data) => { + if (err) { + console.error('======= 读取文件失败!您可能误删了临时文件 ======='); + rjt(err); + } + rsv(data.toString().split('\n')); + }) + }) + } + /** + * @desc 将diff分块文件 + * @param {Array} arr + * @resolve {Array} + */ + function parsertoBlock(arr) { + return new Promise((rsv, rjt) => { + const lines = arr; + + let styleBlocks = []; + let currentLine = []; + + for (let i = 0, len = lines.length; i < len; i++) { + const line = lines[i]; + let values; + // 判断head + if (values = REG_HEAD.exec(line)) { + console.log(line); + styleBlocks.push(currentLine); + currentLine = []; + currentLine.push(line); + continue; + } + currentLine.push(line); + + } + styleBlocks.push(currentLine); + writeFile('2.json', JSON.stringify(styleBlocks), err=> { + if(err) { + console.log(err); + } else { + console.log('success'); + } + }) + rsv(styleBlocks); + }) + } + + function parsertoJson(arr) { + let files = arr; + // let data = []; + let temp = {}; + for(let j = 0; j < files.length; j++) { + let lines = files[j]; + let name; + if(lines === '') { + continue; + } + for(let i = 0, len = lines.length; i < len; i++) { +- let line = lines[i]; ++ const line = lines[i]; + // console.log(line); + let values; + // console.log(JSON.stringify(line)); + // return; + if (values = REG_HEAD.exec(line)) { + const type = values[1].split('.')[1]; + console.log(type); + + if (INCLUDE_FILES.indexOf(type) === -1) { + break; + } + console.log(JSON.stringify(values)) + name = values[2]; + temp[name] = ''; + // data.length > 0 && data.push(temp); + // temp = { + // from: values[1], + // to: values[2] + // }; + continue; + } + // 判断不加入line的情况 +- if (line.indexOf('--- ') === 0 || line.indexOf('+++ ') === 0 || line.indexOf('@@ ') === 0 || line.indexOf('index ') === 0 || line.indexOf('//') === 0 || line.indexOf('\\') === 0) { ++ if (line.indexOf('--- ') === 0 || line.indexOf('+++ ') === 0 || line.indexOf('@@ ') === 0 || line.indexOf('index ') === 0 || line.indexOf('//') === 0) { + // console.log(1); + continue; + } +- if(line.indexOf('-') === 0) { +- console.log('-',line); +- // line = line.trim().replace(/^\-/, '// -'); +- line = `content: '${line}';`; +- console.log('1-',line); +- } +- if(line.indexOf('+') === 0) { +- console.log('+',line); +- // line = line.trim().replace(/^\+/, '// +'); +- line = `content: '${line}';`; +- console.log('1+',line); +- } + if(name) { +- temp[name] += line+'\r'; ++ temp[name] += line; + } + } + } + + // console.log(JSON.stringify(temp)); + writeFile('1.json', JSON.stringify(temp), err=> { + if(err) { + console.log(err); + } else { + console.log('success'); + } + }) + } + + function Parser() { + return new Promise((rsv, rjt) => { + read('./temp/diff.txt') + .then(arr => parsertoBlock(arr)) + .then(arr => parsertoJson(arr)) + .then(result => { + console.log(result) + }) + .catch(err => { + console.log(err) + }) + }) + } + + Parser() + + // module.exports = { + // Parser + // } +\ No newline at end of file diff --git a/lib/auto-git/type.js b/lib/auto-git/type.js new file mode 100644 index 0000000..0cdf8e2 --- /dev/null +++ b/lib/auto-git/type.js @@ -0,0 +1,5 @@ +const INCLUDE_FILES = ['css', 'sass', 'scss', 'less', 'styl']; + +module.exports = { + INCLUDE_FILES, +} \ No newline at end of file diff --git a/lib/combine/index.js b/lib/combine/index.js new file mode 100644 index 0000000..8bb3c0a --- /dev/null +++ b/lib/combine/index.js @@ -0,0 +1,85 @@ +const autoGit = require('../auto-git/index'); +const cssControl = require('../index'); +const {IGNORE_DEP} = require('../const'); +const path = require('path'); +const {ObjRnToArr} = require('../utils/tools'); +const {writeFile} = require('../utils/tools'); +/** + * + * @desc 合并diff和依赖关系 + * @param {Url} root + * @param {String} type single | html + */ +function main (root, type, workname) { + const relation = cssControl(root, type, workname); + // res -> diff + // relation -> 依赖关系 + autoGit().then(res => { + console.log(reverse(relation)); + console.log(JSON.stringify(res)); + + + const ocom = combine(reverse(relation), res); + const aRcom = ObjRnToArr(ocom); + console.log(JSON.stringify(aRcom)); + writeFile('./examples/dist/export.json', JSON.stringify(aRcom)).then(res => { + console.log('out success'); + }) + }).catch(e => { + console.log(e); + }); +} + + +/** + * + * @desc 讲js->css目录进行反转 + * @param {Object} rel + * @returns + */ +function reverse(rel) { + const cssRel = {}; + for(let i in rel) { + rel[i].map((item) => { + let iType = path.extname(item); + if(IGNORE_DEP.includes(iType)) { + if(cssRel.hasOwnProperty(item)) { + cssRel[item].push(i); + } else { + cssRel[item] = []; + cssRel[item].push(i); + } + } + }) + } + return cssRel; +} +/** + * + * @desc 将依赖树和diff合并 + * @param {Object} rel + * @param {Object} oDiff + * @returns + */ +function combine(rel, oDiff) { + const oGroupList = {}; + oDiff.map(csitem => { + if(rel.hasOwnProperty(csitem.label)) { + rel[csitem.label].map(jsli => { + if(oGroupList.hasOwnProperty(jsli)) { + oGroupList[jsli].groups.push(csitem); + } else { + oGroupList[jsli] = { + label: jsli, + groups: [] + } + oGroupList[jsli].groups.push(csitem); + } + }) + } + }); + return oGroupList; +} + + +module.exports = main; \ No newline at end of file diff --git a/lib/compliestyles/parse-css.js b/lib/compliestyles/parse-css.js deleted file mode 100644 index 3308166..0000000 --- a/lib/compliestyles/parse-css.js +++ /dev/null @@ -1,5 +0,0 @@ -const sassLoader = require('./sass-loader'); - -const css = sassLoader('../../1.scss'); - -console.log(css); \ No newline at end of file diff --git a/lib/compliestyles/sass-loader.js b/lib/compliestyles/sass-loader.js deleted file mode 100644 index c37b71b..0000000 --- a/lib/compliestyles/sass-loader.js +++ /dev/null @@ -1,25 +0,0 @@ -const sass = require('node-sass'); - -function sassLoader(path) { - const result = sass.renderSync({ - file: path, - // data: 'body{background:blue; a{color:black;}}', - // outputStyle: 'compressed', - // outFile: '../../1.css', - // sourceMap: true, // or an absolute or relative (to outFile) path - importer: function(url, prev, done) { - // url is the path in import as is, which LibSass encountered. - // prev is the previously resolved path. - // done is an optional callback, either consume it or return value synchronously. - // this.options contains this options hash - } - }); - if(result.css) { - return result.css.toString("utf8"); - } - return {}; -} - - - -module.exports = sassLoader; \ No newline at end of file diff --git a/lib/diff/depHtmlToCss.js b/lib/diff/depHtmlToCss.js deleted file mode 100644 index c1a637a..0000000 --- a/lib/diff/depHtmlToCss.js +++ /dev/null @@ -1,46 +0,0 @@ -// 将css为属性,转化为html-css结构 -// [ { name: '\\css\\1.css', -// attribute: [ [Object], [Object], [Object], [Object] ], -// influ: [ '\\html\\index1.html' ] }, -// { name: '\\css\\3.css', -// attribute: [ [Object] ], -// influ: [ '\\html\\index2.html' ] } ] -const filterattr = require('./filterattr'); -/** - * - * - * @param {String} root 执行目录 - * @param {Array} influence 加上影响文件的数组 - * @returns - */ -function dephtmltocss(root, influence) { - const htmlToCss = {}; - influence.forEach((item, index) => { - // 只对有影响的css做处理 - const name = item.name; - let attr = item.attribute; - if(item.hasOwnProperty('influ')) { - item.influ.map((l, k) => { - // 判断是否存在对应的html/js - if(!htmlToCss[l]) { - htmlToCss[l] = []; - } - // 加入模版过滤 - attr = filterattr(attr, l, root); - // 如果过滤后attr - if(attr.length > 0) { - htmlToCss[l].push({ - name, - attr - }) - } - }) - } - }) - return htmlToCss; -} - - - - -module.exports = dephtmltocss; \ No newline at end of file diff --git a/lib/diff/filterattr.js b/lib/diff/filterattr.js deleted file mode 100644 index 49e3e04..0000000 --- a/lib/diff/filterattr.js +++ /dev/null @@ -1,15 +0,0 @@ -// 1.过滤属性 -// 2.去对应的模版解析寻找过滤条件 -/** - * - * - * @param {Array} 当前的css属性 - * @param {Obejct} filename 遍历文件 - * @param {String} root 执行目录 - * @returns - */ -function filterattr(attr, filename, root) { - return attr; -} - -module.exports = filterattr; \ No newline at end of file diff --git a/lib/diff/index.js b/lib/diff/index.js deleted file mode 100644 index 8b180db..0000000 --- a/lib/diff/index.js +++ /dev/null @@ -1,61 +0,0 @@ -const root = process.cwd(); - -const realtionTree = { - "\\html\\index1.html": ["\\css\\1.css", "\\css\\2.css"], - "\\html\\index2.html": ["\\css\\3.css", "\\css\\4.css"] -}; - -const diffData = [{ - "name": "\\css\\1.css", - "attribute": [{ - "name": ".content", - "content": { - "height": "60px", - "width": "60px" - } - }, - { - "name": ".inner-content", - "content": { - "height": "60px", - "width": "60px" - } - }, - { - "name": ".inner-button", - "content": { - "height": "60px", - "width": "60px" - } - }, - { - "name": ".inner-span", - "content": { - "height": "60px", - "width": "60px" - } - } - ] -}, { - "name": "\\css\\3.css", - "attribute": [{ - "name": ".inner-span", - "content": { - "height": "60px", - "width": "60px" - } - }] -}]; - -const traverse = require("./traverse"); -const exportFile = require('../exports/export'); - -const htmltocssTree = traverse(root, realtionTree, diffData); - -console.log(htmltocssTree); -exportFile(htmltocssTree); - - - -// console.log(JSON.stringify(exportjson)); - diff --git a/lib/diff/traverse.js b/lib/diff/traverse.js deleted file mode 100644 index 47ee38e..0000000 --- a/lib/diff/traverse.js +++ /dev/null @@ -1,65 +0,0 @@ -const depHTmlToCss = require('./depHTmlToCss'); -/** - * - * - * @param {String} root 运行环境目录 - * @param {Object} realtionTree 文件关系树 - * @param {Array} diffData commit不同文件 - */ -function traverse(root, realtionTree, diffData) { - diffData = diffData || []; - const influence = influenceFile(realtionTree, diffData); - const dephtml2css = depHTmlToCss(root, influence); - // 此时dephtml2css结构 - // { - // "./src/1.js": [{'./src/1.css':[...]}] - // } - return dephtml2css; -} - -/** - * - * - * @param {Object} realtionTree 文件关系树 - * @param {Array} diffData commit不同文件 - */ -function influenceFile(realtionTree, diffData) { - return diffData.map((item, index) => { - const hasList = hasThisFile(realtionTree, item.name); - if(hasList.length > 0) { - // 如果存在影响对应的文件 - item["influ"] = hasList; - return item; - } - return item; - }); - // return diffData.reduce((pre, cur, index, array) => { - // const hasList = hasThisFile(cur.name); - // if(hasList.length > 0) { - // // 如果存在影响对应的文件 - // pre[cur.name] = hasList; - // return pre; - // } - // return pre; - // }, {}); -} - -/** - * - * - * @param {Object} realtionTree 被查询对象 - * @param {String} item 需要查询的url - * @returns {Array} 返回查询结果集合 - */ -function hasThisFile(realtionTree, item) { - const hasList = []; - for(let i in realtionTree) { - if(realtionTree[i].indexOf(item) > -1) { - hasList.push(i); - } - } - return hasList; -} - -module.exports = traverse; - diff --git a/lib/exports/export.js b/lib/exports/export.js deleted file mode 100644 index 08f28c5..0000000 --- a/lib/exports/export.js +++ /dev/null @@ -1,33 +0,0 @@ -// 导出可视化数据 -const {writeFile} = require('../utils/tools'); -function exportFile(htmltocssTree) { - const map = []; - for(var i in htmltocssTree) { - const firstobj = {}; - map.push(firstobj); - firstobj.label = i; - firstobj.groups = []; - htmltocssTree[i].map((item, index)=> { - const secondobj = {}; - firstobj.groups.push(secondobj); - secondobj.label = item.name; - secondobj.groups = []; - item.attr.map((l, k) => { - const thirdobj = {}; - secondobj.groups.push(thirdobj); - thirdobj.label = l.name; - }) - }) - } - writeFile('./lib/data/export.json', JSON.stringify(map)) - .then(res => { - if(res === 'success') { - console.log('export!'); - } - }).catch(err => { - console.log(err); - }) - // return map; -} - -module.exports = exportFile; \ No newline at end of file diff --git a/lib/formatData.js b/lib/formatData.js index f22400f..3177ade 100644 --- a/lib/formatData.js +++ b/lib/formatData.js @@ -1,21 +1,23 @@ -const path = require('path'); -const remRootDir = require('./remRootDir'); - -function formatData(links, res, dir) { - const realLinks = []; - links.forEach((item) => { - item.target = path.resolve(item.source, '..', item.target); - item.source = remRootDir(item.source, dir); - - for(let i = 0; i < res.pathname.length; i++) { - if(res.pathname[i].indexOf(item.target) !== -1) { - item.target = remRootDir(res.pathname[i], dir); - realLinks.push(item); - break; - } - } - }) - return realLinks; -} - -module.exports = formatData; +const path = require('path'); +const remRootDir = require('./remRootDir'); + +function formatData(links, res, dir, workname) { + const realLinks = []; + // console.log(res); + // console.log(links); + links.forEach((item) => { + item.target = path.resolve(item.source, '..', item.target); + item.source = remRootDir(item.source, dir, workname); + + for(let i = 0; i < res.pathname.length; i++) { + if(res.pathname[i].indexOf(item.target) !== -1) { + item.target = remRootDir(res.pathname[i], dir, workname); + realLinks.push(item); + break; + } + } + }) + return realLinks; +} + +module.exports = formatData; diff --git a/lib/index.js b/lib/index.js index de01a21..6e93aac 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4,7 +4,7 @@ const formatData = require('./formatData'); const connatData = require('./connatData'); const uniq = require('./uniq'); -function cssControl(root, type) { +function cssControl(root, type, workname) { // 遍历完的目录 const res = readFile(root); // 遍历依赖关系 @@ -12,11 +12,12 @@ function cssControl(root, type) { // 处理依赖的重复操作 const arr = uniq(resDep); // 将依赖关系去掉目录 - const links = formatData(arr, res, root); + const links = formatData(arr, res, root, workname); // 讲依赖树形输出 const realtionTree = connatData(links); - console.log(realtionTree); + // console.log(realtionTree); + return realtionTree; } module.exports = cssControl; diff --git a/lib/remRootDir.js b/lib/remRootDir.js index af63916..e016e73 100644 --- a/lib/remRootDir.js +++ b/lib/remRootDir.js @@ -1,19 +1,22 @@ -var path = require('path'); -var os = require('os'); - -function remRootDir(str,dir) { - var root = path.resolve(dir), - rootReg, - result = ''; - if(os.platform() === 'win32') { - root = root.replace(/\\/g, '\\\\'); - rootReg = new RegExp(root, 'g'); - } else { - rootReg = new RegExp(root + '/', 'g'); - } - result = str.replace(rootReg, ''); - - return result; -} - +var path = require('path'); +var os = require('os'); + +function remRootDir(str, dir, workname) { + var root = path.resolve(dir), + rootReg, + result = ''; + if(os.platform() === 'win32') { + root = root.replace(/\\/g, '\\\\'); + rootReg = new RegExp(root, 'g'); + } else { + rootReg = new RegExp(root + '/', 'g'); + } + result = str.replace(rootReg, ''); + + result = path.join(workname, result); + + result = result.replace(/\\/g, '/'); + return result; +} + module.exports = remRootDir; \ No newline at end of file diff --git a/lib/utils/tools.js b/lib/utils/tools.js index a6f5914..325200b 100644 --- a/lib/utils/tools.js +++ b/lib/utils/tools.js @@ -30,8 +30,17 @@ function isTypeOf(object) { return type.toLowerCase(); } +function ObjRnToArr(o) { + const arr = []; + for(let i in o) { + arr.push(o[i]); + } + return arr; +} + module.exports = { isTypeOf, readFile, - writeFile + writeFile, + ObjRnToArr } \ No newline at end of file diff --git a/package.json b/package.json index 5e316b5..49cdbd3 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,8 @@ }, "devDependencies": { "jest": "^22.1.1", - "node-sass": "^4.7.2" + "js-beautify": "^1.7.5", + "node-sass": "^4.7.2", + "optimist": "^0.6.1" } } diff --git a/test-webpack/index.js b/test-webpack/index.js index d8ec421..2a6f64d 100644 --- a/test-webpack/index.js +++ b/test-webpack/index.js @@ -1,5 +1,6 @@ const a = require('./src/commponent/demo.js'); require('./src/css/1.css'); require('../lib/css-control'); +require('./src/css/1.scss'); console.log(a); \ No newline at end of file diff --git a/test-webpack/src/css/1.scss b/test-webpack/src/css/1.scss new file mode 100644 index 0000000..a392025 --- /dev/null +++ b/test-webpack/src/css/1.scss @@ -0,0 +1,15 @@ +.content { + &.style { + width: 100px; + } + .content { + width: 100px; + } + .dd { + width: 100%; + } +} + +.cc { + width: 100px; +} \ No newline at end of file