Skip to content

Commit

Permalink
fix(best): Fix building on windows machine
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinko committed May 23, 2018
1 parent a12f0a7 commit bea8ed1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
},
"license": "MIT",
"scripts": {
"clean": "lerna run clean && lerna clean --yes && rm -rf node_modules",
"clean": "lerna run clean && lerna clean --yes && rimraf node_modules",
"lint": "eslint packages/",
"prettier": "prettier --write '**/*.{js,md}'",
"prepare": "yarn build && yarn build:frontend",
"build:frontend": "lerna exec --scope @best/frontend 'yarn build:prod'",
"build:frontend": "lerna exec --scope @best/frontend \"yarn build:prod\"",
"build": "node scripts/build.js",
"watch": "yarn build && node ./scripts/watch.js",
"test": "jest --config jest.config.json",
"perf": "best --externalStorage=@best/store-aws",
"start": "node scripts/start.js",
"web:watch": "lerna exec --scope @best/frontend 'yarn watch'",
"web:watch:s3": "STORE_PLUGIN=@best/store-aws lerna exec --scope @best/frontend 'yarn watch'",
"web:watch": "lerna exec --scope @best/frontend \"yarn watch\"",
"web:watch:s3": "STORE_PLUGIN=@best/store-aws lerna exec --scope @best/frontend \"yarn watch\"",
"release": "yarn prepare && lerna publish -m 'chore(release): publish %s' --exact --force-publish=* --registry='https://npm.lwcjs.org' && yarn changelog",
"release:internal": "yarn prepare && lerna publish --exact --force-publish=* --skip-git --repo-version `node -pe \"require('./lerna.json').version\"` --yes --registry='https://nexus.soma.salesforce.com/nexus/content/repositories/npmjs-internal/'",
"changelog": "yarn changelog:generate && yarn changelog:publish",
Expand Down
4 changes: 3 additions & 1 deletion scripts/_getPackages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ const path = require('path');

const PACKAGES_DIR = path.resolve(__dirname, '../packages');
const BLACKLIST = ['best-frontend'];
// Mac/Linux is forward slash (/), Windows is back slash (\)
const FOLDER_SEPARATOR = /\/|\\/;

// Get absolute paths of all directories under packages/*
module.exports = function getPackages() {
return fs
.readdirSync(PACKAGES_DIR)
.map(file => path.resolve(PACKAGES_DIR, file))
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory())
.filter(f => !BLACKLIST.includes(f.split('/').pop()));
.filter(f => !BLACKLIST.includes(f.split(FOLDER_SEPARATOR).pop()));
};

0 comments on commit bea8ed1

Please sign in to comment.