Commit 394c46b6103e41dd2a7175f90edc5e027936cd0a
Use regex to detect file extensions
Avoids matching vim swapfilesCharles Lehner committed on 6/11/2016, 9:16:56 PM
Parent: b422f0ea714588ae4cdebd501101b463dfc79b01
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -15,9 +15,9 @@ | ||
15 | 15 | // copy folder structure |
16 | 16 | // console.log('copying directory') |
17 | 17 | build.dir(entry.relativePath) |
18 | 18 | } else if (entry.type == 'file') { |
19 | - if (entry.name.indexOf('.html.js') !== -1 || entry.name.indexOf('.css.js') !== -1) { | |
19 | + if (/\.(html|css).js$/.test(entry.name)) { | |
20 | 20 | // build html/css files |
21 | 21 | // console.log('building') |
22 | 22 | buildTemplate(entry) |
23 | 23 | } else if (entry.name.indexOf('.part.js') !== -1) { |
Built with git-ssb-web