-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pushed files that were left out of previous pushes, for raphael js
- Loading branch information
1 parent
66e898f
commit f8f798e
Showing
7 changed files
with
418 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
"extends": "standard", | ||
"plugins": [ | ||
"standard" | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]); | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
}; | ||
|
||
}; |