Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

packaging infrastructure

  • Loading branch information...
commit e2790986f43473fd9e5d44e568749d0a06a97219 1 parent afd229b
@drewfish authored
View
3  .gitignore
@@ -0,0 +1,3 @@
+.DS_Store
+node_modules
+*.sock
View
4 .npmignore
@@ -0,0 +1,4 @@
+support
+test
+examples
+*.sock
View
5 Changelog.md
@@ -0,0 +1,5 @@
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
View
5 Makefile
@@ -0,0 +1,5 @@
+
+test:
+ @echo "populate me"
+
+.PHONY: test
View
49 README.txt
@@ -1,5 +1,5 @@
CRANK
- a tool to update version numbers and changelogs, for npm module development
+ a tool to update version number and changelog, for npm module development
USAGE
@@ -19,9 +19,9 @@ INTENTIONS
* expected to be used intermixed with other commands
* focuses on what it does well
* doesn't try to do everything
- * follows semantic versions
+ * follows semantic versioning approach
* read-only: doesn't commits files
- * uses a "config" or "recipe" file
+ * can use a "config" or "recipe" file for advanced use cases
ASSUMPTIONS
@@ -31,30 +31,31 @@ ASSUMPTIONS
CONFIG
- * not really needed if only using `crank version` and semantic versions
- * defaults to "crank.json" in the cwd
+ * not really needed for simple use cases
+ * defaults to "crank.json" in the current working directory
+ * can be specified with a commandline argument
* target: directory to track
- * defaults to cwd
+ * defaults to current working directory
* changelog:
* file: path on disk
* relative path is relative to the target
- * formats: template format (e.g. "md", "txt")
- * changedate: string
- * format to use for change dates
- * versiondate: string
- * format to use for version dates
* template: template type, or path on disk
* defaults to file extension
* simple string taken as one of the built-in template types to use
+ * builtin types are "md" (markdown) and "txt" (plain text)
* otherwise, template to use
* changes:
+ * dateformat: string
+ * format to use for change dates
* filters: list of regexes to modify changes
* subject: "message", "author", "date", "changeid"
* regex: string
* replace: "string"
* if results in "--CRANK:SKIP--" then change is skipped
* versions:
+ * dateformat: string
+ * format to use for revision dates
* filters: list of regeses to modify versions
* subject: "version", "date"
* regex: string
@@ -62,6 +63,7 @@ CONFIG
* if results in "--CRANK:SKIP--" then version is skipped
* database -- TODO
* maps version:changeid
+ * only really needed by `crank changelog`
* types
* file {foo.json}
* separate json file
@@ -99,3 +101,28 @@ TODO
* "crank release" does all that's needed (inc commits)
+LICENSE
+
+ MIT License
+
+ Copyright (C) 2012 Andrew Folta <drew@folta.net>
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+
View
136 Readme.md
@@ -0,0 +1,136 @@
+
+# CRANK
+
+a tool to update version number and changelog, for npm module development
+
+
+# usage
+
+ crank version {part}
+ increments version in package.json
+ {part} is "major", "minor", or "patch". defaults to "patch"
+
+ crank changelog Changelog.md
+ updates changelog
+
+
+# intentions
+
+ * used to manage a node module
+ * assumes package.json
+ * primarily to move forward into the future
+ * used in a build system (gmake, ant, phing, etc)
+ * expected to be used intermixed with other commands
+ * focuses on what it does well
+ * doesn't try to do everything
+ * follows semantic versioning approach
+ * read-only: doesn't commits files
+ * can use a "config" or "recipe" file for advanced use cases
+
+
+# assumptions
+
+ * change ID ("revision", "commit", etc) of target applies homogeneously to all files/subdirs in target
+ * target is "clean" -- no modifications
+ * generally expected to be run when in same directory as package.json
+
+
+# config
+
+ * not really needed for simple use cases
+ * defaults to "crank.json" in the current working directory
+ * can be specified with a commandline argument
+
+ * target: directory to track
+ * defaults to current working directory
+ * changelog:
+ * file: path on disk
+ * relative path is relative to the target
+ * template: template type, or path on disk
+ * defaults to file extension
+ * simple string taken as one of the built-in template types to use
+ * builtin types are "md" (markdown) and "txt" (plain text)
+ * otherwise, template to use
+ * changes:
+ * dateformat: string
+ * format to use for change dates
+ * filters: list of regexes to modify changes
+ * subject: "message", "author", "date", "changeid"
+ * regex: string
+ * replace: "string"
+ * if results in "--CRANK:SKIP--" then change is skipped
+ * versions:
+ * dateformat: string
+ * format to use for revision dates
+ * filters: list of regeses to modify versions
+ * subject: "version", "date"
+ * regex: string
+ * replace: "string"
+ * if results in "--CRANK:SKIP--" then version is skipped
+ * database -- TODO
+ * maps version:changeid
+ * only really needed by `crank changelog`
+ * types
+ * file {foo.json}
+ * separate json file
+ * changelog
+ * uses changelog file itself to find version:changeid pairs
+ * TODO: need way to pull pairs out of changelog (regex?)
+ * vcs-changes
+ * uses vcs change log to find version:changeid pairs
+ * TODO: need way to pull pairs out of vcs change log
+
+
+# TEMPLATE
+
+ * good old mustache
+
+ * {{version}} string
+ * {{date}} string
+ * {{crankdate}} string, date that crank was run
+ * {{changes}} list
+ * {{changeid}} string
+ * {{date}} string
+ * {{author}} string
+ * {{message}} string
+
+
+# TODO
+
+ * how do we order log entries?
+ * presumably just use the order returned by the vcs
+ but is there more to it than that?
+ * do we need to order versions?
+ * ... or otherwise compare version numbers?
+ * templates can have dates (of version or entry)
+ * ... gotten from vcs?
+ * log entry templates can have changeids
+ * encorporate ideas from https://github.com/ccare/node-release-utils
+ * "crank release" does all that's needed (inc commits)
+
+
+# license
+
+ MIT License
+
+ Copyright (C) 2012 Andrew Folta <drew@folta.net>
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+
+
View
6 bin/crank
@@ -0,0 +1,6 @@
+
+
+var crank = require('crank');
+
+
+
View
12 lib/crank.js
@@ -0,0 +1,12 @@
+
+/*!
+ * crank
+ * Copyright(c) 2011 Andrew Folta <drew@folta.net>
+ * MIT Licensed
+ */
+
+/**
+ * Library version.
+ */
+
+exports.version = '0.0.1';
View
23 package.json
@@ -0,0 +1,23 @@
+{
+ "name": "crank",
+ "version": "0.0.1",
+ "description": "tool to update version number and changelog, for npm module development",
+ "author": "Andrew Folta <drew@folta.net>",
+ "homepage": "https://github.com/drewfish/node-crank",
+ "keywords": [
+ "package", "version", "changelog", "build"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/drewfish/node-crank.git"
+ },
+ "preferGlobal": true,
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "dependencies": {},
+ "main": "lib/crank",
+ "bin": {
+ "crank": "bin/crank"
+ }
+}
View
13 test/crank.test.js
@@ -0,0 +1,13 @@
+
+/**
+ * Module dependencies.
+ */
+
+var crank = require('crank')
+ , should = require('should');
+
+module.exports = {
+ 'test .version': function(){
+ crank.version.should.match(/^\d+\.\d+\.\d+$/);
+ }
+};
Please sign in to comment.
Something went wrong with that request. Please try again.