Skip to content

Latest commit

 

History

History
243 lines (241 loc) · 12.7 KB

README.md

File metadata and controls

243 lines (241 loc) · 12.7 KB

Lineman.js on the Heroku Static Buildpack

Deploy

Setup

  • Create a new lineman.js app
$ lineman new foo
$ cd foo
$ git init
$ git add .
$ git commit -m "initial commit"
  • Add a npm postinstall task to package.json
  "scripts": {
    "postinstall": "lineman build"
  }
$ git add package.json
$ git commit -m "build assets during build"
  • Add a static.json
{
  "root": "dist"
}
$ git add static.json
$ git commit -m "configuration for the static buildpack"
  • Create a new heroku app
$ heroku create
  • Setup the node.js buildpack to build the assets and the static buildpack to serve assets
$ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-nodejs
$ heroku buildpacks:add https://github.com/hone/heroku-buildpack-static
  • Tell the node.js buildpack to use dev dependencies
$ heroku config:set NPM_CONFIG_PRODUCTION=false
  • Deploy the heroku app
$ git push heroku master
Counting objects: 44, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (33/33), done.
Writing objects: 100% (44/44), 27.67 KiB | 0 bytes/s, done.
Total 44 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Multipack app detected
remote: -----> Fetching custom git buildpack... done
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NPM_CONFIG_PRODUCTION=false
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote:        engines.node (package.json):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:
remote:        Resolving node version (latest stable) via semver.io...
remote:        Downloading and installing node 0.12.7...
remote:        Using default npm version: 2.11.3
remote:
remote: -----> Restoring cache
remote:        Skipping cache (new runtime signature)
remote:
remote: -----> Building dependencies
remote:        Pruning any extraneous modules
remote:        Installing node modules (package.json)
remote:
remote:        > [email protected] preinstall /tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/js2coffee
remote:        > node ./cyclic.js
remote:
remote:
remote:        > [email protected] install /tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
remote:        > node-gyp rebuild
remote:
remote:        make: Entering directory `/tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build'
remote:          CXX(target) Release/obj.target/validation/src/validation.o
remote:          SOLINK_MODULE(target) Release/obj.target/validation.node
remote:          COPY Release/validation.node
remote:        make: Leaving directory `/tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build'
remote:
remote:        > [email protected] install /tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
remote:        > node-gyp rebuild
remote:
remote:        make: Entering directory `/tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build'
remote:          CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
remote:          SOLINK_MODULE(target) Release/obj.target/bufferutil.node
remote:          COPY Release/bufferutil.node
remote:        make: Leaving directory `/tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build'
remote:
remote:        > [email protected] install /tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate
remote:        > node-gyp rebuild
remote:
remote:        make: Entering directory `/tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build'
remote:          CXX(target) Release/obj.target/validation/src/validation.o
remote:          SOLINK_MODULE(target) Release/obj.target/validation.node
remote:          COPY Release/validation.node
remote:        make: Leaving directory `/tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build'
remote:
remote:        > [email protected] install /tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil
remote:        > node-gyp rebuild
remote:
remote:        make: Entering directory `/tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build'
remote:          CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
remote:          SOLINK_MODULE(target) Release/obj.target/bufferutil.node
remote:          COPY Release/bufferutil.node
remote:        make: Leaving directory `/tmp/build_47481f0eba4a638e337ea80b7cf7970b/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build'
remote:
remote:        > [email protected] postinstall /tmp/build_47481f0eba4a638e337ea80b7cf7970b
remote:        > lineman build
remote:
remote:        Running "clean:dist" (clean) task
remote:
remote:        Running "common" task
remote:
remote:        Running "coffee:compile" (coffee) task
remote:        >> Destination (generated/js/app.coffee.js) not written because compiled files were empty.
remote:        >> Destination (generated/js/spec.coffee.js) not written because compiled files were empty.
remote:        >> Destination (generated/js/spec-helpers.coffee.js) not written because compiled files were empty.
remote:
remote:        Running "jshint:files" (jshint) task
remote:        >> 1 file lint free.
remote:
remote:        Running "handlebars:compile" (handlebars) task
remote:        >> Destination not written because compiled files were empty.
remote:        >> 0 files created.
remote:
remote:        Running "jst:compile" (jst) task
remote:        File "generated/template/underscore.js" created.
remote:
remote:        Running "concat_sourcemap:js" (concat_sourcemap) task
remote:        File "generated/js/app.js" created.
remote:
remote:        Running "concat_sourcemap:spec" (concat_sourcemap) task
remote:        File "generated/js/spec.js" created.
remote:
remote:        Running "concat_sourcemap:css" (concat_sourcemap) task
remote:        File "generated/css/app.css" created.
remote:
remote:        Running "copy:dev" (copy) task
remote:        Created 2 directories, copied 1 files
remote:
remote:        Running "images:dev" (images) task
remote:        Copying images to 'generated/img'
remote:
remote:        Running "webfonts:dev" (webfonts) task
remote:        Copying webfonts to 'generated/webfonts'
remote:
remote:        Running "pages:dev" (pages) task
remote:        generated/index.html generated from app/pages/index.us
remote:
remote:        Running "dist" task
remote:
remote:        Running "uglify:js" (uglify) task
remote:        File "dist/js/app.js" created.
remote:
remote:        Running "cssmin:compress" (cssmin) task
remote:        File dist/css/app.css created.
remote:
remote:        Running "copy:dist" (copy) task
remote:        Created 2 directories, copied 1 files
remote:
remote:        Running "images:dist" (images) task
remote:        Copying images to 'dist/img'
remote:
remote:        Running "webfonts:dist" (webfonts) task
remote:        Copying webfonts to 'dist/webfonts'
remote:
remote:        Running "pages:dist" (pages) task
remote:        dist/index.html generated from app/pages/index.us
remote:
remote:        Done, without errors.
remote:        [email protected] node_modules/lineman
remote:        ├── [email protected]
remote:        ├── [email protected]
remote:        ├── [email protected]
remote:        ├── [email protected] ([email protected])
remote:        ├── [email protected] ([email protected])
remote:        ├── [email protected]
remote:        ├── [email protected]
remote:        ├── [email protected] ([email protected])
remote:        ├── [email protected]
remote:        ├── [email protected] ([email protected], [email protected])
remote:        ├── [email protected]
remote:        ├── [email protected] ([email protected], [email protected])
remote:        ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
remote:        ├── [email protected]
remote:        ├── [email protected]
remote:        ├── [email protected] ([email protected])
remote:        ├── [email protected] ([email protected], [email protected])
remote:        ├── [email protected] ([email protected], [email protected])
remote:        ├── [email protected] ([email protected], [email protected], [email protected], [email protected])
remote:        ├── [email protected] ([email protected], [email protected], [email protected], [email protected])
remote:        ├── [email protected] ([email protected])
remote:        ├── [email protected] ([email protected], [email protected])
remote:        ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
remote:        ├── [email protected] ([email protected], [email protected], [email protected])
remote:        ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
remote:        ├── [email protected] ([email protected], [email protected])
remote:        ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
remote:        └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
remote:
remote: -----> Caching build
remote:        Clearing previous node cache
remote:        Saving 1 cacheDirectories (default):
remote:        - node_modules
remote:
remote: -----> Build succeeded!
remote:        └── [email protected]
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Static HTML app detected
remote:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
remote:                                  Dload  Upload   Total   Spent    Left  Speed
remote: 100  795k  100  795k    0     0  5481k      0 --:--:-- --:--:-- --:--:-- 5522k
remote: -----> Installed directory to /app/bin
remote:
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote:
remote: -----> Compressing... done, 23.7MB
remote: -----> Launching... done, v4
remote:        https://vast-river-2155.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy.... done.
To https://git.heroku.com/vast-river-2155.git
 * [new branch]      master -> master