Skip to content

Commit

Permalink
Get rid of Babel dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexei Boronine committed Sep 5, 2016
1 parent b67cfb1 commit 7f4e8ca
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 446 deletions.
12 changes: 6 additions & 6 deletions Makefile
@@ -1,13 +1,13 @@
docs/index.html: src/build.js
node src/build.js > docs/index.html

colorspaces.js: src/colorspaces.js
node_modules/.bin/babel --presets es2015 src/colorspaces.js > colorspaces.js
docs/index.html: homepage.js
node homepage.js > docs/index.html

colorspaces.min.js: colorspaces.js
node_modules/.bin/uglifyjs colorspaces.js > colorspaces.min.js

deploy:
aws s3 sync docs s3://colorspaces.boronine.com

.PHONY: deploy
test:
node tests.js

.PHONY: deploy, test
6 changes: 1 addition & 5 deletions README.md
Expand Up @@ -90,11 +90,7 @@ You can still modify its opacity with Stylus' `rgba` function:

Run `npm install` to install everything necessary to build and test the repo.

To build: `cake build:js`.

To build documentation: `cake build:docs`.

To test: `node src/tests.js`.
See `Makefile`.

[CIEXYZ]: http://en.wikipedia.org/wiki/CIE_1931_color_space
[CIELAB]: http://en.wikipedia.org/wiki/Lab_color_space
Expand Down
3 changes: 1 addition & 2 deletions colorspaces.js
@@ -1,5 +1,3 @@
'use strict';

(function () {

// All Math on this page comes from http://www.easyrgb.com
Expand Down Expand Up @@ -384,5 +382,6 @@
}
return range;
}

})();

8 changes: 3 additions & 5 deletions src/build.js → homepage.js
@@ -1,5 +1,3 @@
"use strict";

var fs = require('fs');
var highlight = require('highlight.js');
var marked = require('marked');
Expand All @@ -13,10 +11,10 @@ marked.setOptions({
}
});

let readme = fs.readFileSync('README.md', {encoding: 'utf-8'});
let readme_html = marked(readme);
var readme = fs.readFileSync('README.md', {encoding: 'utf-8'});
var readme_html = marked(readme);

let full_html = `<!doctype html>
var full_html = `<!doctype html>
<head>
<meta charset="utf-8">
<title>colorspaces.js</title>
Expand Down
2 changes: 0 additions & 2 deletions package.json
Expand Up @@ -7,8 +7,6 @@
"main": "colorspaces.js",
"files": ["colorspaces.js"],
"devDependencies": {
"babel-cli": "^6.0.0",
"babel-preset-es2015": "*",
"uglify-js": "*",
"stylus": "*",
"highlight.js": "*",
Expand Down

0 comments on commit 7f4e8ca

Please sign in to comment.