forked from andywer/postcss-debug
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaner separation of mock data for webdebugger + easier dev setup
- Loading branch information
Andy Wermke
committed
May 17, 2016
1 parent
952c830
commit feac1d5
Showing
7 changed files
with
102 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
build/*.map | ||
node_modules/ | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
build/*.map | ||
node_modules/ | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict' | ||
|
||
var fs = require('fs') | ||
|
||
var html = fs.readFileSync(__dirname + '/../src/index.html', { encoding: 'utf8' }) | ||
var sampleData = fs.readFileSync(__dirname + '/sample-data.js', { encoding: 'utf8' }) | ||
|
||
fs.writeFileSync(__dirname + '/../build/index.html', html.replace('/* DEBUG_SNAPSHOTS */', sampleData)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
files: [ | ||
{ | ||
path: '/Users/andy/workspace/postcss-debug/test/css/test.css', | ||
// maybe `error` object in here (message + stack trace) (snapshot will also be there in `snapshots`) | ||
snapshots: [ | ||
{ | ||
timestamp: 1462203864674, | ||
prevPlugin: null, | ||
nextPlugin: 'postcss-calc', | ||
content: ` | ||
.test { | ||
color: black; | ||
&:hover { | ||
margin-top: calc(10px + 20px) | ||
} | ||
}` | ||
}, | ||
{ | ||
timestamp: 1462203864674, | ||
prevPlugin: 'postcss-calc', | ||
nextPlugin: 'postcss-nested', | ||
content: ` | ||
.test { | ||
color: black; | ||
&:hover { | ||
margin-top: 30px | ||
} | ||
}` | ||
}, | ||
{ | ||
timestamp: 1462203864674, | ||
prevPlugin: 'postcss-nested', | ||
nextPlugin: null, | ||
content: ` | ||
.test { | ||
color: black | ||
} | ||
.test:hover { | ||
margin-top: 30px | ||
}` | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters