shake

WebJar for shake

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

shake
Последняя версия

Последняя версия

0.0.9
Дата

Дата

Тип

Тип

jar
Описание

Описание

shake
WebJar for shake
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/wearefractal/shake

Скачать shake

Имя Файла Размер
shake-0.0.9.pom
shake-0.0.9.jar 8 KB
shake-0.0.9-sources.jar 22 bytes
shake-0.0.9-javadoc.jar 22 bytes
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/shake/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>shake</artifactId>
    <version>0.0.9</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/shake/
implementation 'org.webjars.npm:shake:0.0.9'
// https://jarcasting.com/artifacts/org.webjars.npm/shake/
implementation ("org.webjars.npm:shake:0.0.9")
'org.webjars.npm:shake:jar:0.0.9'
<dependency org="org.webjars.npm" name="shake" rev="0.0.9">
  <artifact name="shake" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='shake', version='0.0.9')
)
libraryDependencies += "org.webjars.npm" % "shake" % "0.0.9"
[org.webjars.npm/shake "0.0.9"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.webjars.npm : coffee-script jar [0,)
org.webjars.npm » loggo jar [0,)
org.webjars.npm : commander jar [0,)
org.webjars.npm : async jar [0,)

Модули Проекта

Данный проект не имеет модулей.

Information

Package shake
Description Deployment tool for node
Node Version >= 0.4

Usage

Running tasks

$ shake setup:deploy:something["some arg", true, 2]:status

Defining Tasks

Add a .shake.coffee or .shake.js file to your project root.

A task is a function that takes 3 arguments. Any arguments inside [ and ] will be applied to the task function after the initial 3.

module.exports =
  sometask: (local, remote, done) ->
    # local = local machine
    # remote = remote machine (defined in target)
    local.exec """
    whoami
    ls -la
    mkdir test
    """, (res) ->
      # res = array of stdout+stderr
      remote.exec "ls -la", (res) ->
        done() # Call this when the task is finished

Example config

Here is an example config demonstrating basic functionality:

# This is a non-standard config used only within this config
# you can make this file look like whatever you want as long as you export
# your tasks and target
app =
  sudo: "sudo" # Change this to "" to disable sudo
  parent: '/var/www/'
  name: 'your cool app name'
app.repository = "git@github.com:your cool username/#{app.name}.git"
app.folder = "#{app.parent}#{app.name}/"
app.start = "coffee #{app.folder}start.coffee"
app.log = "/var/log/#{app.name}.log"


module.exports =
  target: 'cool server'
  clean: (local, remote, done) ->
    remote.exec """
    #{app.sudo} rm -rf #{app.folder}
    """, done

  setup: (local, remote, done) ->
    remote.exec """
    NAME=`whoami`;
    #{app.sudo} mkdir -p #{app.folder}
    #{app.sudo} chown -R $NAME:$NAME #{app.folder}
    git clone #{app.repository} #{app.folder}
    cd #{app.folder}
    npm install
    """, done

  deploy: (local, remote, done) ->
    remote.exec """
    cd #{app.folder}
    git pull
    sudo killall node
    npm install
    #{app.sudo} stop #{app.name}
    #{app.sudo} start #{app.name}
    """, done

  start: (local, remote, done) ->
    remote.exec "#{app.sudo} start #{app.name}", done

  stop: (local, remote, done) ->
    remote.exec "#{app.sudo} stop #{app.name}", done

  restart: (local, remote, done) ->
    remote.exec "#{app.sudo} restart #{app.name}", done

  log: (local, remote, done) ->
    remote.exec "tail -n 100 #{app.log}", done

  status: (local, remote, done) ->
    remote.sexec "ps -eo args | grep '#{app.name}' | grep -v grep", (res) ->
      done if res then "Online" else "Offline"
org.webjars.npm

Fractal

Версии библиотеки

Версия
0.0.9