Fix build for windows machines
This commit is contained in:
committed by
Philip Feldmann
parent
cba33dfbee
commit
6ac07d03bf
@@ -58,7 +58,7 @@ const itemInfoFromFilename = (fileName) => {
|
||||
const [
|
||||
release,
|
||||
nameWithSuffix,
|
||||
] = fileName.split('/').slice(-2);
|
||||
] = fileName.split(path.sep).slice(-2);
|
||||
return {
|
||||
name: nameWithSuffix.substr(0, nameWithSuffix.length - 3),
|
||||
release,
|
||||
|
||||
@@ -10,7 +10,7 @@ import actions, { NAVIGATE } from './actions';
|
||||
|
||||
// Remove .html and map / to index
|
||||
const getPageNameFromPath = (path) => {
|
||||
if (path === '/') {
|
||||
if (path === path.sep) {
|
||||
return 'index';
|
||||
}
|
||||
return path.substring(1, path.length - 5);
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
"scripts": {
|
||||
"build": "npm run clean && npm run build:pages && npm run build:jsprod && npm run build:css && npm run build:assets",
|
||||
"build:all": "npm run build",
|
||||
"build:pages": "RENDER_MODE=server babel-node ./tasks/build.js",
|
||||
"build:js": "RENDER_MODE=client webpack --config webpack.config.js",
|
||||
"build:jsprod": "RENDER_MODE=client webpack -p --config webpack.config.js",
|
||||
"build:pages": "cross-env RENDER_MODE=server babel-node ./tasks/build.js",
|
||||
"build:js": "cross-env RENDER_MODE=client webpack --config webpack.config.js",
|
||||
"build:jsprod": "cross-env RENDER_MODE=client webpack -p --config webpack.config.js",
|
||||
"build:css": "postcss -c postcss.config.json -o dist/styles.css styles/main.css",
|
||||
"build:assets": "babel-node ./tasks/assets.js",
|
||||
"watch": "babel-node ./tasks/watch.js",
|
||||
@@ -27,6 +27,7 @@
|
||||
"babel-preset-react": "6.23.0",
|
||||
"babel-preset-stage-0": "6.22.0",
|
||||
"classnames": "2.2.5",
|
||||
"cross-env": "^4.0.0",
|
||||
"css-mqpacker": "^5.0.1",
|
||||
"front-matter": "2.1.2",
|
||||
"fs-extra": "2.0.0",
|
||||
|
||||
Reference in New Issue
Block a user