Skip to content

Commit

Permalink
fixbug
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchonghua committed Apr 25, 2017
1 parent b457e1f commit b6c328a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ddv-mustache/build/getEntryAndCopyPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function getEntry (self, isReload = false) {
}
function getEntryByGlob (self, cache) {
return Promise.all([
buildUtil.getPathByGlob('/*/styles/**/*.*', {
buildUtil.getPathByGlob('/*/styles/**/*.?(css|scss|sass|less|stylus|styl)', {
root: self.appDir
})
])
Expand Down
2 changes: 2 additions & 0 deletions ddv-mustache/build/util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict'
const path = require('path')
const glob = require('glob')
module.exports = {
getPathByGlob,
Expand All @@ -13,6 +14,7 @@ function getPathByGlob (pattern, options) {
var paths = []
var appDirCheck = options.root + '/'
var appDirLen = appDirCheck.length || 0
appDirCheck = appDirCheck.replace(/\//g, path.sep)
files.forEach(file => {
if (file.substr(0, appDirLen) === appDirCheck) {
paths.push(file.substr(appDirLen))
Expand Down

0 comments on commit b6c328a

Please sign in to comment.