Improved JS for view.php

This commit is contained in:
Tobias Reich 2014-04-02 00:25:54 +02:00
parent f9f9afcade
commit c339116a7f
4 changed files with 22 additions and 41 deletions

File diff suppressed because one or more lines are too long

5
assets/min/view.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ module.exports = (grunt) ->
concat:
frameworks:
view:
options:
separator: "\n"
@ -16,8 +16,10 @@ module.exports = (grunt) ->
'bower_components/mousetrap/mousetrap.min.js'
'bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js'
'../assets/js/_frameworks.js'
'../assets/js/build.js'
'../assets/js/view/main.js'
]
dest: '../assets/min/frameworks.js'
dest: '../assets/min/view.js'
js:
options:
@ -41,6 +43,12 @@ module.exports = (grunt) ->
uglify:
view:
options:
banner: '/*! <%= pkg.name %> <%= pkg.version %> | <%= grunt.template.today("yyyy-mm-dd") %> */\n'
files:
'../assets/min/view.js': '../assets/min/view.js'
assets:
options:
banner: '/*! <%= pkg.name %> <%= pkg.version %> | <%= grunt.template.today("yyyy-mm-dd") %> */\n'
@ -79,11 +87,16 @@ module.exports = (grunt) ->
grunt.registerTask 'default', ->
grunt.task.run [
'concat:frameworks'
'view'
'js'
'css'
]
grunt.registerTask 'view', [
'concat:view'
'uglify:view'
]
grunt.registerTask 'js', [
'concat:js'
'uglify:assets'

View File

@ -59,9 +59,7 @@
<div id="infobox"></div>
<!-- JS -->
<script type="text/javascript" src="assets/min/frameworks.js"></script>
<script type="text/javascript" src="assets/js/build.js"></script>
<script type="text/javascript" src="assets/js/view/main.js"></script>
<script type="text/javascript" src="assets/min/view.js"></script>
</body>
</html>