strongloop / loopback-example-offline-sync

Offline sync, change tracking, and replication.
http://loopback.io/doc/en/lb2/Synchronization.html
Other
286 stars 110 forks source link

Grunt build does not work properly #52

Closed arlejeun closed 9 years ago

arlejeun commented 9 years ago

Hi, I'm really interested in using this full-stack example as a project structure with build automation but I'm running into an issue. 'grunt serve' works just fine but when I run the 'grunt build' the script in the client/dist/scripts.c95494af.js is empty therefore the 'grunt serve:dist' is not running properly.

I googled quite a lot and tried to play with the grunt config file with no success. Can you please help me to start on the right foot.

Running "clean:dist" (clean) task
Verifying property clean.dist exists in config...OK
Files: .tmp, client/dist/favicon.ico, client/dist/index.html, client/dist/robots.txt, client/dist/scripts, client/dist/scripts/scripts.c95494af.js, client/dist/scripts/vendor.d41d8cd9.js, client/dist/styles, client/dist/styles/main.291524af.css, client/dist/views, client/dist/views/changes.html, client/dist/views/login.html, client/dist/views/register.html, client/dist/views/todos.html, client/dist/views/user.html, client/dist/views/welcome.html
Options: force=false, no-write=false
Options: force=false, no-write=false
Cleaning .tmp...OK
Cleaning client/dist/favicon.ico...OK
Cleaning client/dist/index.html...OK
Cleaning client/dist/robots.txt...OK
Cleaning client/dist/scripts...OK
Cleaning client/dist/styles...OK
Cleaning client/dist/views...OK

Running "build-lbclient" task

Running "build-config" task

Running "wiredep" task

Running "wiredep:app" (wiredep) task
Verifying property wiredep.app exists in config...OK
Files: client/ngapp/index.html
Verifying property wiredep.app.src exists in config...OK
Options: src=["client/ngapp/index.html"], ignorePath={}, cwd="client/ngapp", bowerJson={"name":"loopback-example-full-stack","version":"0.0.0","homepage":"https://github.com/strongloop/loopback-example-full-stack","authors":["Sam Roberts <sam@strongloop.com>"],"license":"MIT","private":true,"appPath":"client/ngapp","testPath":"client/ngapp/test/spec","ignore":["**/.*","node_modules","**/bower_components","test","tests"],"dependencies":{"angular":"~1.2.16","json3":"~3.3.1","es5-shim":"~3.1.0","angular-route":"~1.2.16"},"devDependencies":{"angular-mocks":"~1.2.16","angular-scenario":"~1.2.16"}}, directory="./bower_components"

Running "useminPrepare" task

Running "useminPrepare:html" (useminPrepare) task
Verifying property useminPrepare.html exists in config...OK
Files: client/ngapp/index.html -> html
Options: dest="client/dist", flow={"html":{"steps":{"js":["concat","uglifyjs"],"css":["cssmin"]},"post":{}}}
Going through client/ngapp/index.html to update the config
Looking for build script HTML comment blocks

Configuration is now:

  concat:
  { generated: 
   { files: 
      [ { dest: '.tmp/concat/scripts/vendor.js',
          src: 
           [ '../bower_components/es5-shim/es5-shim.js',
             '../bower_components/angular/angular.js',
             '../bower_components/json3/lib/json3.js',
             '../bower_components/angular-route/angular-route.js' ] },
        { dest: '.tmp/concat/scripts/scripts.js',
          src: 
           [ 'client/lbclient/browser.bundle.js',
             'client/config/bundle.js',
             'client/scripts/app.js',
             'client/scripts/services/lbclient.js',
             'client/scripts/controllers/home.js',
             'client/scripts/controllers/user.js',
             'client/scripts/controllers/todo.js',
             'client/scripts/controllers/login.js',
             'client/scripts/controllers/register.js',
             'client/scripts/controllers/change.js' ] } ] } }

  uglify:
  { generated: 
   { files: 
      [ { dest: 'client/dist/scripts/vendor.js',
          src: [ '.tmp/concat/scripts/vendor.js' ] },
        { dest: 'client/dist/scripts/scripts.js',
          src: [ '.tmp/concat/scripts/scripts.js' ] } ] } }

  cssmin:
  { generated: 
   { files: 
      [ { dest: 'client/dist/styles/vendor.css', src: [] },
        { dest: 'client/dist/styles/main.css',
          src: [ '.tmp/styles/main.css' ] } ] } }

Running "concurrent:dist" (concurrent) task
Verifying property concurrent.dist exists in config...OK
Files: [no src] -> dist
Options: limit=4

Running "concat:generated" (concat) task
Verifying property concat.generated exists in config...OK
Files: [no src] -> .tmp/concat/scripts/vendor.js
Files: client/lbclient/browser.bundle.js -> .tmp/concat/scripts/scripts.js
Options: separator="\n", banner="", footer="", stripBanners=false, process=false, sourceMap=false, sourceMapName=undefined, sourceMapStyle="embed"
Writing .tmp/concat/scripts/vendor.js...OK
File .tmp/concat/scripts/vendor.js created.
Reading client/lbclient/browser.bundle.js...OK
Writing .tmp/concat/scripts/scripts.js...OK
File .tmp/concat/scripts/scripts.js created.

Running "ngAnnotate" task

Running "ngAnnotate:dist" (ngAnnotate) task
Verifying property ngAnnotate.dist exists in config...OK
Files: .tmp/concat/scripts/scripts.js -> .tmp/concat/scripts/scripts.js
Files: .tmp/concat/scripts/vendor.js -> .tmp/concat/scripts/vendor.js
Options: (none)
Reading .tmp/concat/scripts/scripts.js...OK
Writing .tmp/concat/scripts/scripts.js...OK
Reading .tmp/concat/scripts/scripts.js...OK
Writing .tmp/concat/scripts/scripts.js...OK
Reading .tmp/concat/scripts/vendor.js...OK
Writing .tmp/concat/scripts/vendor.js...OK
Reading .tmp/concat/scripts/vendor.js...OK
Writing .tmp/concat/scripts/vendor.js...OK
>> 2 files successfully generated.

Running "copy:dist" (copy) task
Verifying property copy.dist exists in config...OK
Files: client/ngapp/favicon.ico -> client/dist/favicon.ico
Files: client/ngapp/robots.txt -> client/dist/robots.txt
Files: client/ngapp/index.html -> client/dist/index.html
Files: client/ngapp/views/changes.html -> client/dist/views/changes.html
Files: client/ngapp/views/login.html -> client/dist/views/login.html
Files: client/ngapp/views/register.html -> client/dist/views/register.html
Files: client/ngapp/views/todos.html -> client/dist/views/todos.html
Files: client/ngapp/views/user.html -> client/dist/views/user.html
Files: client/ngapp/views/welcome.html -> client/dist/views/welcome.html
Options: encoding="utf8", processContent=false, processContentExclude=[], mode=false
Copying client/ngapp/favicon.ico -> client/dist/favicon.ico
Reading client/ngapp/favicon.ico...OK
Writing client/dist/favicon.ico...OK
Copying client/ngapp/robots.txt -> client/dist/robots.txt
Reading client/ngapp/robots.txt...OK
Writing client/dist/robots.txt...OK
Copying client/ngapp/index.html -> client/dist/index.html
Reading client/ngapp/index.html...OK
Writing client/dist/index.html...OK
Copying client/ngapp/views/changes.html -> client/dist/views/changes.html
Reading client/ngapp/views/changes.html...OK
Writing client/dist/views/changes.html...OK
Copying client/ngapp/views/login.html -> client/dist/views/login.html
Reading client/ngapp/views/login.html...OK
Writing client/dist/views/login.html...OK
Copying client/ngapp/views/register.html -> client/dist/views/register.html
Reading client/ngapp/views/register.html...OK
Writing client/dist/views/register.html...OK
Copying client/ngapp/views/todos.html -> client/dist/views/todos.html
Reading client/ngapp/views/todos.html...OK
Writing client/dist/views/todos.html...OK
Copying client/ngapp/views/user.html -> client/dist/views/user.html
Reading client/ngapp/views/user.html...OK
Writing client/dist/views/user.html...OK
Copying client/ngapp/views/welcome.html -> client/dist/views/welcome.html
Reading client/ngapp/views/welcome.html...OK
Writing client/dist/views/welcome.html...OK
Copied 9 files

Running "cdnify" task

Running "cdnify:dist" (cdnify) task
Verifying property cdnify.dist exists in config...OK
File: [no files]
Reading bower.json...OK
Parsing bower.json...OK
Options: cdn="google"
Going through client/dist/index.html to update script refs
Reading client/dist/index.html...OK
✔ bower_components/angular/angular.js changed to //ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js
✔ bower_components/angular-route/angular-route.js changed to //ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular-route.min.js
Writing client/dist/index.html...OK

Running "cssmin" task

Running "cssmin:generated" (cssmin) task
Verifying property cssmin.generated exists in config...OK
Files: [no src] -> client/dist/styles/vendor.css
Files: .tmp/styles/main.css -> client/dist/styles/main.css
Options: report="min"
>> Destination not written because minified CSS was empty.
Reading .tmp/styles/main.css...OK
Writing client/dist/styles/main.css...OK
File client/dist/styles/main.css created: 9.8 kB → 7.54 kB

Running "uglify" task

Running "uglify:generated" (uglify) task
Verifying property uglify.generated exists in config...OK
Files: .tmp/concat/scripts/vendor.js -> client/dist/scripts/vendor.js
Files: .tmp/concat/scripts/scripts.js -> client/dist/scripts/scripts.js
Options: banner="", footer="", compress={"warnings":false}, mangle={}, beautify=false, report="min", expression=false
Minifying with UglifyJS...Reading .tmp/concat/scripts/vendor.js...OK
OK
Writing client/dist/scripts/vendor.js...OK
File client/dist/scripts/vendor.js created: 0 B → 0 B
Minifying with UglifyJS...Reading .tmp/concat/scripts/scripts.js...OK
OK
Writing client/dist/scripts/scripts.js...OK
File client/dist/scripts/scripts.js created: 3.67 MB → 464.74 kB

Running "filerev" task

Running "filerev:dist" (filerev) task
Verifying property filerev.dist exists in config...OK
Files: client/dist/scripts/scripts.js, client/dist/scripts/vendor.js, client/dist/styles/main.css
Options: encoding="utf8", algorithm="md5", length=8
Reading client/dist/scripts/scripts.js...OK
✔ client/dist/scripts/scripts.js changed to scripts.c95494af.js
Reading client/dist/scripts/vendor.js...OK
✔ client/dist/scripts/vendor.js changed to vendor.d41d8cd9.js
Reading client/dist/styles/main.css...OK
✔ client/dist/styles/main.css changed to main.291524af.css

Running "usemin" task

Running "usemin:html" (usemin) task
Verifying property usemin.html exists in config...OK
Files: client/dist/index.html, client/dist/views/changes.html, client/dist/views/login.html, client/dist/views/register.html, client/dist/views/todos.html, client/dist/views/user.html, client/dist/views/welcome.html -> html
Options: type="html", assetsDirs=["client/dist","client/dist/images"]
Processing as HTML - client/dist/index.html
Update the HTML to reference our concat/min/revved script files
scripts/vendor.js changed to scripts/vendor.d41d8cd9.js
scripts/scripts.js changed to scripts/scripts.c95494af.js
Update the HTML with the new css filenames
styles/main.css changed to styles/main.291524af.css
Update the HTML with the new img filenames
Update the HTML with the new video filenames
Update the HTML with the new poster filenames
Update the HTML with the new source 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
Update the HTML with the new img filenames in meta tags
Update the HTML with the new object filenames
Update the HTML with the new image filenames for svg xlink:href links
Update the HTML with the new image filenames for src links
Update the HTML with the new image filenames for srcset links
Update the HTML within the <use> tag when referencing an external url with svg sprites as in svg4everybody
Writing client/dist/index.html...OK
Processing as HTML - client/dist/views/changes.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 the new video filenames
Update the HTML with the new poster filenames
Update the HTML with the new source 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
Update the HTML with the new img filenames in meta tags
Update the HTML with the new object filenames
Update the HTML with the new image filenames for svg xlink:href links
Update the HTML with the new image filenames for src links
Update the HTML with the new image filenames for srcset links
Update the HTML within the <use> tag when referencing an external url with svg sprites as in svg4everybody
Writing client/dist/views/changes.html...OK
Processing as HTML - client/dist/views/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 the new video filenames
Update the HTML with the new poster filenames
Update the HTML with the new source 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
Update the HTML with the new img filenames in meta tags
Update the HTML with the new object filenames
Update the HTML with the new image filenames for svg xlink:href links
Update the HTML with the new image filenames for src links
Update the HTML with the new image filenames for srcset links
Update the HTML within the <use> tag when referencing an external url with svg sprites as in svg4everybody
Writing client/dist/views/login.html...OK
Processing as HTML - client/dist/views/register.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 the new video filenames
Update the HTML with the new poster filenames
Update the HTML with the new source 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
Update the HTML with the new img filenames in meta tags
Update the HTML with the new object filenames
Update the HTML with the new image filenames for svg xlink:href links
Update the HTML with the new image filenames for src links
Update the HTML with the new image filenames for srcset links
Update the HTML within the <use> tag when referencing an external url with svg sprites as in svg4everybody
Writing client/dist/views/register.html...OK
Processing as HTML - client/dist/views/todos.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 the new video filenames
Update the HTML with the new poster filenames
Update the HTML with the new source 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
Update the HTML with the new img filenames in meta tags
Update the HTML with the new object filenames
Update the HTML with the new image filenames for svg xlink:href links
Update the HTML with the new image filenames for src links
Update the HTML with the new image filenames for srcset links
Update the HTML within the <use> tag when referencing an external url with svg sprites as in svg4everybody
Writing client/dist/views/todos.html...OK
Processing as HTML - client/dist/views/user.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 the new video filenames
Update the HTML with the new poster filenames
Update the HTML with the new source 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
Update the HTML with the new img filenames in meta tags
Update the HTML with the new object filenames
Update the HTML with the new image filenames for svg xlink:href links
Update the HTML with the new image filenames for src links
Update the HTML with the new image filenames for srcset links
Update the HTML within the <use> tag when referencing an external url with svg sprites as in svg4everybody
Writing client/dist/views/user.html...OK
Processing as HTML - client/dist/views/welcome.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 the new video filenames
Update the HTML with the new poster filenames
Update the HTML with the new source 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
Update the HTML with the new img filenames in meta tags
Update the HTML with the new object filenames
Update the HTML with the new image filenames for svg xlink:href links
Update the HTML with the new image filenames for src links
Update the HTML with the new image filenames for srcset links
Update the HTML within the <use> tag when referencing an external url with svg sprites as in svg4everybody
Writing client/dist/views/welcome.html...OK
Replaced 7 references to assets

Running "usemin:css" (usemin) task
Verifying property usemin.css exists in config...OK
Files: client/dist/styles/main.291524af.css -> css
Options: type="css", assetsDirs=["client/dist","client/dist/images"]
Processing as CSS - client/dist/styles/main.291524af.css
Update the CSS to reference our revved images
Writing client/dist/styles/main.291524af.css...OK
Replaced 1 reference to assets

Running "htmlmin" task

Running "htmlmin:dist" (htmlmin) task
Verifying property htmlmin.dist exists in config...OK
Files: client/dist/index.html -> client/dist/index.html
Files: client/dist/views/changes.html -> client/dist/views/changes.html
Files: client/dist/views/login.html -> client/dist/views/login.html
Files: client/dist/views/register.html -> client/dist/views/register.html
Files: client/dist/views/todos.html -> client/dist/views/todos.html
Files: client/dist/views/user.html -> client/dist/views/user.html
Files: client/dist/views/welcome.html -> client/dist/views/welcome.html
Options: collapseWhitespace, conservativeCollapse, collapseBooleanAttributes, removeCommentsFromCDATA, removeOptionalTags
Reading client/dist/index.html...OK
Writing client/dist/index.html...OK
Minified client/dist/index.html 1.43 kB → 1.28 kB
Reading client/dist/views/changes.html...OK
Writing client/dist/views/changes.html...OK
Minified client/dist/views/changes.html 1.94 kB → 1.6 kB
Reading client/dist/views/login.html...OK
Writing client/dist/views/login.html...OK
Minified client/dist/views/login.html 43 B → 41 B
Reading client/dist/views/register.html...OK
Writing client/dist/views/register.html...OK
Minified client/dist/views/register.html 46 B → 44 B
Reading client/dist/views/todos.html...OK
Writing client/dist/views/todos.html...OK
Minified client/dist/views/todos.html 4.28 kB → 3.38 kB
Reading client/dist/views/user.html...OK
Writing client/dist/views/user.html...OK
Minified client/dist/views/user.html 42 B → 40 B
Reading client/dist/views/welcome.html...OK
Writing client/dist/views/welcome.html...OK
Minified client/dist/views/welcome.html 90 B → 87 B

Done, without errors.

Execution Time (2015-01-09 05:21:51 UTC) loading tasks 6ms 0% clean:dist 18ms 0% build-lbclient 3.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 19% build-config 3ms 0% wiredep:app 238ms ▇▇▇ 1% useminPrepare:html 55ms 0% concurrent:dist 3.8s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 23% autoprefixer:dist 93ms ▇ 1% concat:generated 68ms 0% ngAnnotate:dist 1.5s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 9% copy:dist 13ms 0% cdnify:dist 2.2s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 14% cssmin:generated 37ms 0% uglify:generated 5.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 31% filerev:dist 13ms 0% usemin:html 20ms 0% usemin:css 5ms 0% htmlmin:dist 23ms 0% Total 16.3s

bajtos commented 9 years ago

Closing as a duplicate of #58.