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

Support for a shared src/files configuration #11

Open
pierceray opened this issue Dec 5, 2015 · 3 comments
Open

Support for a shared src/files configuration #11

pierceray opened this issue Dec 5, 2015 · 3 comments

Comments

@pierceray
Copy link
Contributor

In a lot of plugins I have seen there is a concept of a shared options/files in the Gruntfile.js. The location of my sass files doesn't really change, but my config options do change per target (e.g. dev vs. prod). It would be nice to support this.

I'm not sure of the reason, but most use "files" for the shared portions, and "src" for the targets.

An example Grunt config might look like:

wellington: {
    files: [
        'src/sass/**/*.scss'
    ],
    dist: {
        options: {
            p: 'src/sass',
            b: 'dist/css',
            d: 'dist/img',
            font: 'font-face',
            gen: 'dist/img/sprites'
        }
    },
    dev: {
        src: [
            'src/path/to/more/files/**/*.scss'
        ],
        options: {
            p: 'src/sass',
            b: 'src/css',
            d: 'src/sprites',
            font: 'font-face',
            gen: 'src/img/sprites'
        }
    }
};
@drewwells
Copy link
Member

So depending on your environment, the source files changes?

@pierceray
Copy link
Contributor Author

Actually opposite of that. The source stays the same but output destination changes.

Ray Pierce

Sent from my iPhone

On Dec 5, 2015, at 1:31 AM, Drew Wells notifications@github.com wrote:

So depending on your environment, the source files changes?


Reply to this email directly or view it on GitHub.

@drewwells
Copy link
Member

Ahh, so we need some sort of build environment variable. If I recall correctly, grunt has some support for these. wt has smart or fast cache busting strategies now, that might be useful for environment specific builds too.

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

No branches or pull requests

2 participants