Skip to content

Commit

Permalink
Merge pull request #107 from Voog/106_update_grunt_settings
Browse files Browse the repository at this point in the history
Use grunt-sass for Dart Sass compability and refactor
  • Loading branch information
robertpih authored Mar 17, 2021
2 parents 801b40f + 01320a3 commit aa5bdf0
Show file tree
Hide file tree
Showing 8 changed files with 1,388 additions and 163 deletions.
27 changes: 12 additions & 15 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,16 @@ module.exports = function(grunt) {
},

// Compiles the stylesheet files.
// When using Dart Sass, synchronous compilation is twice as fast
// as asynchronous compilation by default, due to the overhead of asynchronous callbacks.
// To avoid this overhead, fibers package is used
sass: {
build_main: {
options: {
style: 'expanded',
sourcemap: 'none'
implementation: require('node-sass'),
sourceMap: false,
fiber: require('fibers'),
outputStyle: 'expanded'
},
files: [{
expand: true,
Expand All @@ -70,8 +75,10 @@ module.exports = function(grunt) {
// Builds custom style components to temporary folder.
build_custom_styles: {
options: {
style: 'expanded',
sourcemap: 'none'
implementation: require('node-sass'),
sourceMap: false,
fiber: require('fibers'),
outputStyle: 'expanded'
},
files: [{
expand: true,
Expand Down Expand Up @@ -267,17 +274,7 @@ module.exports = function(grunt) {
}
});

grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-modernizr-builder');
grunt.loadNpmTasks('grunt-postcss');
require('load-grunt-tasks')(grunt);

grunt.registerTask('default', ['clean:reset', 'modernizr_builder', 'concat', 'copy:assets', 'copy:images', 'copy:javascripts', 'uglify', 'sass', 'postcss:main_styles', 'cssmin', 'imagemin', 'postcss:custom_styles', 'copy:custom_styles', 'clean:remove']);

Expand Down
72 changes: 36 additions & 36 deletions components/template-cs-content.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -209,21 +209,21 @@
"featured": true
*/
--content-submenu-color: #818181;
/* VoogStyle
"pathI18n": ["content", "sub_menu", "hover"],
"titleI18n": "color",
"type": "button",
"editor": "colorPicker",
"scope": "global"
*/
/* VoogStyle
"pathI18n": ["content", "sub_menu", "hover"],
"titleI18n": "color",
"type": "button",
"editor": "colorPicker",
"scope": "global"
*/
--content-submenu-hover-color: black;
/* VoogStyle
"pathI18n": ["content", "sub_menu", "active"],
"titleI18n": "color",
"type": "button",
"editor": "colorPicker",
"scope": "global"
*/
/* VoogStyle
"pathI18n": ["content", "sub_menu", "active"],
"titleI18n": "color",
"type": "button",
"editor": "colorPicker",
"scope": "global"
*/
--content-submenu-active-color: black;
/* VoogStyle
"pathI18n": ["content", "text"],
Expand Down Expand Up @@ -262,20 +262,20 @@
*/
--content-color: #333;
/* VoogStyle
"pathI18n": ["content", "link", "normal"],
"titleI18n": "font_weight",
"type": "button",
"editor": "toggleIcon",
"states": {
"on": "600",
"off": "400"
},
"icon": "bold",
"scope": "global",
"boundVariables": [
"--content-links-hover-font-weight"
]
*/
"pathI18n": ["content", "link", "normal"],
"titleI18n": "font_weight",
"type": "button",
"editor": "toggleIcon",
"states": {
"on": "600",
"off": "400"
},
"icon": "bold",
"scope": "global",
"boundVariables": [
"--content-links-hover-font-weight"
]
*/
--content-links-font-weight: 400;
/* VoogStyle
"pathI18n": ["content", "link", "hover"],
Expand Down Expand Up @@ -386,13 +386,13 @@
"featured": true
*/
--content-links-color: #818181;
/* VoogStyle
"pathI18n": ["content", "link", "hover"],
"titleI18n": "color",
"type": "button",
"editor": "colorPicker",
"scope": "global",
"featured": true
*/
/* VoogStyle
"pathI18n": ["content", "link", "hover"],
"titleI18n": "color",
"type": "button",
"editor": "colorPicker",
"scope": "global",
"featured": true
*/
--content-links-hover-color: black;
}
36 changes: 18 additions & 18 deletions components/template-cs-header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,19 @@
"featured": true
*/
--header-mainmenu-color: #818181;
/* VoogStyle
"pathI18n": ["header", "main_menu", "hover"],
"titleI18n": "text_color",
"editor": "colorPicker",
"scope": "global"
*/
/* VoogStyle
"pathI18n": ["header", "main_menu", "hover"],
"titleI18n": "text_color",
"editor": "colorPicker",
"scope": "global"
*/
--header-mainmenu-hover-color: black;
/* VoogStyle
"pathI18n": ["header", "main_menu", "active"],
"titleI18n": "text_color",
"editor": "colorPicker",
"scope": "global"
*/
/* VoogStyle
"pathI18n": ["header", "main_menu", "active"],
"titleI18n": "text_color",
"editor": "colorPicker",
"scope": "global"
*/
--header-mainmenu-active-color: black;
/* VoogStyle
"pathI18n": ["header", "main_menu", "normal"],
Expand All @@ -119,12 +119,12 @@
"featured": true
*/
--header-mainmenu-btn-color: #333;
/* VoogStyle
"pathI18n": ["header", "main_menu", "hover"],
"titleI18n": "button_color",
"editor": "colorPicker",
"scope": "global"
*/
/* VoogStyle
"pathI18n": ["header", "main_menu", "hover"],
"titleI18n": "button_color",
"editor": "colorPicker",
"scope": "global"
*/
--header-mainmenu-btn-hover-color: #818181;
/* VoogStyle
"pathI18n": ["header", "main_menu", "normal"],
Expand Down
Loading

0 comments on commit aa5bdf0

Please sign in to comment.