concat js files to one file. Compress all js files in production

This commit is contained in:
Gustavo Maximiliano Cortez 2014-08-27 20:05:30 -03:00
parent 0a8fe334f8
commit ae6a95044c
2 changed files with 8 additions and 10 deletions

View File

@ -79,6 +79,8 @@ module.exports = function(grunt) {
concat: {
vendors: {
src: [
'lib/mousetrap/mousetrap.min.js',
'js/shell.js', // shell must be loaded before moment due to the way moment loads in a commonjs env
'lib/moment/min/moment.min.js',
'lib/qrcode-generator/js/qrcode.js',
'lib/peer.js',
@ -113,7 +115,9 @@ module.exports = function(grunt) {
'js/filters.js',
'js/routes.js',
'js/services/*.js',
'js/controllers/*.js'
'js/controllers/*.js',
'js/mobile.js', // PLACEHOLDER: CORDOVA SRIPT
'js/init.js'
],
dest: 'js/copayMain.js'
}
@ -136,7 +140,9 @@ module.exports = function(grunt) {
},
prod: {
files: {
'js/copayMain.js': ['js/copayMain.js']
'js/copayMain.js': ['js/copayMain.js'],
'lib/angularjs-all.js': ['lib/angularjs-all.js'],
'lib/vendors.js': ['lib/vendors.js']
}
}
}

View File

@ -53,10 +53,6 @@
</div>
</div>
<script src="lib/mousetrap/mousetrap.min.js"></script>
<!-- shell must be loaded before moment due to the way moment loads in a commonjs env -->
<script src="js/shell.js"></script>
<script src="lib/vendors.js"></script>
<script src="lib/zeroclipboard/dist/ZeroClipboard.min.js"></script>
<script src="lib/angularjs-all.js"></script>
@ -65,9 +61,5 @@
<script src="js/copayBundle.js"></script>
<script src="js/copayMain.js"></script>
<!-- PLACEHOLDER: CORDOVA SRIPT -->
<script src="js/mobile.js"></script>
<script src="js/init.js"></script>
</body>
</html>