Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Bug fixes:

- Bower injecting 1 level too deep
- PL Stylesheet not applying due to missing attribute
  • Loading branch information
EvanLovely committed May 5, 2015
2 parents dd5d7af + 6f8d49f commit 15836df
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
8 changes: 4 additions & 4 deletions grunt-tasks/compass/compass.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ module.exports = function (grunt, config) {
grunt.config.merge({
shell: {
stylesCompile: {
command: "cd " + scssConfigRoot + " && bundle exec compass compile"
command: "cd " + config.scssConfigRoot + " && bundle exec compass compile"
}
},
scsslint: {
"options": {
"bundleExec": scssConfigRoot,
"config": scssConfigRoot + ".scss-lint.yml",
"bundleExec": config.scssConfigRoot,
"config": config.scssConfigRoot + ".scss-lint.yml",
"force": true,
"maxBuffer": 999999,
"colorizeOutput": true,
Expand All @@ -23,7 +23,7 @@ module.exports = function (grunt, config) {
},
watch: {
styles: {
files: scssDir + "**/*.scss",
files: config.scssDir + "**/*.scss",
tasks: [
"shell:stylesCompile",
"shell:livereload",
Expand Down
13 changes: 10 additions & 3 deletions grunt-tasks/pattern-lab/pattern-lab.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = function (grunt, config) {
options: {
transform: function (filePath) {
filePath = "../../../../" + filePath;
return '<link href="' + filePath + '" media="all" />';
return '<link rel="stylesheet" href="' + filePath + '" media="all" />';
}
},
src: assets.css,
Expand Down Expand Up @@ -152,8 +152,15 @@ module.exports = function (grunt, config) {
css: /<link.*href=['"]([^'"]+)/gi
},
replace: {
js: '<script src="{{filePath}}"></script>',
css: '<link rel="stylesheet" href="{{filePath}}" />'
// since we inject 5 levels deep to a partial that compiles to a place that is 4 levels deep, we need to remove 1 `../`
js: function (filePath) {
filePath = filePath.replace('../', '');
return '<script src="' + filePath + '"></script>';
},
css: function (filePath) {
filePath = filePath.replace('../', '');
return '<link rel="stylesheet" href="' + filePath + '" />';
}
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions pattern-lab/source/_patterns/00-atoms/00-meta/_00-head.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
<!-- endbower -->

<!-- injector:css -->
<link href="../../../../css/style.css" media="all" />
<link rel="stylesheet" href="../../../../css/style.css" media="all" />
<!-- endinjector -->

<!-- bower:js -->
<script src="../../../../../bower_components/modernizr/modernizr.js"></script>
<script src="../../../../../bower_components/jquery/jquery.js"></script>
<script src="../../../../../bower_components/jquery-migrate/jquery-migrate.js"></script>
<script src="../../../../../bower_components/drupal/index.js"></script>
<script src="../../../../../bower_components/lodash/lodash.js"></script>
<script src="../../../../bower_components/modernizr/modernizr.js"></script>
<script src="../../../../bower_components/jquery/jquery.js"></script>
<script src="../../../../bower_components/jquery-migrate/jquery-migrate.js"></script>
<script src="../../../../bower_components/drupal/index.js"></script>
<script src="../../../../bower_components/lodash/lodash.js"></script>
<!-- endbower -->

<!-- injector:js -->
Expand Down

0 comments on commit 15836df

Please sign in to comment.