From 3448a7eed6c3cec40e1284ee385ffbe9288dbf66 Mon Sep 17 00:00:00 2001 From: Maxime Thirouin Date: Tue, 3 Mar 2015 07:42:43 +0100 Subject: [PATCH] Simplify package (commonjs support only for now) Close #52 Close #51 Close #49 --- CHANGELOG.md | 9 ++++++++ Gruntfile.js | 42 ------------------------------------- README.md | 12 ++++------- bower.json | 19 ----------------- browser.js | 3 --- component.json | 18 ---------------- color.js => index.js | 0 package.json | 38 +++++++++++++++++---------------- test/{basic.js => index.js} | 2 +- 9 files changed, 34 insertions(+), 109 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 Gruntfile.js delete mode 100644 bower.json delete mode 100644 browser.js delete mode 100644 component.json rename color.js => index.js (100%) rename test/{basic.js => index.js} (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..604f152 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# 0.8.0 - 2015-03-03 + +- Removed: bower support +- Removed: component(1) support +- Changed: Upgrade to color-string 0.3 + +--- + +Check out commit logs for older releases diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 44910be..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * To run this file: - * `npm install --dev` - * `npm install -g grunt` - * - * `grunt --help` - */ - -var fs = require("fs"), - browserify = require("browserify"), - pkg = require("./package.json"); - -module.exports = function(grunt) { - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - uglify: { - options: { - banner: "/*\n" + grunt.file.read('LICENSE') + "\n*/" - }, - dist: { - files: { - '<%=pkg.name%>-<%=pkg.version%>.min.js': ['<%=pkg.name%>-<%=pkg.version%>.js'] - } - } - } - }); - - grunt.registerTask('build', 'build a browser file', function() { - var done = this.async(); - - var outfile = './color-' + pkg.version + '.js'; - - var bundle = browserify('./browser.js').bundle(function(err, src) { - console.log("> " + outfile); - // write sync instead of piping to get around event bug - fs.writeFileSync(outfile, src); - done(); - }); - }); - - grunt.loadNpmTasks('grunt-contrib-uglify'); -}; diff --git a/README.md b/README.md index c407591..9035196 100644 --- a/README.md +++ b/README.md @@ -12,19 +12,15 @@ console.log(color.hslString()); // "hsla(262, 59%, 81%, 0.5)" ## Install -### browser -Download the latest [color.js](https://github.com/harthur/color/tree/gh-pages). The `Color` object is exported. - -### node -For [node](http://nodejs.org) with [npm](http://npmjs.org): - ```console $ npm install color ``` -And use with `var Color = require("color")` +## Usage -## API +```js +var Color = require("color") +``` ### Setters diff --git a/bower.json b/bower.json deleted file mode 100644 index c08cba9..0000000 --- a/bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "color", - "main": "color.js", - "version": "0.5.0", - "ignore": [ - ], - "authors": [ - "Heather Arthur " - ], - "description": "Color conversion and manipulation with CSS string support", - "moduleType": [ - "globals" - ], - "keywords": [ - "color", - "colour", - "css" - ] -} diff --git a/browser.js b/browser.js deleted file mode 100644 index 49d3f04..0000000 --- a/browser.js +++ /dev/null @@ -1,3 +0,0 @@ -// this file is the entrypoint for building a browser file with browserify - -Color = require("./color"); \ No newline at end of file diff --git a/component.json b/component.json deleted file mode 100644 index 39f4586..0000000 --- a/component.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "color", - "description": "Color conversion and manipulation with CSS string support", - "version": "0.5.0", - "author": "Heather Arthur ", - "repo": "harthur/color", - "main": "color.js", - "dependencies": { - "harthur/color-convert": "*", - "harthur/color-string": "*" - }, - "scripts": ["color.js"], - "keywords": [ - "color", - "colour", - "css" - ] -} diff --git a/color.js b/index.js similarity index 100% rename from color.js rename to index.js diff --git a/package.json b/package.json index c70277b..9c8537d 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,31 @@ { "name": "color", + "version": "0.8.0", "description": "Color conversion and manipulation with CSS string support", - "version": "0.7.3", - "author": "Heather Arthur ", - "repository": { - "type": "git", - "url": "http://github.com/harthur/color.git" - }, - "main": "./color", - "dependencies": { - "color-convert": "0.5.x", - "color-string": "0.3.x" - }, - "devDependencies": { - "nomnom": "~1.5.2", - "browserify": "~2.18.1", - "grunt": "~0.4.1", - "grunt-contrib-uglify": "~0.2.0" - }, "keywords": [ "color", "colour", "css" ], + "authors": [ + "Heather Arthur ", + "Maxime Thirouin" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "http://github.com/harthur/color.git" + }, + "files": [ + "CHANGELOG.md", + "LICENSE", + "index.js" + ], "scripts": { - "test": "node test/basic.js" + "test": "node test" + }, + "dependencies": { + "color-convert": "^0.5.0", + "color-string": "^0.3.0" } } diff --git a/test/basic.js b/test/index.js similarity index 99% rename from test/basic.js rename to test/index.js index 367e6fc..1e59e98 100644 --- a/test/basic.js +++ b/test/index.js @@ -1,4 +1,4 @@ -var Color = require("../color"), +var Color = require(".."), assert = require("assert"); // Color() instance