gcsj
Download and install the package via:
Last updated 4 years ago by kruschid .
MIT · Original npm · Tarball · package.json
$ cnpm install gcsj 
SYNC missed versions from official npm registry.

GCSJ: Predefined Gulp-Tasks for Coffeescrip, Sass, Jade environments with Nodemon for CoffeeScript-Backend

Installation

Download and install the package via:

node install --save-dev gcsj

Create a gulpfile.js in your project directory with following content:

var gulp = require('gulp'),
    conf = require('./conf/gulp.json');

gulp.tasks = require('gcsj')(conf);

Sample configuration

As you can see in the previous example this package requires a config file. This config file could have the following structure:

{
  "run": [],
  "clean": "public/**/*",
  "components": {
    "src": "src/client/**/*.coffee",  
    "dest": "public/js/"
  },
  "libs": {
    "src":  [
      "bower_components/angular/angular.js",
      "bower_components/angular-route/angular-route.js",
      "bower_components/angular-compass/js/angular-compass.js",
      "bower_components/angular-resource/angular-resource.js",
      "bower_components/angular-bootstrap/ui-bootstrap-tpls.js"
    ],
    "dest": "public/js/"
  },
  "views": {
    "src": "src/client/index.jade",
    "include": "src/client/*/**/*.jade",
    "dest": "public/"
  },
  "css": {
    "src": "src/client/assets/css/styles.sass",
    "dest": "public/css/"
  },
  "copy": {
    "bower_components/bootstrap-sass/assets/fonts/bootstrap/*": "public/fonts/"
  },
  "nodemon": {
    "script": "src/server/server.coffee",
    "watch": [
      "conf/*",
      "src/server/server.coffee"
    ],
    "env": {
      "NODE_ENV": "development"
    }
  },
  "browserSync": {
    "proxy": "localhost:3000",
    "port": 3001,
    "files": [
      "public/**/*"
    ]
  }
}

Predefined Gulp-Tasks

  • build
    • transpiles sources
    • concatenates js-libs
    • moves resulting sources to destination folder e.g. public
  • watch
    • runs build task
    • runs shell scripts (optional)
    • runs browser-sync
    • runs nodemon (optional)
    • watches source files for changes
      • transpiles sources
      • reloads browser
  • nodemon
    • todo..
  • releaseBower
    • todo..
  • releaseNPM
    • todo..
  • releaseGHPages
    • todo..

Known issues

  • Some tasks may not terminate when there are no files to transpile
  • Not well tested but the intention is clear, isn't it?

Current Tags

  • 0.3.1                                ...           latest (4 years ago)

6 Versions

  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (17)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |