Skip to content

Commit

Permalink
Merge pull request #1085 from junaidrsd/fix-exclude-global-styles-by-…
Browse files Browse the repository at this point in the history
…parameter

Fix #1082 exclude global styles by parameter
  • Loading branch information
varya authored May 8, 2017
2 parents 4321368 + 2eab9b6 commit 3888ecf
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 1,731 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
npm-debug.log
.sass-cache
lib/app/js/components
lib/app/css/styleguide-app.css
lib/dist
demo-output
phantomjs.log
Expand Down
19 changes: 2 additions & 17 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ gulp.task('js:app', () => {
.pipe(gulp.dest(distPath + '/js'));
});

/*jshint camelcase: false */
var excludeDefaultStyles = process.env.npm_config_excludeDefaultStyles || false;

gulp.task('js:vendor', ['bower'], () => {
return gulp.src(['lib/app/js/vendor/**/*.js'].concat(mainBowerFiles({filter: /\.js/})))
.pipe(plumber())
Expand All @@ -50,7 +47,7 @@ gulp.task('bower', () => {
return bower();
});

gulp.task('copy:css', ['build:styleguide-app'], () => {
gulp.task('copy:css', () => {
return gulp.src('lib/app/css/**/*')
.pipe(gulp.dest(distPath + '/css'));
});
Expand Down Expand Up @@ -94,6 +91,7 @@ gulp.task('dev:generate', () => {
rootPath: outputPath,
overviewPath: 'README.md',
styleVariables: 'lib/app/css/_styleguide_variables.css',
excludeDefaultStyles: false,
parsers: {
css: 'postcss'
}
Expand Down Expand Up @@ -127,19 +125,6 @@ gulp.task('dev:applystyles', () => {
.pipe(gulp.dest(outputPath));
});

gulp.task('build:styleguide-app', () => {
var srcFiles = ['lib/app/css/_fontpath_and_mixin_definition.css'];

if (!excludeDefaultStyles) {
srcFiles.push('lib/app/css/_styleguide_default_styles.css');
}

srcFiles.push('lib/app/css/_custom_styles_mixin.css');
return gulp.src(srcFiles)
.pipe(concat('lib/app/css/styleguide-app.css'))
.pipe(gulp.dest('.'));
});

gulp.task('dev', ['dev:doc', 'dev:static', 'dev:applystyles'], () => {
//Do intial full build and create styleguide
runSequence('build:dist', 'dev:generate');
Expand Down
Loading

0 comments on commit 3888ecf

Please sign in to comment.