Skip to content
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

the 'data' is overwritten #10

Open
yanhaijing opened this issue Nov 30, 2018 · 1 comment
Open

the 'data' is overwritten #10

yanhaijing opened this issue Nov 30, 2018 · 1 comment

Comments

@yanhaijing
Copy link

yanhaijing commented Nov 30, 2018

I want to inject some variables into all scss file, but i found the 'data' is overwritten

opt = Object.assign({
        indentWidth: 4,
        omitSourceMapUrl: true,
        outputStyle: 'expanded',
        sourceMap: true,
        sourceMapContents: true
    }, opt, {
        data: css.css,
        file: result.opts.from,
        outFile: result.opts.to
    })

Instead of overwritten, try concat

opt = Object.assign({
        indentWidth: 4,
        omitSourceMapUrl: true,
        outputStyle: 'expanded',
        sourceMap: true,
        sourceMapContents: true
    }, opt, {
        data: [opt.data, css.css].join('\n'),
        file: result.opts.from,
        outFile: result.opts.to
    })
@yanhaijing
Copy link
Author

???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant