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

Bourbon update #115

Merged
merged 10 commits into from
May 16, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 30 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(grunt) {
sass: {
options: {
includePaths: [
"node_modules/bourbon/app/assets/stylesheets",
"node_modules/bourbon/core",
"node_modules/bourbon-neat/app/assets/stylesheets",
"node_modules/normalize.css",
"node_modules/neat-omega/core",
Expand Down Expand Up @@ -37,10 +37,21 @@ module.exports = function(grunt) {
}
}
},
postcss: {
options: {
map: false,
processors: [
require('autoprefixer')
]
},
dist: {
src: 'css/*.css'
}
},
watch: {
css: {
files: '**/*.scss',
tasks: ['sass', 'styleguide']
tasks: ['sass', 'postcss', 'styleguide']
},
jsmin: {
files: 'js/**/*.js',
Expand All @@ -61,27 +72,37 @@ module.exports = function(grunt) {
styleguidecss: {
dest: 'styleguide/css',
relativeSrc: '../css',
options: {type: 'dir'}
options: {
type: 'dir'
}
},
styleguidejs: {
dest: 'styleguide/js',
relativeSrc: '../js',
options: {type: 'dir'}
options: {
type: 'dir'
}
},
styleguideimg: {
dest: 'styleguide/img',
relativeSrc: '../img',
options: {type: 'dir'}
options: {
type: 'dir'
}
},
styleguidefonts: {
dest: 'styleguide/fonts',
relativeSrc: '../fonts',
options: {type: 'dir'}
options: {
type: 'dir'
}
}
},
verbosity: {
symlinkquiet: {
options: { mode: 'hidden' },
options: {
mode: 'hidden'
},
tasks: ["symlink"]
}
}
Expand All @@ -94,8 +115,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-symlink');
grunt.loadNpmTasks('grunt-verbosity');
grunt.loadNpmTasks('grunt-postcss');

grunt.registerTask('styleguide', ['run:styleguide', 'verbosity:symlinkquiet']);
grunt.registerTask('default', ['postcss:dist']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicating the default task. Remove this line.

You can, instead, move the 'postcss:dist' tasks in to the styleguide task array in line 120. You will also probably want to ensure that it is ran after calling grunt sass but you cannot simply just add this to the end of that command. As you want to make this a dependency I would suggest registering another a new task called compile or something that runs both grunt sass and grunt post-css in the same command.

eg: grunt.registerTask('compile', ['sass:dist', 'postcss:dist']);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! And, I really like the compile task idea. I've corrected this and have added that task.

grunt.registerTask('default', ['watch']);

}
94 changes: 47 additions & 47 deletions css/decanter.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading