Skip to content

Commit dfe918f

Browse files
committed
feat(gulp:inject:styles): take off preceding underscores from filenames
1 parent 60b3d8d commit dfe918f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

app/templates/gulpfile.babel(gulp).js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,13 @@ gulp.task('inject:<%= styleExt %>', () => {
159159
.pipe(plugins.inject(gulp.src(_.union(paths.client.styles, ['!' + paths.client.mainStyle]), {read: false}), {
160160
starttag: '// injector',
161161
endtag: '// endinjector',
162-
transform: (filepath) => '@import \'' + filepath.replace('/client/app/', '').replace('/client/components/', '../components/') + '\';'
162+
transform: (filepath) => {
163+
let newPath = filepath
164+
.replace('/client/app/', '')
165+
.replace('/client/components/', '../components/')
166+
.replace(/_(.*).<%= styleExt %>/, (match, p1, offset, string) => p1);
167+
return `@import '${newPath}';`
168+
}
163169
}))
164170
.pipe(gulp.dest('client/app'));
165171
});

0 commit comments

Comments
 (0)