rename build folder to dist

This commit is contained in:
Niklas von Hertzen 2014-09-01 20:22:56 +03:00
parent f3f92ab425
commit b2280bc8ec
9 changed files with 46 additions and 20 deletions

View File

@ -25,7 +25,7 @@ module.exports = function(grunt) {
src: [
'src/promise.js', 'src/fallback.js', 'src/**/*.js'
],
dest: 'build/<%= pkg.name %>.js'
dest: 'dist/<%= pkg.name %>.js'
},
options:{
banner: meta.banner + meta.pre,
@ -71,7 +71,7 @@ module.exports = function(grunt) {
uglify: {
dist: {
src: ['<%= concat.dist.dest %>'],
dest: 'build/<%= pkg.name %>.min.js'
dest: 'dist/<%= pkg.name %>.min.js'
},
options: {
banner: meta.banner

View File

@ -1,10 +1,10 @@
{
"name": "html2canvas",
"version": "0.4.1",
"version": "0.5.0-alpha",
"description": "Screenshots with JavaScript",
"main": "build/html2canvas.js",
"main": "dist/html2canvas.js",
"ignore": [
"tests",
".travis.yml"
]
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*
html2canvas 0.5.0-rc1 <http://html2canvas.hertzen.com>
html2canvas 0.5.0-alpha <http://html2canvas.hertzen.com>
Copyright (c) 2014 Niklas von Hertzen
Released under MIT License
@ -420,6 +420,32 @@ function LinearGradientContainer(imageData) {
this.x1 = x0;
this.y1 = y0;
break;
default:
var angle = position.match(this.angleRegExp);
if (angle) {
switch(angle[2]) {
case "deg":
var angleDeg = parseFloat(angle[1]);
var radians = angleDeg / (180 / Math.PI);
var slope = Math.tan(radians); // m
var perpendicularSlope = -1 / slope;
// y = 2
// y = m * x
// 2 = m * x
this.y0 = 2 / Math.tan(slope) / 2; // 1
// console.log(radians, angle);
this.x0 = 0;
this.x1 = 1;
this.y1 = 0;
break;
}
}
}
}, this);
} else {

8
dist/html2canvas.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -171,7 +171,7 @@
<p style="color: black; font-size: 1em; line-height: 1.3em; clear: both">
This is a nonsensical document, but syntactically valid HTML 4.0. All 100% conformant CSS1 agents should be able to render the document elements above this paragraph <b>indistinguishably</b> (to the pixel) from this reference rendering, (except font rasterization and form widgets). All discrepancies should be traceable to CSS1 implementation shortcomings. Once you have finished evaluating this test, you can return to the <A HREF="sec5526c.htm" style="text-decoration:none">parent page</A>.
</p>
<script type="text/javascript" src="../build/html2canvas.js"></script>
<script type="text/javascript" src="../dist/html2canvas.js"></script>
<script type="text/javascript">
html2canvas(document.body, {
onrendered: function(canvas) {

View File

@ -53,7 +53,7 @@
</div>
</div>
<script type="text/javascript" src="../build/html2canvas.js"></script>
<script type="text/javascript" src="../dist/html2canvas.js"></script>
<script type="text/javascript">
html2canvas(document.body, {
onrendered: function(canvas) {

View File

@ -2,7 +2,7 @@
"title": "html2canvas",
"name": "html2canvas",
"description": "Screenshots with JavaScript",
"version": "0.5.0-rc1",
"version": "0.5.0-alpha",
"author": {
"name": "Niklas von Hertzen",
"email": "niklasvh@gmail.com",
@ -20,7 +20,7 @@
"url": "https://github.com/niklasvh/html2canvas/issues"
},
"devDependencies": {
"baconjs": "0.7.11",
"baconjs": "^0.7.11",
"base64-arraybuffer": ">= 0.1.0",
"grunt": "^0.4.5",
"grunt-contrib-concat": "*",
@ -31,7 +31,7 @@
"grunt-contrib-watch": "~0.5.1",
"lodash": "^2.4.1",
"png-js": ">= 0.1.1",
"wd": "0.2.21"
"wd": "^0.2.21"
},
"scripts": {
"test": "grunt travis --verbose"

View File

@ -14,7 +14,7 @@ var h2cSelector, h2cOptions;
var html2canvas = ['log', 'nodecontainer', 'stackingcontext', 'textcontainer', 'support', 'imagecontainer', 'dummyimagecontainer', 'proxyimagecontainer', 'gradientcontainer', 'lineargradientcontainer', 'webkitgradientcontainer',
'imageloader', 'nodeparser', 'font', 'fontmetrics', 'core', 'renderer', 'promise', 'renderers/canvas'], i;
if (window.location.search === "?selenium") {
document.write(srcStart + '/build/html2canvas.js' + scrEnd);
document.write(srcStart + '/dist/html2canvas.js' + scrEnd);
} else {
for (i = 0; i < html2canvas.length; ++i) {
document.write(srcStart + '/src/' + html2canvas[i] + '.js?' + Math.random() + scrEnd);