Permalink
Browse files

Setted ground for contributions

  • Loading branch information...
1 parent e585625 commit 86463d026a55720dc8ad9c36eae496a465b88cd9 @tomasAlabes tomasAlabes committed Feb 11, 2013
Showing with 2,404 additions and 239 deletions.
  1. +3 −0 .gitignore
  2. +3 −0 .gitmodules
  3. +46 −2 README.markdown
  4. +8 −0 copy.js
  5. +1 −0 eve
  6. +42 −41 make
  7. +20 −0 package.json
  8. +2 −2 raphael-min.js
  9. +2,279 −194 raphael.js
View
@@ -0,0 +1,3 @@
+node_modules
+raphael.pro-min.js
+raphael.pro.js
View
@@ -0,0 +1,3 @@
+[submodule "eve"]
+ path = eve
+ url = git://github.com/adobe-webplatform/eve.git
View
@@ -1,3 +1,47 @@
-# Raphaël
+# Raphaël: Cross-browser vector graphics the easy way.
-Cross-browser vector graphics the easy way. Visit the library website for more information: [http://raphaeljs.com](http://raphaeljs.com/)
+Visit the library website for more information: [http://raphaeljs.com](http://raphaeljs.com/)
+
+## Quickstart guide
+
+* `git clone https://github.com/DmitryBaranovskiy/raphael.git`
+* `git submodule init && git submodule update && npm install`
+(thank you [Wes Tood](https://github.com/wesleytodd))
+
+### Dependencies
+* [uglifyjs](https://github.com/mishoo/UglifyJS)
+* [eve](https://github.com/adobe-webplatform/eve)
+
+## Development
+
+At the moment we have 4 milestones:
+
+### v2.1.1
+Milestone for bug fixes contributed by the community.
+### v2.2.0
+Milestone for enhancements from contributors pull requests.
+### v2.2.1
+Milestone with bug fixes added from issues created by community.
+This fixes were not provided in the issues.
+### v2.3.0
+Milestone with enhancements suggested in issues but not provided by community at those issues.
+
+We are organizing the current issues between this milestones, setting the grounds for people to contribute and start pushing code soon.
+
+## Want to contribute?
+
+All changes in code must go to `raphael.core`, `raphael.svg` or `raphael.vml`. `raphael.js` is a generated file.
+
+After adding your changes, execute `./make`, the minified version will be created, commit and you are ready to make a pull request!
+
+## Collaborators
+
+* [tomasAlabes](https://github.com/tomasAlabes)
+
+## Copyright and license
+
+Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com)
+
+Copyright © 2008-2012 Sencha Labs (http://sencha.com)
+
+Licensed under the **MIT** (http://raphaeljs.com/license.html) license.
View
@@ -0,0 +1,8 @@
+// ┌────────────────────────────────────────────────────────────────────┐ \\
+// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\
+// ├────────────────────────────────────────────────────────────────────┤ \\
+// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
+// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\
+// ├────────────────────────────────────────────────────────────────────┤ \\
+// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\
+// └────────────────────────────────────────────────────────────────────┘ \\
1 eve
Submodule eve added at eef80e
View
83 make
@@ -1,45 +1,46 @@
#!/usr/bin/env node
-var setup = {
- input: {
- core: "raphael.core.js",
- svg: "raphael.svg.js",
- vml: "raphael.vml.js",
- eve: "../mywork/eve/eve.js",
- copy: "copy.js"
- },
- output: {
- "raphael-min.js": function () {
- return this.copy + "\n" + minify(this.eve + this.core + this.svg + this.vml);
- },
- "raphael.js": function () {
- return this.copy + "\n" + this.eve + "\n\n" + this.core + "\n\n" + this.svg + "\n\n" + this.vml;
- },
- "raphael.pro-min.js": function () {
- return this.copy + "\n" + minify(this.eve + this.core + this.svg);
- },
- "raphael.pro.js": function () {
- return this.copy + "\n" + this.eve + "\n\n" + this.core + "\n\n" + this.svg ;
- },
- }
- },
- ujs = require("/Users/dmitry/Sites/UglifyJS/uglify-js.js"),
- jsp = ujs.parser,
- pro = ujs.uglify,
- fs = require("fs"),
- rxdr = /\/\*\\[\s\S]+?\\\*\//g;
+var ujs = require('uglify-js'),
+ fs = require('fs'),
+ input = {
+ core : 'raphael.core.js',
+ svg : 'raphael.svg.js',
+ vml : 'raphael.vml.js',
+ eve : './eve/eve.js',
+ copy : 'copy.js'
+ },
+ output = {
+ 'raphael-min.js' : ['eve', 'core', 'svg', 'vml'],
+ 'raphael.js' : ['eve', 'core', 'svg', 'vml'],
+ 'raphael.pro-min.js' : ['eve', 'core', 'svg'],
+ 'raphael.pro.js' : ['eve', 'core', 'svg'],
+ };
-function minify(code) {
- return pro.gen_code(pro.ast_squeeze(pro.ast_mangle(jsp.parse(code))));
+for (var file in input) {
+ input[file] = fs.readFileSync(input[file], 'utf8');
}
-
-var files = {};
-for (var file in setup.input) {
- files[file] = String(fs.readFileSync(setup.input[file], "utf8")).replace(rxdr, "");
+for (var file in output) {
+ var out = '';
+ if (file.indexOf('min') !== -1) {
+ console.log('Compressing ' + file);
+ for (var i = 0, l = output[file].length; i < l; i++) {
+ var o = ujs.minify(input[output[file][i]], {
+ fromString : true
+ });
+ out += o.code;
+ }
+ } else {
+ console.log('Concatinating ' + file);
+ for (var i = 0, l = output[file].length; i < l; i++) {
+ out += input[output[file][i]] + '\n';
+ }
+ }
+ (function(f, code){
+ fs.writeFile(f, input.copy + '\n' + code, function(err) {
+ if (err) {
+ console.log(err);
+ } else {
+ console.log('Saved to \033[32m' + f + '\033[0m\n');
+ }
+ });
+ })(file, out);
}
-for (file in setup.output) {
- (function (file) {
- fs.writeFile(file, setup.output[file].call(files), function () {
- console.log("Saved to \033[32m" + file + "\033[0m\n");
- });
- })(file);
-}
View
@@ -0,0 +1,20 @@
+{
+ "name": "raphael",
+ "version": "2.1.0",
+ "description": "JavaScript Vector Library",
+ "main": "raphael.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/DmitryBaranovskiy/raphael.git"
+ },
+ "author": "Dmitry Baranovskiy",
+ "license": "MIT",
+ "readmeFilename": "README.markdown",
+ "gitHead": "52bff469f60988f1391e8b3d7cb5349163df8ba1",
+ "devDependencies": {
+ "uglify-js": "~2.2.3"
+ }
+}
View

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 86463d0

Please sign in to comment.