Initial ethoFS Integration
This commit is contained in:
72
assets/dashboard/plugins/raphael/Gruntfile.js
Normal file
72
assets/dashboard/plugins/raphael/Gruntfile.js
Normal file
@@ -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"]);
|
||||
};
|
||||
8293
assets/dashboard/plugins/raphael/raphael.js
Normal file
8293
assets/dashboard/plugins/raphael/raphael.js
Normal file
File diff suppressed because it is too large
Load Diff
3
assets/dashboard/plugins/raphael/raphael.min.js
vendored
Normal file
3
assets/dashboard/plugins/raphael/raphael.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7922
assets/dashboard/plugins/raphael/raphael.no-deps.js
Normal file
7922
assets/dashboard/plugins/raphael/raphael.no-deps.js
Normal file
File diff suppressed because it is too large
Load Diff
3
assets/dashboard/plugins/raphael/raphael.no-deps.min.js
vendored
Normal file
3
assets/dashboard/plugins/raphael/raphael.no-deps.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
61
assets/dashboard/plugins/raphael/webpack.config.js
Normal file
61
assets/dashboard/plugins/raphael/webpack.config.js
Normal file
@@ -0,0 +1,61 @@
|
||||
"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: filename + ".js",
|
||||
libraryTarget: "umd",
|
||||
library: "Raphael"
|
||||
},
|
||||
|
||||
externals: externals,
|
||||
|
||||
plugins: plugins,
|
||||
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: "eslint-loader",
|
||||
include: "./dev/"
|
||||
}
|
||||
],
|
||||
|
||||
eslint: {
|
||||
configFile: './.eslintrc'
|
||||
},
|
||||
|
||||
resolve: {
|
||||
modulesDirectories: ["bower_components"]
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user