Skip to content

Commit

Permalink
Fix map.js files problem
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelafox committed Jan 3, 2023
1 parent 6776622 commit c5e8166
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -276,5 +276,6 @@ project.css
project.min.css
vendors.js
*.min.js
*.min.js.map

.azure
14 changes: 10 additions & 4 deletions gulpfile.js
Expand Up @@ -29,8 +29,12 @@ function pathsConfig(appName) {
return {
bootstrapSass: `${vendorsRoot}/bootstrap/scss`,
vendorsJs: [
`${vendorsRoot}/@popperjs/core/dist/umd/popper.js`,
`${vendorsRoot}/bootstrap/dist/js/bootstrap.js`,
`${vendorsRoot}/@popperjs/core/dist/umd/popper.min.js`,
`${vendorsRoot}/bootstrap/dist/js/bootstrap.min.js`,
],
vendorsJsMaps: [
`${vendorsRoot}/@popperjs/core/dist/umd/popper.min.js.map`,
`${vendorsRoot}/bootstrap/dist/js/bootstrap.min.js.map`,
],
app: this.app,
templates: `${this.app}/templates`,
Expand Down Expand Up @@ -85,11 +89,13 @@ function scripts() {

// Vendor Javascript minification
function vendorScripts() {
src(paths.vendorsJsMaps)
.pipe(dest(paths.js))

return src(paths.vendorsJs)
.pipe(concat('vendors.js'))
.pipe(dest(paths.js))
.pipe(plumber()) // Checks for errors
.pipe(uglify()) // Minifies the js
.pipe(rename({ suffix: '.min' }))
.pipe(dest(paths.js))
}
Expand All @@ -102,7 +108,7 @@ function imgCompression() {
}
// Run django server
function runServer(cb) {
const cmd = spawn('python', ['manage.py', 'runserver'], {stdio: 'inherit'})
const cmd = spawn('python3', ['manage.py', 'runserver'], {stdio: 'inherit'})
cmd.on('close', function(code) {
console.log('runServer exited with code ' + code)
cb(code)
Expand Down

0 comments on commit c5e8166

Please sign in to comment.