Skip to content

Commit

Permalink
Merge pull request #639 from dustinsoftware/fix-windows
Browse files Browse the repository at this point in the history
Fix `yarn build` on Windows
  • Loading branch information
BPScott authored Nov 20, 2018
2 parents 9c1c398 + 61f66fa commit 4076145
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"check": "npm-run-all lint ts test",
"check:ci": "npm-run-all lint ts test:ci",
"depcruise-validate": "depcruise src --validate",
"clean": "rimraf build build-esnext esnext styles types docs 'build-intermediate' 'index.*' './src/styles/polaris-tokens' './tophat/build' 'styles.{css,scss}'",
"clean:build": "rimraf 'build/!(cache|coverage)' build-esnext esnext styles types docs 'build-intermediate' 'index.*' './src/styles/polaris-tokens' './tophat/build' 'styles.{css,scss}'",
"clean": "rimraf build build-esnext esnext styles types docs \"build-intermediate\" \"index.*\" \"./src/styles/polaris-tokens\" \"./tophat/build\" \"styles.{css,scss}\"",
"clean:build": "rimraf \"build/!(cache|coverage)\" build-esnext esnext styles types docs \"build-intermediate\" \"index.*\" \"./src/styles/polaris-tokens\" \"./tophat/build\" \"styles.{css,scss}\"",
"optimize": "node ./scripts/optimize.js",
"prebuild": "npm-run-all clean:build optimize copy-polaris-tokens",
"build": "babel-node ./scripts/build.js",
Expand Down
2 changes: 1 addition & 1 deletion scripts/sass-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function generateSassBuild(destinationDir) {
const regex = /:global\s*\(([^)]+)\)|:global\s*{\s*([^}]+)\s*}\s*/;

glob.sync(join(srcDir, '/**/*.scss')).forEach((srcFile) => {
const sassFile = srcFile.replace(srcDir, '');
const sassFile = srcFile.replace(srcDir.replace(/\\/g, '/'), '');
let file = readFileSync(srcFile, 'utf8');
file = file.replace(new RegExp(regex, 'g'), '$1$2');
outputFileSync(join(destDir, sassFile), file);
Expand Down

0 comments on commit 4076145

Please sign in to comment.