Gruntjs 当通过Bower安装包时,自定义引导(sass)将被其他人覆盖

Gruntjs 当通过Bower安装包时,自定义引导(sass)将被其他人覆盖,gruntjs,bower,bootstrap-sass,Gruntjs,Bower,Bootstrap Sass,我想知道定制引导(sass)的最佳方法,避免在通过Bower安装包时被其他人覆盖 假设我有一个Grunt、Bower和Bootstrap(sass)的项目 在bower.json中,我有一些依赖项作为引导sass: { ... "dependencies": { "bootstrap-sass": "^3.3.7", ... } } 通过Grunt,我安装了Bower dependencies中的所有软件包,这些软件包下载到/Bower_components文件夹中

我想知道定制引导(sass)的最佳方法,避免在通过Bower安装包时被其他人覆盖

假设我有一个Grunt、Bower和Bootstrap(sass)的项目

在bower.json中,我有一些依赖项作为引导sass:

{
  ...
  "dependencies": {
    "bootstrap-sass": "^3.3.7",
    ...
  }
}
通过Grunt,我安装了Bower dependencies中的所有软件包,这些软件包下载到/Bower_components文件夹中。然后将所有scss引导文件从/bower_components/bootstrap sass/assets/stylesheets复制到/sass。我在/sass-wich-imports-bootstrap(@import'bootstrap';)中有一个main.scss文件。最后,将/sass/main.scss编译成/css/main.css。这是我的Grunfile.js:

module.exports = function(grunt) {
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

        'bower-install-simple': {
            prod: {
                options: {
                    production: true
                }
            },
            dev: {
                options: {
                    production: false
                }
            }
        },

        bowercopy: {
            options: {
                srcPrefix: 'bower_components'
            },
            sass: {
                options: {
                    destPrefix: 'sass'
                },
                files: {
                    '_bootstrap.scss': 'bootstrap-sass/assets/stylesheets/_bootstrap.scss',
                    'bootstrap': 'bootstrap-sass/assets/stylesheets/bootstrap/*.scss',
                    'bootstrap/mixins': 'bootstrap-sass/assets/stylesheets/bootstrap/mixins/*.scss'
                }
            },
            ...
        },

        sass: {
            dist: {
                files: {
                    'css/main.css': 'sass/main.scss',
                }
            }
        },

        ...
    });

    grunt.loadNpmTasks('grunt-bower-install-simple');
    grunt.loadNpmTasks('grunt-bowercopy');
    grunt.loadNpmTasks('grunt-contrib-sass');
    ...

    grunt.registerTask('bower', ['bower-install-simple:dev', 'bowercopy']);
    ...
};
所以我想定制引导。例如,我想修改/sass/bootstrap/_variables.scss中的一些变量,并从/sass/_bootstrap.scss中删除一些组件。问题是当其他人通过Bower安装软件包时,自定义引导会被默认引导覆盖

如何保持自定义引导而不被覆盖