Skip to content

Commit

Permalink
Merge pull request #140 from NogsMPLS/windowsSlashes
Browse files Browse the repository at this point in the history
Windows slashes
  • Loading branch information
KyleAMathews committed Feb 24, 2016
2 parents 930261c + 80d6888 commit ea545cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/utils/glob-pages.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import glob from 'glob'
import path from 'path'
import parsePath from 'parse-filepath'
import slash from 'slash'
import fs from 'fs'
import frontMatter from 'front-matter'
import htmlFrontMatter from 'html-frontmatter'
Expand Down Expand Up @@ -29,7 +30,10 @@ module.exports = (directory, callback) => {
pageData.file.ext = ext = parsed.extname.slice(1)

// Determine require path
pageData.requirePath = path.relative(`${directory}/pages`, page)
pageData.requirePath = slash(path.relative(`${directory}/pages`, page))

// Make sure slashes on parsed.dirname are correct for Windows
parsed.dirname = slash(parsed.dirname)

// Load data for each file type.
let data
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"react-transform-hmr": "^1.0.0",
"redbox-react": "^1.0.1",
"sass-loader": "^3.1.2",
"slash": "^1.0.0",
"static-site-generator-webpack-plugin": "^2.0.1",
"style-loader": "^0.13.0",
"toml": "^2.2.2",
Expand Down

0 comments on commit ea545cf

Please sign in to comment.