Skip to content

Instantly share code, notes, and snippets.

@JaKXz
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JaKXz/10438677 to your computer and use it in GitHub Desktop.
Save JaKXz/10438677 to your computer and use it in GitHub Desktop.
merged gruntfile not populating vendor js
Last login: Thu Apr 10 22:32:44 on ttys003
| => grunt build
Running "clean:dist" (clean) task
Cleaning .tmp...OK
Cleaning dist/lib...OK
Cleaning dist/package.json...OK
Cleaning dist/public...OK
Cleaning dist/server.js...OK
Cleaning dist/views...OK
Running "bower-install:app" (bower-install) task
Running "useminPrepare:html" (useminPrepare) task
Going through app/views/index.html to update the config
Looking for build script HTML comment blocks
Configuration is now:
concat:
{ generated:
{ files:
[ { dest: '.tmp/concat/styles/vendor.css',
src: [ 'app/views/bower_components/bootstrap/dist/css/bootstrap.css' ] },
{ dest: '.tmp/concat/styles/main.css',
src: [ '{.tmp,app}/styles/main.css' ] },
{ dest: '.tmp/concat/scripts/vendor.js',
src:
[ 'app/views/bower_components/jquery/dist/jquery.js',
'app/views/bower_components/angular/angular.js',
'app/views/bower_components/bootstrap/dist/js/bootstrap.js',
'app/views/bower_components/angular-resource/angular-resource.js',
'app/views/bower_components/angular-cookies/angular-cookies.js',
'app/views/bower_components/angular-sanitize/angular-sanitize.js',
'app/views/bower_components/angular-route/angular-route.js',
'app/views/bower_components/angular-bootstrap/ui-bootstrap-tpls.js' ] },
{ dest: '.tmp/concat/scripts/scripts.js',
src:
[ '{.tmp,app}/scripts/app.js',
'{.tmp,app}/scripts/controllers/main.js',
'{.tmp,app}/scripts/controllers/navbar.js',
'{.tmp,app}/scripts/controllers/About.js',
'{.tmp,app}/scripts/controllers/clientOrder.js',
'{.tmp,app}/scripts/controllers/settings.js',
'{.tmp,app}/scripts/services/Product.js',
'{.tmp,app}/scripts/services/auth.js',
'{.tmp,app}/scripts/services/session.js',
'{.tmp,app}/scripts/services/user.js',
'{.tmp,app}/scripts/directives/mongooseError.js',
'{.tmp,app}/scripts/services/order.js',
'{.tmp,app}/scripts/controllers/clientsidenav.js',
'{.tmp,app}/scripts/controllers/clientincoming.js',
'{.tmp,app}/scripts/controllers/productInput.js',
'{.tmp,app}/scripts/controllers/outgoing.js',
'{.tmp,app}/scripts/controllers/distributorsidenav.js' ] } ] } }
uglify:
{ generated:
{ files:
[ { dest: 'dist/public/scripts/vendor.js',
src: [ '.tmp/concat/scripts/vendor.js' ] },
{ dest: 'dist/public/scripts/scripts.js',
src: [ '.tmp/concat/scripts/scripts.js' ] } ] } }
cssmin:
{ generated:
{ files:
[ { dest: 'dist/public/styles/vendor.css',
src: [ '.tmp/concat/styles/vendor.css' ] },
{ dest: 'dist/public/styles/main.css',
src: [ '.tmp/concat/styles/main.css' ] } ] } }
Running "concurrent:dist" (concurrent) task
Running "copy:styles" (copy) task
Copied 1 files
Done, without errors.
Execution Time (2014-04-11 03:39:22 UTC)
loading tasks 5ms ▇▇▇▇▇▇▇▇▇▇▇▇▇ 26%
copy:styles 13ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 68%
Total 19ms
Running "htmlmin:dist" (htmlmin) task
File dist/views/404.html created.
File dist/views/about.html created.
File dist/views/index.html created.
File dist/views/main.html created.
File dist/views/settings.html created.
File dist/views/partials/clientsidenav.html created.
File dist/views/partials/confirmOrder.html created.
File dist/views/partials/distributorsidenav.html created.
File dist/views/partials/login.html created.
File dist/views/partials/navbar.html created.
File dist/views/partials/signup.html created.
Done, without errors.
Execution Time (2014-04-11 03:39:22 UTC)
loading tasks 6ms ▇▇▇▇▇ 10%
htmlmin 6ms ▇▇▇▇▇ 10%
htmlmin:dist 46ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 78%
Total 59ms
Running "svgmin:dist" (svgmin) task
Done, without errors.
Execution Time (2014-04-11 03:39:22 UTC)
loading tasks 5ms ▇▇ 3%
svgmin:dist 157ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 96%
Total 164ms
Running "imagemin:dist" (imagemin) task
✔ app/images/yeoman.png (saved 5.01 kB)
Minified 1 image (saved 5.01 kB)
Done, without errors.
Execution Time (2014-04-11 03:39:22 UTC)
imagemin:dist 788ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 99%
Total 795ms
Running "autoprefixer:dist" (autoprefixer) task
Prefixed file ".tmp/styles/main.css" created.
Running "concat:generated" (concat) task
File ".tmp/concat/styles/vendor.css" created.
File ".tmp/concat/styles/main.css" created.
File ".tmp/concat/scripts/vendor.js" created.
File ".tmp/concat/scripts/scripts.js" created.
Running "ngmin:dist" (ngmin) task
ngminifying .tmp/concat/scripts/scripts.js, .tmp/concat/scripts/vendor.js
Running "copy:dist" (copy) task
Created 52 directories, copied 290 files
Running "cdnify:dist" (cdnify) task
Going through dist/views/404.html, dist/views/about.html, dist/views/index.html, dist/views/main.html, dist/views/settings.html to update script refs
Running "cssmin:generated" (cssmin) task
>> Destination not written because minified CSS was empty.
File dist/public/styles/main.css created.
Running "uglify:generated" (uglify) task
File "dist/public/scripts/vendor.js" created.
File "dist/public/scripts/scripts.js" created.
Running "rev:dist" (rev) task
dist/public/scripts/scripts.js >> 3701fc00.scripts.js
dist/public/scripts/vendor.js >> d41d8cd9.vendor.js
dist/public/styles/main.css >> 6e9a1625.main.css
dist/public/images/yeoman.png >> b0840d14.yeoman.png
Running "usemin:html" (usemin) task
Processing as HTML - dist/views/404.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/about.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/index.html
Update the HTML to reference our concat/min/revved script files
<script src="scripts/vendor.js" changed to <script src="scripts/d41d8cd9.vendor.js"
<script src="scripts/scripts.js" changed to <script src="scripts/3701fc00.scripts.js"
Update the HTML with the new css filenames
<link rel="stylesheet" href="styles/main.css" changed to <link rel="stylesheet" href="styles/6e9a1625.main.css"
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/main.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/partials/clientsidenav.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/partials/confirmOrder.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/partials/distributorsidenav.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/partials/login.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/partials/navbar.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/partials/signup.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Processing as HTML - dist/views/settings.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with data-* tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input
Running "usemin:css" (usemin) task
Processing as CSS - dist/public/styles/6e9a1625.main.css
Update the CSS to reference our revved images
Done, without errors.
Execution Time (2014-04-11 03:39:20 UTC)
clean:dist 51ms ▇ 1%
concurrent:dist 3.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 74%
ngmin:dist 309ms ▇▇▇▇ 7%
copy:dist 382ms ▇▇▇▇▇ 9%
uglify:generated 147ms ▇▇ 4%
Total 4.1s
// Generated on 2014-03-25 using generator-angular-fullstack 1.3.2
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
// Define the configuration for all the tasks
grunt.initConfig({
// Project settings
yeoman: {
// configurable paths
app: require('./bower.json').appPath || 'app',
dist: 'dist'
},
express: {
options: {
port: process.env.PORT || 9000
},
dev: {
options: {
script: 'server.js',
debug: true
}
},
prod: {
options: {
script: 'dist/server.js',
node_env: 'production'
}
}
},
open: {
server: {
url: 'http://localhost:<%= express.options.port %>'
}
},
watch: {
js: {
files: ['<%= yeoman.app %>/scripts/{,*/}*.js'],
tasks: ['newer:jshint:all'],
options: {
livereload: true
}
},
mochaTest: {
files: ['test/server/{,*/}*.js'],
tasks: ['mochaTest']
},
jsTest: {
files: ['test/client/spec/{,*/}*.js'],
tasks: ['newer:jshint:test', 'karma']
},
styles: {
files: ['<%= yeoman.app %>/styles/{,*/}*.css'],
tasks: ['newer:copy:styles', 'autoprefixer']
},
gruntfile: {
files: ['Gruntfile.js']
},
livereload: {
files: [
'<%= yeoman.app %>/views/{,*//*}*.{html,jade}',
'{.tmp,<%= yeoman.app %>}/styles/{,*//*}*.css',
'{.tmp,<%= yeoman.app %>}/scripts/{,*//*}*.js',
'<%= yeoman.app %>/images/{,*//*}*.{png,jpg,jpeg,gif,webp,svg}',
],
options: {
livereload: true
}
},
express: {
files: [
'server.js',
'lib/**/*.{js,json}'
],
tasks: ['newer:jshint:server', 'express:dev', 'wait'],
options: {
livereload: true,
nospawn: true //Without this option specified express won't be reloaded
}
}
},
// Make sure code styles are up to par and there are no obvious mistakes
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
server: {
options: {
jshintrc: 'lib/.jshintrc'
},
src: [ 'lib/{,*/}*.js']
},
all: [
'<%= yeoman.app %>/scripts/{,*/}*.js'
],
test: {
options: {
jshintrc: 'test/client/.jshintrc'
},
src: ['test/client/spec/{,*/}*.js']
}
},
// Empties folders to start fresh
clean: {
dist: {
files: [{
dot: true,
src: [
'.tmp',
'<%= yeoman.dist %>/*',
'!<%= yeoman.dist %>/.git*',
'!<%= yeoman.dist %>/Procfile'
]
}]
},
heroku: {
files: [{
dot: true,
src: [
'heroku/*',
'!heroku/.git*',
'!heroku/Procfile'
]
}]
},
server: '.tmp'
},
// Add vendor prefixed styles
autoprefixer: {
options: {
browsers: ['last 1 version']
},
dist: {
files: [{
expand: true,
cwd: '.tmp/styles/',
src: '{,*/}*.css',
dest: '.tmp/styles/'
}]
}
},
// Debugging with node inspector
'node-inspector': {
custom: {
options: {
'web-host': 'localhost'
}
}
},
// Use nodemon to run server in debug mode with an initial breakpoint
nodemon: {
debug: {
script: 'server.js',
options: {
nodeArgs: ['--debug-brk'],
env: {
PORT: process.env.PORT || 9000
},
callback: function (nodemon) {
nodemon.on('log', function (event) {
console.log(event.colour);
});
// opens browser on initial server start
nodemon.on('config:update', function () {
setTimeout(function () {
require('open')('http://localhost:8080/debug?port=5858');
}, 500);
});
}
}
}
},
// Automatically inject Bower components into the app
'bower-install': {
app: {
html: '<%= yeoman.app %>/views/index.html',
ignorePath: '<%= yeoman.app %>/'
}
},
// Renames files for browser caching purposes
rev: {
dist: {
files: {
src: [
'<%= yeoman.dist %>/public/scripts/{,*/}*.js',
'<%= yeoman.dist %>/public/styles/{,*/}*.css',
'<%= yeoman.dist %>/public/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
'<%= yeoman.dist %>/public/styles/fonts/*'
]
}
}
},
// Reads HTML for usemin blocks to enable smart builds that automatically
// concat, minify and revision files. Creates configurations in memory so
// additional tasks can operate on them
useminPrepare: {
html: ['<%= yeoman.app %>/views/index.html',
'<%= yeoman.app %>/views/index.jade'],
options: {
dest: '<%= yeoman.dist %>/public'
}
},
// Performs rewrites based on rev and the useminPrepare configuration
usemin: {
html: ['<%= yeoman.dist %>/views/{,*/}*.html',
'<%= yeoman.dist %>/views/{,*/}*.jade'],
css: ['<%= yeoman.dist %>/public/styles/{,*/}*.css'],
options: {
assetsDirs: ['<%= yeoman.dist %>/public']
}
},
// The following *-min tasks produce minified files in the dist folder
imagemin: {
dist: {
files: [{
expand: true,
cwd: '<%= yeoman.app %>/images',
src: '{,*/}*.{png,jpg,jpeg,gif}',
dest: '<%= yeoman.dist %>/public/images'
}]
}
},
svgmin: {
dist: {
files: [{
expand: true,
cwd: '<%= yeoman.app %>/images',
src: '{,*/}*.svg',
dest: '<%= yeoman.dist %>/public/images'
}]
}
},
htmlmin: {
dist: {
options: {
//collapseWhitespace: true,
//collapseBooleanAttributes: true,
//removeCommentsFromCDATA: true,
//removeOptionalTags: true
},
files: [{
expand: true,
cwd: '<%= yeoman.app %>/views',
src: ['*.html', 'partials/**/*.html'],
dest: '<%= yeoman.dist %>/views'
}]
}
},
// Allow the use of non-minsafe AngularJS files. Automatically makes it
// minsafe compatible so Uglify does not destroy the ng references
ngmin: {
dist: {
files: [{
expand: true,
cwd: '.tmp/concat/scripts',
src: '*.js',
dest: '.tmp/concat/scripts'
}]
}
},
// Replace Google CDN references
cdnify: {
dist: {
html: ['<%= yeoman.dist %>/views/*.html']
}
},
// Copies remaining files to places other tasks can use
copy: {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>/public',
src: [
'*.{ico,png,txt}',
'.htaccess',
'bower_components/**/*',
'images/{,*/}*.{webp}',
'fonts/**/*'
]
}, {
expand: true,
dot: true,
cwd: '<%= yeoman.app %>/views',
dest: '<%= yeoman.dist %>/views',
src: '**/*.jade'
}, {
expand: true,
cwd: '.tmp/images',
dest: '<%= yeoman.dist %>/public/images',
src: ['generated/*']
}, {
expand: true,
dest: '<%= yeoman.dist %>',
src: [
'package.json',
'server.js',
'lib/**/*'
]
}]
},
styles: {
expand: true,
cwd: '<%= yeoman.app %>/styles',
dest: '.tmp/styles/',
src: '{,*/}*.css'
}
},
// Run some tasks in parallel to speed up the build process
concurrent: {
server: [
'copy:styles'
],
test: [
'copy:styles'
],
debug: {
tasks: [
'nodemon',
'node-inspector'
],
options: {
logConcurrentOutput: true
}
},
dist: [
'copy:styles',
'imagemin',
'svgmin',
'htmlmin'
]
},
// By default, your `index.html`'s <!-- Usemin block --> will take care of
// minification. These next options are pre-configured if you do not wish
// to use the Usemin blocks.
// cssmin: {
// dist: {
// files: {
// '<%= yeoman.dist %>/styles/main.css': [
// '.tmp/styles/{,*/}*.css',
// '<%= yeoman.app %>/styles/{,*/}*.css'
// ]
// }
// }
// },
// uglify: {
// dist: {
// files: {
// '<%= yeoman.dist %>/scripts/scripts.js': [
// '<%= yeoman.dist %>/scripts/scripts.js'
// ]
// }
// }
// },
// concat: {
// dist: {}
// },
// Test settings
karma: {
unit: {
configFile: 'karma.conf.js',
singleRun: true
}
},
mochaTest: {
options: {
reporter: 'spec'
},
src: ['test/server/**/*.js']
},
env: {
test: {
NODE_ENV: 'test'
}
}
});
// Used for delaying livereload until after server has restarted
grunt.registerTask('wait', function () {
grunt.log.ok('Waiting for server reload...');
var done = this.async();
setTimeout(function () {
grunt.log.writeln('Done waiting!');
done();
}, 500);
});
grunt.registerTask('express-keepalive', 'Keep grunt running', function() {
this.async();
});
grunt.registerTask('serve', function (target) {
if (target === 'dist') {
return grunt.task.run(['build', 'express:prod', 'open', 'express-keepalive']);
}
if (target === 'debug') {
return grunt.task.run([
'clean:server',
'bower-install',
'concurrent:server',
'autoprefixer',
'concurrent:debug'
]);
}
grunt.task.run([
'clean:server',
'bower-install',
'concurrent:server',
'autoprefixer',
'express:dev',
'open',
'watch'
]);
});
grunt.registerTask('server', function () {
grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
grunt.task.run(['serve']);
});
grunt.registerTask('test', function(target) {
if (target === 'server') {
return grunt.task.run([
'env:test',
'mochaTest'
]);
}
if (target === 'client') {
return grunt.task.run([
'clean:server',
'concurrent:test',
'autoprefixer',
'karma'
]);
}
grunt.task.run([
'env:test',
'mochaTest',
'clean:server',
'concurrent:test',
'autoprefixer',
'karma'
]);
});
grunt.registerTask('build', [
'clean:dist',
'bower-install',
'useminPrepare',
'concurrent:dist',
'autoprefixer',
'concat',
'ngmin',
'copy:dist',
'cdnify',
'cssmin',
'uglify',
'rev',
'usemin'
]);
grunt.registerTask('heroku', function () {
grunt.log.warn('The `heroku` task has been deprecated. Use `grunt build` to build for deployment.');
grunt.task.run(['build']);
});
grunt.registerTask('default', [
'newer:jshint',
'test',
'build'
]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment