question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PostCSS does not read and not print file, from folder "src" to "dest"

See original GitHub issue

I installed grunt-postcss and autoprefixer plug-in, but when I try to configure PostCSS with metod of the plug-in load-grunt-config, Autoprefixer and other plug-in, do nothing and do not have allert or error.

This is output from console:

$ grunt postcss
Running "postcss:postcss" (postcss) task
Done.

When I configure grunt in the standard way, PostCSS it works correctly.

This is my postcss.js file, put inside of grunt folder:

module.exports = {
  postcss: {
    options: {
      processors: [
        require('autoprefixer')(),
      ]
    },
    dist: {
      src: '<%= project.stylesheets %>/src/main.css',
      dest: '<%= project.stylesheets %>/dest/main.css'
    }
  }
};

You have no idea how to solve it

Thanks for your help

Mario

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
SolomoN-uacommented, May 12, 2016

Hi @immagimario, ok I’ve checked your https://github.com/immagimario/start-web-site and found a reason: you have mistake in your postcss.js config file, please remove dist, so it should look something like this:

 module.exports = {
  postcss: { // please note: in this case this is target name not plugin name (so you can put any keyword, like: foo or dist or production etc.)
    options: {
      processors: [
        require('autoprefixer')(),
      ]
    },
    src: '<%= project.stylesheets %>/src/main.css',
    dest: '<%= project.stylesheets %>/dest/main.css'
  }
};

Regards, Anatoliy

1reaction
SolomoN-uacommented, May 11, 2016

Hi @immagimario,

please, run grunt postcss --debug, grunt --config-debug and provide output of both commands.

Regards, Anatoliy

Read more comments on GitHub >

github_iconTop Results From Across the Web

PostCSS does not read and not print file, from folder "src" to ...
When I configure grunt in the standard way, PostCSS it works correctly. This is my postcss.js file, put inside of grunt folder:.
Read more >
Grunt with PostCSS does not read and not print file, from folder "src ...
No information is available for this page.
Read more >
PostCSS Plugin Guidelines
Document your plugin in English. PostCSS plugins must have their README.md wrote in English. Do not be afraid of your English skills, as...
Read more >
Output Management - webpack
Now run an npm run build and inspect the /dist folder. If everything went well you should now only see the files generated...
Read more >
What is PostCSS? How to Use Plugins to Automate CSS Tasks
PostCSS is a Node.js tool that transforms your styles using JavaScript plugins. It generates more downloads per week on NPM than other CSS ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found