Commit db2b2f2b authored by Tomas Alabes's avatar Tomas Alabes

webpack ready, just eslint missing

parent 5bfc8a31
{
"name": "raphael",
"main": "raphael.js",
"main": "raphael.min.js",
"description": "JavaScript Vector Library",
"dependencies": {
"eve": "https://github.com/adobe-webplatform/eve.git#eef80ed"
......
'use strict';
require.config({
paths: {
raphael: '../raphael'
//you will need eve if you use the nodeps version
/*eve: '../bower_components/eve/eve'*/
}
});
require(['raphael'], function(Raphael) {
var paper = Raphael(0, 0, 640, 720, "container");
paper.circle(100, 100, 100).attr({'fill':'270-#FAE56B:0-#E56B6B:100'}); //example
// Work here
});
// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël @VERSION - 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.│ \\
// └────────────────────────────────────────────────────────────────────┘ \\
// ┌───────────────────────────────────────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.2.0 - JavaScript Vector Library │ \\
// ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright © 2008-2016 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
// │ Copyright © 2008-2016 Sencha Labs (http://sencha.com) │ \\
// ├───────────────────────────────────────────────────────────────────────────────────────────────────────┤ \\
// │ Licensed under the MIT (https://github.com/DmitryBaranovskiy/raphael/blob/master/license.txt) license.│ \\
// └───────────────────────────────────────────────────────────────────────────────────────────────────────┘ \\
This diff is collapsed.
......@@ -10,7 +10,8 @@
<!-- To work with full version -->
<script type="text/javascript" src="../bower_components/requirejs/require.js"></script>
<script type="text/javascript" src="../raphael-wp.js"></script>
<script type="text/javascript" src="../bower_components/eve/eve.js"></script>
<script type="text/javascript" src="../raphael.js"></script>
<!-- To work with minified version -->
<!--<script type="text/javascript" src="../raphael-min.js"></script>-->
......
......@@ -2,7 +2,7 @@
"name": "raphael",
"version": "2.1.4",
"description": "JavaScript Vector Library",
"main": "raphael.amd.js",
"main": "raphael.min.js",
"author": {
"name": "Dmitry Baranovskiy"
},
......@@ -17,15 +17,13 @@
},
"devDependencies": {
"bower": "1.4.1",
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
"grunt-contrib-concat": "0.5.0",
"grunt-contrib-uglify": "0.2.0",
"grunt-replace": "0.8.0",
"eslint-loader": "^1.3.0",
"qunitjs": "1.21.0"
},
"scripts": {
"test": "npm install && bower install && echo \"Open dev/test/index.html with your browser\" && exit 1"
"start": "npm install && bower install",
"build": "webpack && webpack --min && webpack --no-deps && webpack --no-deps --min",
"test": "echo \"Open dev/test/index.html with your browser\" && exit 1"
},
"repository": {
"type": "git",
......@@ -34,7 +32,11 @@
"bugs": {
"url": "https://github.com/DmitryBaranovskiy/raphael/issues"
},
"keywords": ["svg", "vml", "javascript"],
"keywords": [
"svg",
"vml",
"javascript"
],
"homepage": "http://dmitrybaranovskiy.github.io/raphael/",
"license": "MIT"
}
This diff is collapsed.
This diff is collapsed.
// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël @@VERSION - 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.│ \\
// └────────────────────────────────────────────────────────────────────┘ \\
(function (glob, factory) {
if (typeof define === "function" && define.amd) {
define("raphael", ["dev/raphael.core.js", "raphael.svg", "raphael.vml"], function(Raphael) {
return factory(Raphael);
});
} else if (typeof exports === "object") {
var raphael = require("./dev/raphael.core");
require("./dev/raphael.svg");
require("./dev/raphael.vml");
module.exports = factory(raphael);
} else {
glob.Raphael = factory(glob.Raphael);
}
}(this, function (Raphael) {
return Raphael.ninja();
}));
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
var webpack = require("webpack");
"use strict";
const webpack = require("webpack");
const fs = require("fs");
const args = process.argv;
let plugins = [
new webpack.BannerPlugin(fs.readFileSync('./dev/banner.txt', 'utf8'),{ raw: true, entryOnly: true })
];
let externals = [];
let filename = "raphael";
if(args.indexOf('--no-deps') !== -1){
console.log('Building version without deps');
externals.push("eve");
filename += ".no-deps"
}
if(args.indexOf('--min') !== -1){
console.log('Building minified version');
plugins.push(
new webpack.optimize.UglifyJsPlugin({
compress:{
dead_code: false,
unused: false
}
})
);
filename += ".min"
}
module.exports = {
entry: './dev/raphael.amd.js',
output: {
filename: "raphael-wp.js",
filename: filename + ".js",
libraryTarget: "umd",
library: "Raphael",
umdNamedDefine: true
},
target: "web",
externals: externals,
externals: [
],
loaders: [
],
plugins: [
],
resolveLoader: {
},
plugins: plugins,
resolve: {
modulesDirectories: ["bower_components"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment