Giter Club home page Giter Club logo

Comments (9)

wardpeet avatar wardpeet commented on July 18, 2024 1

@lhtdesignde this should fix the issue #42

from grunt-csscomb.

noahcooper avatar noahcooper commented on July 18, 2024 1

Fixed in v4.0.0.

from grunt-csscomb.

t32k avatar t32k commented on July 18, 2024

Yes, you can already do :)

Please write code as follows.

grunt.initConfig({
    csscomb: {
        dynamic_mappings: {
            expand: true,
            cwd: '/assets/css/',
            src: ['*.css'],
            dest: '/assets/css/'
        }
    }
});

Add description on Readme.md.

from grunt-csscomb.

tonyganch avatar tonyganch commented on July 18, 2024

@t32k, I think the question was not so much about the support as about syntax: now you need to write 4 lines and @oswaldoacauan proposes doing the same thing with 1 line of code.

from grunt-csscomb.

t32k avatar t32k commented on July 18, 2024

@tonyganch Oh, I see. That's what it means...
OK, I'll think it.

from grunt-csscomb.

tonyganch avatar tonyganch commented on July 18, 2024

First of all, @oswaldoacauan is right, there is a comb.processPath() method that can be used for both files and directories.
Also, I'm not sure if anyone uses this plugin and sets destination path different from source one.
I have looked at some examples how people use this grunt task — dest and src are always the same.
So maybe the idea of having one-line settings is good.

But at the same time I don't think that we should invent any new rules of setting paths.
I have taken a look at grunt-contrib-jshint.
There is an example:

grunt.initConfig({
  jshint: {
    all: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js']
  }
});

Maybe we should support the same workflow, so user can add .csscomb.json file to project's root and then add a few lines to Gruntfile:

...
  csscomb: {
    all: ['src/styles']
  }
...

This will process all supported files in src/styles directory and rewrite them if any changes are needed.
And those who want destination path to differ from source can still use current files: {} way.

from grunt-csscomb.

oswaldoacauan avatar oswaldoacauan commented on July 18, 2024

Yep, i think the @tonyganch described workflow is nice.

👍 for less lines in Gruntfile.js

from grunt-csscomb.

paazmaya avatar paazmaya commented on July 18, 2024

👍

from grunt-csscomb.

lhtdesignde avatar lhtdesignde commented on July 18, 2024

+1 is this possible already?

from grunt-csscomb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.