Skip to content

Commit

Permalink
Merge pull request #457 from TAMULib/sprint22-staging-sass-migration
Browse files Browse the repository at this point in the history
Sprint22 staging sass migration
  • Loading branch information
rmathew1011 committed Oct 25, 2021
2 parents edd2d78 + b8ae62f commit 7862fef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"DOCKER_SERVER": ""
},
"scripts": {
"postinstall": "node scripts/post-install.js",
"build": "ng build --configuration production --single-bundle --output-hashing none",
"build:clean": "npm run clean && npm run build",
"build:wvr-elements": "ng build --configuration production wvr-elements",
Expand Down Expand Up @@ -128,6 +129,7 @@
"static-server": "^2.2.1",
"ts-node": "~10.2.1",
"tslint": "~6.1.3",
"typescript": "~4.3.5"
"typescript": "~4.3.5",
"sass-migrator": "^1.5.2"
}
}
13 changes: 13 additions & 0 deletions scripts/post-install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env node

const shell = require('shelljs');
const process = require('process');
const fs = require('fs-extra');

const NM_WVR_UD_DIR = `${process.cwd()}/node_modules/`;

if (fs.existsSync(NM_WVR_UD_DIR)) {
shell.cd(NM_WVR_UD_DIR);
shell.exec('sass-migrator division **/*.scss');
shell.exit();
}

0 comments on commit 7862fef

Please sign in to comment.