diff --git a/README.md b/README.md index 6a0a7882..054c6bb8 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,14 @@ $ npm install -g ### If you want to run it locally: ```sh -$ coffee lib/app.coffee +$ ./bin/resin ``` -**Note:** Alternatively, you can run `bin/resin`. In that case, you first need to compile the project with `gulp build`. This will change in the future. +Or: + +```sh +$ coffee lib/app.coffee +``` ## Tests diff --git a/bin/resin b/bin/resin index 299240c0..e738d5fa 100755 --- a/bin/resin +++ b/bin/resin @@ -1,2 +1,5 @@ #!/usr/bin/env node -require('../build/app'); + +// http://coffeescript.org/documentation/docs/register.html +require('coffee-script/register') +require('../lib/app.coffee') diff --git a/gulpfile.coffee b/gulpfile.coffee index 50a3b6b4..f4605888 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -1,11 +1,8 @@ path = require('path') gulp = require('gulp') -gutil = require('gulp-util') -coffee = require('gulp-coffee') mocha = require('gulp-mocha') coffeelint = require('gulp-coffeelint') mochaNotifierReporter = require('mocha-notifier-reporter') -runSequence = require('run-sequence') OPTIONS = config: @@ -15,8 +12,6 @@ OPTIONS = app: [ 'lib/**/*.coffee', '!lib/**/*.spec.coffee' ] tests: 'lib/**/*.spec.coffee' json: 'lib/**/*.json' - dirs: - build: 'build/' gulp.task 'test', -> gulp.src(OPTIONS.files.tests, read: false) @@ -24,18 +19,6 @@ gulp.task 'test', -> reporter: mochaNotifierReporter.decorate('landing') })) -gulp.task 'coffee', -> - gulp.src(OPTIONS.files.app) - .pipe(coffee()).on('error', gutil.log) - .pipe(gulp.dest(OPTIONS.dirs.build)) - -gulp.task 'json', -> - gulp.src(OPTIONS.files.json) - .pipe(gulp.dest(OPTIONS.dirs.build)) - -gulp.task 'build', (callback) -> - runSequence [ 'test', 'lint' ], [ 'json', 'coffee' ], callback - gulp.task 'lint', -> gulp.src(OPTIONS.files.coffee) .pipe(coffeelint({ diff --git a/package.json b/package.json index d02d4ec5..4f884573 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.0.1", "description": "Git Push to your devices", "main": "./lib/app.js", + "preferGlobal": true, "bin": { "resin": "./bin/resin" }, @@ -60,6 +61,7 @@ "progress": "~1.1.8", "user-home": "~1.1.0", "fs-plus": "~2.3.2", - "lodash-contrib": "~241.4.14" + "lodash-contrib": "~241.4.14", + "coffee-script": "~1.8.0" } }