Skip to content

Commit

Permalink
Modified Gruntfile.js to copy min.css file to target
Browse files Browse the repository at this point in the history
Co-authored-by: Jaime Hernandez <[email protected]>
  • Loading branch information
nickchaula and jaimeh1 committed Jul 8, 2022
1 parent d9e6cab commit 5781a7b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,23 @@ module.exports = function (grunt) {
]
},

'rename-in-target': {
files: [
{
expand: true,
cwd: 'target/css',
src: ['*.css', '*.css.map'],
dest: 'target/css',
rename: function (dest, src) {
if (src === 'okta-sign-in.css') {
return path.resolve(dest, 'okta-sign-in.min.css');
}
return path.resolve(dest, src);
}
}
]
},

'e2e': {
options: {
process: function (content) {
Expand Down Expand Up @@ -382,6 +399,7 @@ module.exports = function (grunt) {
if (prodBuild) {
buildTasks.push('exec:build-release');
postBuildTasks.push('copy:target-to-dist');
postBuildTasks.push('copy:rename-in-target');
} else {
const devTask = mode === 'watch' ? 'exec:build-dev-watch' : 'exec:build-dev';
buildTasks.push(devTask);
Expand Down

0 comments on commit 5781a7b

Please sign in to comment.