Skip to content

Commit 17fe24a

Browse files
committed
Updated default theme css: now Sass & linted
1 parent bd726c9 commit 17fe24a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2458
-1589
lines changed

.sasslintrc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"rules": {
3+
"class-name-format": 0,
4+
"no-color-literals": 0,
5+
"force-pseudo-nesting": 0,
6+
"force-element-nesting": 0,
7+
"property-sort-order": 0,
8+
"no-color-keywords": 0,
9+
"no-ids": 0,
10+
"hex-length": 0,
11+
"no-qualifying-elements": 0,
12+
"force-attribute-nesting": 0
13+
}
14+
}

gruntfile.js

+21-5
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,32 @@ const config = {
4747
sourceMap: true
4848
},
4949
dist: {
50-
files: {
51-
'dist/themes/default/css/styles.css': 'src/themes/default/sass/index.scss',
52-
}
50+
files: [
51+
{
52+
src: 'src/themes/default/sass/index.scss',
53+
dest: 'dist/themes/default/css/styles.css'
54+
},
55+
{
56+
src: ['swatch_*.scss'],
57+
expand: true,
58+
cwd: "src/themes/default/sass/",
59+
dest: 'dist/themes/default/css/',
60+
ext: '.css'
61+
}
62+
]
5363
}
5464
},
5565

66+
sasslint: {
67+
target: [
68+
'src/themes/default/sass/\*.scss'
69+
]
70+
},
71+
5672
watch: {
5773
css: {
5874
files: ['**/*.scss'],
59-
tasks: ['sass']
75+
tasks: ['sass', 'sasslint']
6076
},
6177
src: {
6278
files: ['src/**'],
@@ -415,7 +431,7 @@ module.exports = function (grunt) {
415431
// for local dev work. All you need to do is run `grunt`: that creates a dist/ folder containing all the built code,
416432
// plus sets up watchers to copy over changed files and generate the CSS from Sass. Be sure to load up the dist/
417433
// folder in your browser
418-
grunt.registerTask('default', ['sync', 'sass', 'concurrent:watchers']);
434+
grunt.registerTask('default', ['sync', 'sasslint', 'sass', 'concurrent:watchers']);
419435

420436
// builds everything into the dist folder
421437
grunt.registerTask('prod', ['i18n', 'sync', 'sass']);

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"grunt-contrib-watch": "^1.1.0",
9999
"grunt-run": "^0.8.1",
100100
"grunt-sass": "^3.0.1",
101+
"grunt-sass-lint": "^0.2.4",
101102
"grunt-sync": "^0.8.0",
102103
"jest": "^23.6.0",
103104
"line-reader": "^0.4.0",

src/global/code/Modules.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ public static function includeModule($module_folder)
854854
$module = self::getModuleInstance($module_folder);
855855

856856
// include the smarty resources
857-
if (is_dir("$root_dir/modules/$module_folder/smarty")) {
857+
if (is_dir("$root_dir/modules/$module_folder/smarty_plugins")) {
858858
$smarty->setPluginsDir("$root_dir/modules/$module_folder/smarty_plugins");
859859
}
860860

src/themes/default/css/emails.css

-22
This file was deleted.

0 commit comments

Comments
 (0)