From ceb71ed3f1b41fe04db7d337b24823b94955b9a8 Mon Sep 17 00:00:00 2001 From: Nicholas Kinsey Date: Sun, 23 Jan 2011 20:13:00 +1000 Subject: [PATCH] 0.1.0 --- Cakefile | 2 +- README.md | 36 ++++++------------ TODO.md | 4 -- bin/courier.coffee | 15 +++++--- package.coffee | 92 +++++++++++++++++++++------------------------- package.json | 15 ++------ 6 files changed, 67 insertions(+), 97 deletions(-) delete mode 100644 TODO.md diff --git a/Cakefile b/Cakefile index 2969bd2..c56cb6e 100644 --- a/Cakefile +++ b/Cakefile @@ -3,4 +3,4 @@ task 'init', 'init', -> task 'test', 'test', -> # TODO - console.log 'no tests yet...' \ No newline at end of file + throw 'no tests yet...' \ No newline at end of file diff --git a/README.md b/README.md index 67dd1ab..7d61765 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ - _ - _______ __ ______(_)__ ____ - / __/ _ \/ // / __/ / -_) __/ - \__/\___/\_,_/_/ /_/\__/_/ + _____ + ________________ ___________(_)____________ + _ ___/ __ \ / / /_ ___/_ /_ _ \_ ___/ + / /__ / /_/ / /_/ /_ / _ / / __/ / + \___/ \____/\__,_/ /_/ /_/ \___//_/ npm packages in CoffeeScript - (package.coffee) -> (package.json) @@ -12,26 +13,11 @@ npm packages in CoffeeScript - (package.coffee) -> (package.json) npm install courier # Usage - cd facebook_killer # or your current project with a package.coffee - courier - - # fin. (you can now install/publish your npm package using the generated package.json) +Using courier couldn't be simpler. -# Contributing - cd ~ - git clone YOUR_FORK - - # make changes - - # build - cake build - npm install . - - # test on a project - cd MY_PROJECT - courier - - # if it works then commit, push and submit a pull request +1. Translate your package.json into CoffeeScript and move to package.coffee. +2. Run `courier` against your project. -# TODO - see TODO.md \ No newline at end of file +You will now see package.json in the root of your project; ready to be installed or linked with `npm`. + +Use the `-p` or `--print` flag for noisy output. \ No newline at end of file diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 9e5bcad..0000000 --- a/TODO.md +++ /dev/null @@ -1,4 +0,0 @@ -test -doc -switches (silent, in, out, print, watch) -templates \ No newline at end of file diff --git a/bin/courier.coffee b/bin/courier.coffee index ce9dea4..9177e5d 100755 --- a/bin/courier.coffee +++ b/bin/courier.coffee @@ -11,8 +11,6 @@ log = console.log CoffeeScript = require 'coffee-script' {OptionParser} = require 'coffee-script/optparse' -lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib') - usage = ''' Usage: courier [OPTIONS] [PATH_TO_APP = "."] @@ -33,12 +31,17 @@ switches = [ ] parser = new OptionParser switches, usage -options = parser.parse process.argv +options = parser.parse process.argv[2...] args = options.arguments delete options.arguments -log parser.help() if options.help or process.argv.length is 0 -log VERSION if options.version +if options.help or process.argv.length is 0 + log parser.help() + process.exit 0 + +if options.version + log VERSION + process.exit 0 release = (options) -> fs.readFile 'package.coffee', (error, data) -> @@ -51,7 +54,7 @@ release = (options) -> json = matches[1] fs.writeFile 'package.json', json, -> - log json + log json if options.print if args.length <= 0 args.push '.' diff --git a/package.coffee b/package.coffee index da7e0d2..ce8e668 100644 --- a/package.coffee +++ b/package.coffee @@ -1,50 +1,42 @@ -{ - name: 'courier' - description: 'npm packages in CoffeeScript - (package.coffee) -> (package.json)' - - keywords: ['courier'] - - version: '0.1.0' - - author: 'Feisty Studios (http://feistystudios.com/)' - - licenses: [ - { - type: 'FEISTY' - url: 'http://github.com/feisty/license/raw/master/LICENSE' - } - ] - - contributors: [ - 'Nicholas Kinsey ' - ] - - repository: - type: 'git' - url: 'http://github.com/feisty/cortex.git' - private: 'git@github.com:feisty/cortex.git' - web: 'http://github.com/feisty/cortex' - - bugs: - mail: 'courier@feistystudios.com' - web: 'http://github.com/feisty/courier/issues' - - directories: - lib: './lib' - doc: './doc' - - bin: - courier: './bin/courier.coffee' - - main: 'courier' - - scripts: - test: 'cake test' - # postinstall: 'cake init' - - dependencies: - 'coffee-script': '>= 1.0.0' - - engines: - node: '>= 0.3.4' -} \ No newline at end of file +name: 'courier' + +description: 'npm packages in CoffeeScript - (package.coffee) -> (package.json)' + +keywords: ['courier'] + +version: '0.1.0' + +author: 'Feisty Studios (http://feistystudios.com/)' + +licenses: [type: 'FEISTY', url: 'http://github.com/feisty/license/raw/master/LICENSE'] + +contributors: ['Nicholas Kinsey '] + +repository: + type: 'git' + url: 'http://github.com/feisty/courier.git' + private: 'git@github.com:feisty/courier.git' + web: 'http://github.com/feisty/courier' + +bugs: + mail: 'courier@feistystudios.com' + web: 'http://github.com/feisty/courier/issues' + +# directories: +# lib: './lib' +# doc: './doc' + +bin: + courier: './bin/courier.coffee' + +main: 'courier' + +# scripts: +# test: 'cake test' +# postinstall: 'cake init' + +dependencies: + 'coffee-script': '>= 1.0.0' + +engines: + node: '>= 0.3.6' \ No newline at end of file diff --git a/package.json b/package.json index 861a626..cee0cca 100644 --- a/package.json +++ b/package.json @@ -13,29 +13,22 @@ contributors: ['Nicholas Kinsey '], repository: { type: 'git', - url: 'http://github.com/feisty/cortex.git', - private: 'git@github.com:feisty/cortex.git', - web: 'http://github.com/feisty/cortex' + url: 'http://github.com/feisty/courier.git', + private: 'git@github.com:feisty/courier.git', + web: 'http://github.com/feisty/courier' }, bugs: { mail: 'courier@feistystudios.com', web: 'http://github.com/feisty/courier/issues' }, - directories: { - lib: './lib', - doc: './doc' - }, bin: { courier: './bin/courier.coffee' }, main: 'courier', - scripts: { - test: 'cake test' - }, dependencies: { 'coffee-script': '>= 1.0.0' }, engines: { - node: '>= 0.3.4' + node: '>= 0.3.6' } } \ No newline at end of file