mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Concatenate vendor js/css where possible
This commit is contained in:
		
							
								
								
									
										31
									
								
								Gruntfile.js
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								Gruntfile.js
									
									
									
									
									
								
							| @@ -118,6 +118,24 @@ module.exports = function(grunt) { | ||||
|                   "editor/js/ui/touch/radialMenu.js" | ||||
|               ], | ||||
|               dest: "public/red/red.js" | ||||
|             }, | ||||
|             vendor: { | ||||
|                 files: { | ||||
|                     "public/vendor/vendor.js": [ | ||||
|                         "editor/vendor/jquery/js/jquery-1.11.1.min.js", | ||||
|                         "editor/vendor/bootstrap/js/bootstrap.min.js", | ||||
|                         "editor/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js", | ||||
|                         "editor/vendor/jquery/js/jquery.ui.touch-punch.min.js", | ||||
|                         "editor/vendor/marked/marked.min.js", | ||||
|                         "editor/vendor/orion/built-editor.min.js", | ||||
|                         "editor/vendor/d3/d3.v3.min.js" | ||||
|                     ], | ||||
|                     "public/vendor/vendor.css": [ | ||||
|                         "editor/vendor/orion/built-editor.css" | ||||
|                         // TODO: resolve relative resource paths in | ||||
|                         //       bootstrap/FA/jquery | ||||
|                     ] | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
|         uglify: { | ||||
| @@ -214,7 +232,13 @@ module.exports = function(grunt) { | ||||
|                 }, | ||||
|                 { | ||||
|                     cwd: 'editor/vendor', | ||||
|                     src: '**', | ||||
|                     src: [ | ||||
|                         'ace/**', | ||||
|                         'bootstrap/css/**', | ||||
|                         'bootstrap/img/**', | ||||
|                         'jquery/css/**', | ||||
|                         'font-awesome/**' | ||||
|                     ], | ||||
|                     expand: true, | ||||
|                     dest: 'public/vendor/' | ||||
|                 }, | ||||
| @@ -244,7 +268,8 @@ module.exports = function(grunt) { | ||||
|                         'nodes/*.demo', | ||||
|                         'nodes/core/**', | ||||
|                         'red/**', | ||||
|                         'public/**' | ||||
|                         'public/**', | ||||
|                         'editor/templates/**' | ||||
|                     ], | ||||
|                     dest: path.resolve('<%= paths.dist %>/node-red-<%= pkg.version %>') | ||||
|                 }] | ||||
| @@ -333,7 +358,7 @@ module.exports = function(grunt) { | ||||
|      | ||||
|     grunt.registerTask('build', | ||||
|         'Builds editor content', | ||||
|         ['clean:build','concat:build','uglify:build','sass:build','copy:build','attachCopyright']); | ||||
|         ['clean:build','concat:build','concat:vendor','uglify:build','sass:build','copy:build','attachCopyright']); | ||||
|      | ||||
|     grunt.registerTask('dev', | ||||
|         'Developer mode: run node-red, watch for source changes and build/restart', | ||||
|   | ||||
| @@ -23,8 +23,8 @@ | ||||
| <title>Node-RED</title> | ||||
| <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> | ||||
| <link href="vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" media="screen"> | ||||
| <link rel="stylesheet" type="text/css" href="vendor/orion/built-editor.css"/> | ||||
| <link rel="stylesheet" type="text/css" href="vendor/font-awesome/css/font-awesome.min.css"/> | ||||
| <link rel="stylesheet" href="vendor/font-awesome/css/font-awesome.min.css"> | ||||
| <link rel="stylesheet" href="vendor/vendor.css"> | ||||
| <link rel="stylesheet" href="red/style.min.css"> | ||||
| </head> | ||||
| <body spellcheck="false"> | ||||
| @@ -168,15 +168,9 @@ | ||||
|     </div> | ||||
| </script> | ||||
|  | ||||
| <script src="vendor/jquery/js/jquery-1.11.1.min.js"></script> | ||||
| <script src="vendor/bootstrap/js/bootstrap.min.js"></script> | ||||
| <script src="vendor/jquery/js/jquery-ui-1.10.3.custom.min.js"></script> | ||||
| <script src="vendor/jquery/js/jquery.ui.touch-punch.min.js"></script> | ||||
| <script src="vendor/marked/marked.min.js"></script> | ||||
| <script src="vendor/orion/built-editor.min.js"></script> | ||||
| <script src="vendor/vendor.js"></script> | ||||
| <script src="vendor/ace/ace.js"></script> | ||||
| <script src="vendor/ace/ext-language_tools.js"></script> | ||||
| <script src="vendor/d3/d3.v3.min.js"></script> | ||||
| <script src="red/red.min.js"></script> | ||||
|  | ||||
| </body> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user