Added Grunt building

master
Dmitry Baranovskiy 2013-08-05 18:04:30 +10:00
parent c40144d90c
commit 537e249baf
5 changed files with 5574 additions and 0 deletions

51
Gruntfile.js Normal file
View File

@ -0,0 +1,51 @@
module.exports = function(grunt) {
var pkg = grunt.file.readJSON("package.json");
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: pkg,
banner: grunt.file.read("copy.js")
.replace(/@VERSION/, pkg.version)
.replace(/@DATE/, grunt.template.today("yyyy-mm-dd")) + "\n",
// Task configuration.
uglify: {
options: {
banner: "<%= banner %>",
report: "min"
},
dist: {
src: "<%= concat.target.dest %>",
dest: pkg.name.toLowerCase() + "-min.js"
}
},
concat: {
options: {
banner: "<%= banner %>"
},
target: {
dest: pkg.name.toLowerCase() + ".js",
src: [
"./eve/eve.js",
"mina.js",
"elemental.js",
"svg.js",
"savage.path.js",
"savage.set.js",
"savage.equal.js",
"savage.mouse.js"
]
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-uglify");
// Default task.
grunt.registerTask("default", ["concat", "uglify"]);
};

31
copy.js Normal file
View File

@ -0,0 +1,31 @@
// .--.--.
// / / '.
// | : /`. /
// ; | |--` .---. ,----._,.
// | : ;_ ,--.--. /. ./| ,--.--. / / ' / ,---.
// \ \ `. / \ .-' . ' | / \ | : | / \
// `----. \.--. .-. /___/ \: | .--. .-. || | .\ . / / |
// __ \ \ | \__\/: . . \ ' . \__\/: . .. ; '; |. ' / |
// / /`--' / ," .--.; |\ \ ' ," .--.; |' . . |' ; /|
// '--'. / / / ,. | \ \ / / ,. | `---`-'| |' | / |
// `--'---' ; : .' \ \ \ |; : .' \.'__/\_: || : |
// | , .-./ '---" | , .-./| : : \ \ /
// `--`---' `--`---' \ \ / `----'
// `--`-'
// Savage @VERSION
//
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// build: @DATE

17
package.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "Savage",
"version": "0.0.1",
"description": "JavaScript Vector Library",
"main": "savage.js",
"repository": {
"type": "git",
"url": "git://github.com/DmitryBaranovskiy/raphael.git"
},
"author": "Dmitry Baranovskiy",
"license": "MIT",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-concat": "~0.3.0"
}
}

33
savage-min.js vendored Normal file

File diff suppressed because one or more lines are too long

5442
savage.js Normal file

File diff suppressed because it is too large Load Diff