From d570ffe7061462992486f86f3e1c3084e3c02602 Mon Sep 17 00:00:00 2001 From: Igor Klopov Date: Mon, 9 Jan 2017 17:31:10 +0300 Subject: [PATCH] to speed up start time on slow devices like RPi --- main.js | 4 +--- package.json | 9 +++++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 01b28ff..5157640 100644 --- a/main.js +++ b/main.js @@ -1,5 +1,3 @@ -require('coffee-script'); -require('coffee-script/register'); -var i2c = require('./lib/i2c'); +var i2c = require('./build/i2c'); module.exports = i2c; \ No newline at end of file diff --git a/package.json b/package.json index 5f5d0f8..a6ff6a1 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,14 @@ "dependencies": { "bindings": "1.2.1", "underscore": "1.8.2", - "coffee-script": "1.9.1", "repl":"0.1.3", "nan": "~2.3.5" }, - "engine": "node >= 0.12.0" + "devDependencies": { + "coffee-script": "1.9.1" + }, + "engine": "node >= 0.12.0", + "scripts": { + "prepublish": "coffee -o build lib/i2c.coffee" + } }