Skip to content

Commit 590e32e

Browse files
Dan LaskyShuwen Qian
authored andcommitted
cleaned up module naming
1 parent 1930f92 commit 590e32e

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Gulpfile.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@ gulp.task('copy', function() {
4141
});
4242

4343
gulp.task('sass', function() {
44+
var wrapper = fs.readFileSync(TEMPLATES + "style_module_template.html");
4445
return gulp.src(SRC + 'mm-*/*.scss')
4546
// .pipe(cache())
4647
.pipe(changed(BUILD, {extension:'.css'}))
47-
.pipe(debug())
4848
.pipe(sass({includePaths: ['./bower_components/bourbon/app/assets/stylesheets/', './src/shared/sass/']}).on('error', sass.logError))
4949
.pipe(gulp.dest(BUILD))
50-
.pipe(wrap({src:TEMPLATES + "style_module_template.html"},{},{engine:"hogan"}))
50+
// .pipe(wrap({src:TEMPLATES + "style_module_template.html"},{},{engine:"hogan"}))
51+
.pipe(wrap(function(data) {
52+
data.fname = path.basename(data.file.relative,'.css');
53+
return wrapper;
54+
},{},{engine:"hogan"}))
5155
.pipe(rename({basename:"style", extname: ".html"}))
5256
.pipe(gulp.dest(BUILD));
5357
});

grunt/templates/style_module_template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2015 MediaMath Inc. All rights reserved.
44
* This code may only be used under the BSD style license found at http://mediamath.github.io/strand/LICENSE.txt
55
-->
6-
<dom-module id="{{file.path}}-style">
6+
<dom-module id="{{fname}}-style">
77
<template>
88
<style>
99
{{{contents}}}

0 commit comments

Comments
 (0)