Skip to content

Commit f8f798e

Browse files
committed
Pushed files that were left out of previous pushes, for raphael js
1 parent 66e898f commit f8f798e

File tree

7 files changed

+418
-0
lines changed

7 files changed

+418
-0
lines changed

Main/WebService/.eslintrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
"extends": "standard",
3+
"plugins": [
4+
"standard"
5+
]
6+
};

Main/WebService/Gruntfile.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
"use strict";
2+
3+
module.exports = function(grunt) {
4+
5+
var pkg = grunt.file.readJSON("package.json");
6+
7+
// Project configuration.
8+
grunt.initConfig({
9+
// Metadata.
10+
pkg: pkg,
11+
banner: grunt.file.read("dev/copy.js").replace(/@VERSION/, pkg.version),
12+
// Task configuration.
13+
uglify: {
14+
options: {
15+
banner: "<%= banner %>"
16+
},
17+
dist: {
18+
src: "<%= concat.dist.dest %>",
19+
dest: "<%= pkg.name %>-min.js"
20+
},
21+
nodeps: {
22+
src: "<%= concat.nodeps.dest %>",
23+
dest: "<%= pkg.name %>-nodeps-min.js"
24+
}
25+
},
26+
replace: {
27+
dist: {
28+
options: {
29+
patterns: [{
30+
match: "VERSION",
31+
replacement: "<%= pkg.version %>"
32+
}]
33+
},
34+
files: [{
35+
expand: true,
36+
flatten: true,
37+
src: ["<%= concat.dist.dest %>", "<%= concat.nodeps.dest %>"],
38+
dest: "./"
39+
}]
40+
}
41+
},
42+
concat: {
43+
dist: {
44+
dest: "<%= pkg.name %>.js",
45+
src: [
46+
"dev/eve.js",
47+
"dev/raphael.core.js",
48+
"dev/raphael.svg.js",
49+
"dev/raphael.vml.js",
50+
"dev/raphael.amd.js"
51+
]
52+
},
53+
nodeps: {
54+
dest: "<%= pkg.name %>-nodeps.js",
55+
src: [
56+
"dev/raphael.core.js",
57+
"dev/raphael.svg.js",
58+
"dev/raphael.vml.js",
59+
"dev/raphael.amd.js"
60+
]
61+
}
62+
}
63+
});
64+
65+
// These plugins provide necessary tasks.
66+
grunt.loadNpmTasks("grunt-contrib-concat");
67+
grunt.loadNpmTasks("grunt-contrib-uglify");
68+
grunt.loadNpmTasks("grunt-replace");
69+
70+
// Default task.
71+
grunt.registerTask("default", ["concat", "replace", "uglify"]);
72+
};

Main/WebService/raphael.js

Lines changed: 149 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Main/WebService/raphael.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Main/WebService/raphael.no-deps.js

Lines changed: 149 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Main/WebService/raphael.no-deps.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Main/WebService/webpack.config.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"use strict";
2+
3+
const webpack = require("webpack");
4+
const fs = require("fs");
5+
6+
module.exports = function (env) {
7+
8+
let externals = [];
9+
10+
if (env && env.noDeps) {
11+
console.log('Building version without deps');
12+
externals.push("eve");
13+
}
14+
15+
return {
16+
entry: './dev/raphael.amd.js',
17+
output: {
18+
path: __dirname,
19+
filename: "raphael.js",
20+
libraryTarget: "umd",
21+
library: "Raphael"
22+
},
23+
24+
externals: externals,
25+
26+
plugins: [
27+
new webpack.BannerPlugin({
28+
banner: fs.readFileSync('./dev/banner.txt', 'utf8'),
29+
raw: true,
30+
entryOnly: true
31+
})
32+
],
33+
resolve: {
34+
alias: {
35+
"eve": "eve-raphael/eve"
36+
}
37+
}
38+
};
39+
40+
};

0 commit comments

Comments
 (0)