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