-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sync problem #35
Fix sync problem #35
Conversation
@@ -15,7 +15,8 @@ describe('styled-jsx-plugin-postcss', () => { | |||
|
|||
it('works with placeholders', () => { | |||
assert.equal( | |||
plugin('p { color: %%styled-jsx-placeholder-0%%; & img { display: block; } } %%styled-jsx-placeholder-1%%'), 'p { color: %%styled-jsx-placeholder-0%% } p img { display: block; } %%styled-jsx-placeholder-1%%' | |||
plugin('p { color: %%styled-jsx-placeholder-0%%; & img { display: block; } } %%styled-jsx-placeholder-1%%') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add a test where the css has quotes and other characters that could be problematic when stringifying to JSON
index.js
Outdated
settingsArg = JSON.stringify(settings).replace(/\"/g,`\\"`) | ||
const result = childProcess.execSync(`node ${__dirname}/processor.js "${cssWithPlaceholdersArg}" "${settingsArg}"`, | ||
{ encoding: 'utf8', maxBuffer: 50 * 1024 * 1024 }) | ||
const result = execSync(`node ${path.resolve(__dirname, "processor.js")}`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit you can use
spawnSync(path.resolve(__dirname, "processor.js"), options)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok i commited
@tldrd0117 awesome thank you a lot for this contribution! I released this changes as 3.0.0 |
I used execSync