Skip to content

Commit

Permalink
Merge pull request woocommerce#28643 from woocommerce/feature/fix-build
Browse files Browse the repository at this point in the history
Feature/fix build
  • Loading branch information
vedanshujain authored Dec 24, 2020
2 parents d5c2856 + e4efc70 commit 9db6e2e
Show file tree
Hide file tree
Showing 32 changed files with 4,067 additions and 11,918 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ none
/assets/css/photoswipe/**/*.min.css

# Minified JS
/assets/js/admin/*.min.js
/assets/js/frontend/*.min.js
/assets/js/**/*.min.js

# OS X metadata
.DS_Store
Expand Down Expand Up @@ -76,3 +75,4 @@ i18n/languages/woocommerce.pot

# Build
build/
woocommerce.zip
77 changes: 12 additions & 65 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,67 +45,18 @@ module.exports = function( grunt ) {
comments : /@license|@preserve|^!/
}
},
admin: {
files: [{
expand: true,
cwd: '<%= dirs.js %>/admin/',
src: [
'*.js',
'!*.min.js'
],
dest: '<%= dirs.js %>/admin/',
ext: '.min.js'
}]
},
vendor: {
files: {
'<%= dirs.js %>/accounting/accounting.min.js': ['<%= dirs.js %>/accounting/accounting.js'],
'<%= dirs.js %>/jquery-blockui/jquery.blockUI.min.js': ['<%= dirs.js %>/jquery-blockui/jquery.blockUI.js'],
'<%= dirs.js %>/jquery-cookie/jquery.cookie.min.js': ['<%= dirs.js %>/jquery-cookie/jquery.cookie.js'],
'<%= dirs.js %>/js-cookie/js.cookie.min.js': ['<%= dirs.js %>/js-cookie/js.cookie.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.pie.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.pie.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.resize.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.resize.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.stack.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.stack.js'],
'<%= dirs.js %>/jquery-flot/jquery.flot.time.min.js': ['<%= dirs.js %>/jquery-flot/jquery.flot.time.js'],
'<%= dirs.js %>/jquery-payment/jquery.payment.min.js': ['<%= dirs.js %>/jquery-payment/jquery.payment.js'],
'<%= dirs.js %>/jquery-qrcode/jquery.qrcode.min.js': ['<%= dirs.js %>/jquery-qrcode/jquery.qrcode.js'],
'<%= dirs.js %>/jquery-serializejson/jquery.serializejson.min.js': [
'<%= dirs.js %>/jquery-serializejson/jquery.serializejson.js'
],
'<%= dirs.js %>/jquery-tiptip/jquery.tipTip.min.js': ['<%= dirs.js %>/jquery-tiptip/jquery.tipTip.js'],
'<%= dirs.js %>/jquery-ui-touch-punch/jquery-ui-touch-punch.min.js': [
'<%= dirs.js %>/jquery-ui-touch-punch/jquery-ui-touch-punch.js'
],
'<%= dirs.js %>/prettyPhoto/jquery.prettyPhoto.init.min.js': ['<%= dirs.js %>/prettyPhoto/jquery.prettyPhoto.init.js'],
'<%= dirs.js %>/prettyPhoto/jquery.prettyPhoto.min.js': ['<%= dirs.js %>/prettyPhoto/jquery.prettyPhoto.js'],
'<%= dirs.js %>/flexslider/jquery.flexslider.min.js': ['<%= dirs.js %>/flexslider/jquery.flexslider.js'],
'<%= dirs.js %>/zoom/jquery.zoom.min.js': ['<%= dirs.js %>/zoom/jquery.zoom.js'],
'<%= dirs.js %>/photoswipe/photoswipe.min.js': ['<%= dirs.js %>/photoswipe/photoswipe.js'],
'<%= dirs.js %>/photoswipe/photoswipe-ui-default.min.js': ['<%= dirs.js %>/photoswipe/photoswipe-ui-default.js'],
'<%= dirs.js %>/round/round.min.js': ['<%= dirs.js %>/round/round.js'],
'<%= dirs.js %>/selectWoo/selectWoo.full.min.js': ['<%= dirs.js %>/selectWoo/selectWoo.full.js'],
'<%= dirs.js %>/selectWoo/selectWoo.min.js': ['<%= dirs.js %>/selectWoo/selectWoo.js'],
'<%= dirs.js %>/stupidtable/stupidtable.min.js': ['<%= dirs.js %>/stupidtable/stupidtable.js'],
'<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.min.js': ['<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.js']
}
},
frontend: {
js_assets: {
files: [{
expand: true,
cwd: '<%= dirs.js %>/frontend/',
cwd: '<%= dirs.js %>/',
src: [
'*.js',
'!*.min.js'
'**/*.js',
'!**/*.min.js'
],
dest: '<%= dirs.js %>/frontend/',
extDot: 'last',
dest: '<%= dirs.js %>',
ext: '.min.js'
}]
},
flexslider: {
files: [{
'<%= dirs.js %>/flexslider/jquery.flexslider.min.js': ['<%= dirs.js %>/flexslider/jquery.flexslider.js']
}]
}
},

Expand Down Expand Up @@ -189,12 +140,10 @@ module.exports = function( grunt ) {
js: {
files: [
'GruntFile.js',
'<%= dirs.js %>/admin/*js',
'<%= dirs.js %>/frontend/*js',
'!<%= dirs.js %>/admin/*.min.js',
'!<%= dirs.js %>/frontend/*.min.js'
'<%= dirs.js %>/**/*.js',
'!<%= dirs.js %>/**/*.min.js'
],
tasks: ['eslint','uglify']
tasks: ['eslint','newer:uglify']
}
},

Expand Down Expand Up @@ -244,6 +193,7 @@ module.exports = function( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-copy' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-newer' );

// Register tasks.
grunt.registerTask( 'default', [
Expand All @@ -253,8 +203,7 @@ module.exports = function( grunt ) {

grunt.registerTask( 'js', [
'eslint',
'uglify:admin',
'uglify:frontend'
'uglify:js_assets'
]);

grunt.registerTask( 'css', [
Expand All @@ -271,9 +220,7 @@ module.exports = function( grunt ) {
]);

grunt.registerTask( 'e2e-build', [
'uglify:admin',
'uglify:frontend',
'uglify:flexslider',
'uglify:js_assets',
'css'
]);

Expand Down
21 changes: 0 additions & 21 deletions assets/js/accounting/accounting.min.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/flexslider/jquery.flexslider.min.js

This file was deleted.

14 changes: 0 additions & 14 deletions assets/js/jquery-blockui/jquery.blockUI.min.js

This file was deleted.

8 changes: 0 additions & 8 deletions assets/js/jquery-cookie/jquery.cookie.min.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/jquery-flot/jquery.flot.min.js

This file was deleted.

Loading

0 comments on commit 9db6e2e

Please sign in to comment.