mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-20 17:33:18 +00:00
Remove JS compilation step for running bin/resin
This commit is contained in:
parent
e82173bfb5
commit
3a5e4ad074
@ -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
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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({
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user