qzh
qzh

Reputation: 68

How to use grunt stylus to compile each file to the original folder?

what i want to do is compile stylus files to the same folder where the stylus file in . like

files: { 'src/**/*.css':'src/**/*.styl']

Even I have try the same config on the documnet https://github.com/gruntjs/grunt-contrib-stylus

options: {
  relativeDest: 'out'
},
files: [{
  src: ['src/components/*/*.styl'],
  ext: '.css'
}]

and failed.

anyone can help me ?

Upvotes: 0

Views: 246

Answers (1)

KZee
KZee

Reputation: 446

Try this:

            files: [{
                expand: true,
                cwd: 'src/components',
                src: ['**/*.styl'],
                dest: 'src/components',
                filter: 'isFile',
                ext: '.css'
            }]

Upvotes: 1

Related Questions