Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = function(grunt) {
return String(str).remove(/\.js$/, "");
}
},
banner: '/** <%= pkg.main || pkg.name %>.js - v<%= pkg.version %> - ' +
banner: '/** <%= pkg.main || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
Expand All @@ -22,8 +22,8 @@ module.exports = function(grunt) {
stripBanners: "block"
},
dist: {
src: ['<%= pkg.name %>.js'],
dest: '<%= pkg.name %>.js'
src: ['<%= pkg.name %>'],
dest: '<%= pkg.name %>'
}
},
uglify: {
Expand All @@ -32,7 +32,7 @@ module.exports = function(grunt) {
},
dist: {
src: '<%= concat.dist.dest %>',
dest: '<%= pkg.name %>.min.js'
dest: "<%= pkg.name.replace('.js', '') %>.min.js"
}
},
jshint: {
Expand All @@ -48,7 +48,7 @@ module.exports = function(grunt) {
unused: true,
boss: true,
eqnull: true,
globals: { "window": true, "SVG": true }
globals: { "window": true, "SVG": true, "define": true, "module": true, "require": true, "self": true }
},
svgpathfile: {
src: 'svg.path.js'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Curveto commands specify a Bezier curve. There are two types of Bezier curves: C
Cubic Bezier curves takes three objects. The two first objects are control points for the initial point and end point respectively in absolute coordinates. The last object is is the end point of the curveto segment.

```javascript
var rect = draw.path().m({x: 100, y: 100}).C({x: 100, y: 200}, {x: 200, y: 2oo}, {x: 200, y: 100})
var rect = draw.path().m({x: 100, y: 100}).C({x: 100, y: 200}, {x: 200, y: 200}, {x: 200, y: 100})
```

### c({dc1x, dc1y}, {dc2x, dc2y}, {dx, dy})
Expand Down Expand Up @@ -131,7 +131,7 @@ For chains of smooth Bezier curves, the T and S commands are available. Their sy
```javascript
var rect = draw.path()
.M({x: 100, y: 100})
.C({x: 100, y: 200}, {x: 200, y: 2oo}, {x: 200, y: 100})
.C({x: 100, y: 200}, {x: 200, y: 200}, {x: 200, y: 100})
.S({x: 300, y:200}, {x: 300, y: 100}) // The "reflected control point will be `{x:200, y:100}`
```

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "svg.path.js",
"main": "svg.path.js",
"types": "svg.path.js.d.ts",
"version": "0.6.2",
"description": "A path extension for the svg.js library",
"keywords": [
Expand All @@ -25,10 +26,12 @@
"node": ">= 0.10.0"
},
"devDependencies": {
"@svgdotjs/svg.js": "^3.0.16",
"grunt": "~0.4.2",
"grunt-contrib-watch": "~0.5.3",
"grunt-cli": "^1.3.2",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-jshint": "~0.8.0"
"grunt-contrib-watch": "~0.5.3"
}
}
Loading