Skip to content

Commit

Permalink
Pushed files that were left out of previous pushes, for raphael js
Browse files Browse the repository at this point in the history
  • Loading branch information
andsprague1 committed May 1, 2018
1 parent 66e898f commit f8f798e
Show file tree
Hide file tree
Showing 7 changed files with 418 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Main/WebService/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
"extends": "standard",
"plugins": [
"standard"
]
};
72 changes: 72 additions & 0 deletions Main/WebService/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
"use strict";

module.exports = function(grunt) {

var pkg = grunt.file.readJSON("package.json");

// Project configuration.
grunt.initConfig({
// Metadata.
pkg: pkg,
banner: grunt.file.read("dev/copy.js").replace(/@VERSION/, pkg.version),
// Task configuration.
uglify: {
options: {
banner: "<%= banner %>"
},
dist: {
src: "<%= concat.dist.dest %>",
dest: "<%= pkg.name %>-min.js"
},
nodeps: {
src: "<%= concat.nodeps.dest %>",
dest: "<%= pkg.name %>-nodeps-min.js"
}
},
replace: {
dist: {
options: {
patterns: [{
match: "VERSION",
replacement: "<%= pkg.version %>"
}]
},
files: [{
expand: true,
flatten: true,
src: ["<%= concat.dist.dest %>", "<%= concat.nodeps.dest %>"],
dest: "./"
}]
}
},
concat: {
dist: {
dest: "<%= pkg.name %>.js",
src: [
"dev/eve.js",
"dev/raphael.core.js",
"dev/raphael.svg.js",
"dev/raphael.vml.js",
"dev/raphael.amd.js"
]
},
nodeps: {
dest: "<%= pkg.name %>-nodeps.js",
src: [
"dev/raphael.core.js",
"dev/raphael.svg.js",
"dev/raphael.vml.js",
"dev/raphael.amd.js"
]
}
}
});

// These plugins provide necessary tasks.
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-replace");

// Default task.
grunt.registerTask("default", ["concat", "replace", "uglify"]);
};
149 changes: 149 additions & 0 deletions Main/WebService/raphael.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Main/WebService/raphael.min.js

Large diffs are not rendered by default.

149 changes: 149 additions & 0 deletions Main/WebService/raphael.no-deps.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Main/WebService/raphael.no-deps.min.js

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions Main/WebService/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"use strict";

const webpack = require("webpack");
const fs = require("fs");

module.exports = function (env) {

let externals = [];

if (env && env.noDeps) {
console.log('Building version without deps');
externals.push("eve");
}

return {
entry: './dev/raphael.amd.js',
output: {
path: __dirname,
filename: "raphael.js",
libraryTarget: "umd",
library: "Raphael"
},

externals: externals,

plugins: [
new webpack.BannerPlugin({
banner: fs.readFileSync('./dev/banner.txt', 'utf8'),
raw: true,
entryOnly: true
})
],
resolve: {
alias: {
"eve": "eve-raphael/eve"
}
}
};

};

0 comments on commit f8f798e

Please sign in to comment.