From c0e250c2d3ab8f00f61f25be83dfb001c20183c6 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Wed, 20 Jan 2016 19:54:49 +0100 Subject: [PATCH] Add bin --- bin/index.js | 10 ++++++++++ package.json | 1 + 2 files changed, 11 insertions(+) create mode 100755 bin/index.js diff --git a/bin/index.js b/bin/index.js new file mode 100755 index 0000000..21cd17c --- /dev/null +++ b/bin/index.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node + +'use strict' + +var fs = require('fs') +var file = process.argv[2] +var shrthnd = require('..') + +var content = fs.readFileSync(file, {encoding: 'utf8'}) +process.stdout.write(shrthnd(content).string) diff --git a/package.json b/package.json index d6ca438..3fd4a37 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.0.6", "description": "Makes your CSS files lighter and more readable by converting and combining CSS properties into their shorthand versions when possible.", "main": "index.js", + "bin": "bin/index.js", "files": [ "index.js", "lib"