문제

I have a SCSS build working from Grunt that takes files in a "build" directory and outputs them to a "deploy" directory.

Is it possible to split off a single file -- the primary CSS file -- and have it output not only to the deploy directory but also on to a production server? That's the only file that will be changed now that the site is live.

I know Capistrano can do something like this, but it's probably not worth it on our end to add more technology to the workflow. So is it possible within Grunt?

도움이 되었습니까?

해결책

Rather than modify the configuration of your css generation task which could result in a second copy being compiled, you can utilize an additional entry under grunt-copy:

styles: {
    expand: true,
    dot: true,
    cwd: 'deploy/styles',
    dest: 'other/styles',
    src: 'filename.css'
}

Take care that you aren't calling the entire copy task elsewhere in your Gruntfile, and when you call this instance you'll use 'copy:styles'.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top