Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gsp-deploy with all npm packages installed. Try it out:

gsp-deploy lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("gsp-deploy/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gsp-deploy v0.0.2

Deploy files in Gsp projects.


Build Status Dependecies Status


Gsp encourages to use multiple git repositories for development and one subversion repository for production to make code clean, it will be in charge of the synchronous work. Use multiple repositories is very suitable for frontend development, it encourages a independent workflow and can be easly integrated with other tools like JIRA and Phabraicator. Especially, gsp allow static resource files(like javascript and css) combining across repositories which has great significance to the performance of webpage.

Gsp uses git hooks(pre-commit) to integrate lint and unit tests, besides it support coffee and less autocompiling.


Install the application with: npm install -g gsp.

The simulator

Gsp has simulator running for generating temple files based on resource requst, in additon, it can accomplish some tasks like lint and unit tests before commiting changes.

  1. Run gsp pull in a new directory(path/to/workspace, for example) to clone all the development repositories.
  2. Run gsp start on directory above to start a simulator for resource requst
  3. Config a webserver(nginx/apache/lighttpd) and start

Config nginx

server {
  listen       80;
  charset utf-8;

  location ~* \.(?:ttf|eot|woff)$ {
      add_header "Access-Control-Allow-Origin" "*";
      expires 1M;
      access_log off;
      add_header Cache-Control "public";
      proxy_set_header x-request-filename $request_filename;

  location ~* /.+\.[a-z]+$ {

Configs for communication

Gsp use a special domain "" for interacting with server, this domain must link to the machine where the gsp server runs. You can bind it in your DNS provider, or just edit the hosts file.

Repository configuration

Every development repository should contain a .gspconfig file.

  "publish_dir" : "dist",
  "mapping_dir" : "app/home",
  "lint": {
    "js": {
      "engine": "eslint",
      "config": "eslint.json"
    "css": {
      "engine": "csslint",
      "config": "csslint.json"
  "test": {
    "engine": "jasmine",
    "src_files": "src/**/*.js",
    "spec_files": "test/spec/**/*.js",
    "helper_files": "test/helper/**/*.js"
  "compress": {
      "png": true
  "modular": {
    "type": "amd",
    "idprefix": "home",
    "ignore": "+(lib|src|test)/**"
  "preprocessors": {
      "coffee": ["coffee", "modular"],
      "less": ["less"],
      "js": ["modular"]


  1. gsp auth update authentication infomation for interacting with subversion repository
  2. gsp lint run linter on files changed
  3. gsp publish [options] publish git changesets to subversion
  4. gsp push git push origin master and publish
  5. gsp pull clone/update all the git repositories
  6. gsp scaffold [options] generate project scaffolding
  7. gsp start [options] start a local proxy server
  8. gsp test run test specs against chaned files
  9. gsp watch [options] run tasks whenever watched files are added, changed or deleted


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)


Copyright (c) 2014 viclm Licensed under the MIT license.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free