Skip to content

Commit 272bfca

Browse files
author
Nils Lagerkvist
committed
Added package.json and bower.json files
1 parent 1bd2314 commit 272bfca

File tree

4 files changed

+130
-0
lines changed

4 files changed

+130
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

Gruntfile.js

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
module.exports = function(grunt) {
2+
3+
// Project configuration.
4+
grunt.initConfig({
5+
// Metadata.
6+
bwr: grunt.file.readJSON('bower.json'),
7+
pkg: grunt.file.readJSON('package.json'),
8+
custom: {
9+
remove: function(str) {
10+
return String(str).remove(/\.js$/, "");
11+
}
12+
},
13+
banner: '/** <%= pkg.main || pkg.name %>.js - v<%= pkg.version %> - ' +
14+
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
15+
'<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
16+
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
17+
' Licensed under the <%= pkg.license %> license /\n */\n',
18+
// Task configuration.
19+
concat: {
20+
options: {
21+
banner: '<%= banner %>',
22+
stripBanners: "block"
23+
},
24+
dist: {
25+
src: ['<%= pkg.name %>.js'],
26+
dest: '<%= pkg.name %>.js'
27+
}
28+
},
29+
uglify: {
30+
options: {
31+
banner: '<%= banner %>'
32+
},
33+
dist: {
34+
src: '<%= concat.dist.dest %>',
35+
dest: '<%= pkg.name %>.min.js'
36+
}
37+
},
38+
jshint: {
39+
options: {
40+
curly: false,
41+
eqeqeq: true,
42+
immed: true,
43+
latedef: true,
44+
newcap: true,
45+
noarg: true,
46+
sub: true,
47+
undef: true,
48+
unused: true,
49+
boss: true,
50+
eqnull: true,
51+
globals: { "window": true, "SVG": true }
52+
},
53+
svgpathfile: {
54+
src: 'svg.path.js'
55+
}
56+
},
57+
watch: {
58+
svgpathfile: {
59+
files: '<%= jshint.svgpathfile.src %>',
60+
tasks: ['jshint:svgpathfile']
61+
}
62+
}
63+
});
64+
65+
// These plugins provide necessary tasks.
66+
grunt.loadNpmTasks('grunt-contrib-concat');
67+
grunt.loadNpmTasks('grunt-contrib-uglify');
68+
grunt.loadNpmTasks('grunt-contrib-jshint');
69+
grunt.loadNpmTasks('grunt-contrib-watch');
70+
71+
// Default task.
72+
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
73+
74+
};

bower.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "svg.path",
3+
"main": "svg.path.js",
4+
"version": "0.6.0",
5+
"homepage": "https://github.com/otm/svg.path.js",
6+
"authors": [
7+
{ "name": "Nils Lagerkvist", "homepage": "https://github.com/otm"},
8+
{ "name": "dotnetCarpenter", "email": "[email protected]"}
9+
],
10+
"description": "A path extension for the svg.js library",
11+
"keywords": [
12+
"svg.js",
13+
"path"
14+
],
15+
"license": "MIT",
16+
"ignore": [
17+
"**/.*",
18+
"node_modules",
19+
"bower_components",
20+
"Gruntfile.js",
21+
"*.json",
22+
"spec",
23+
"*.html",
24+
"*.md"
25+
]
26+
}

package.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "svg.path",
3+
"version": "0.6.0",
4+
"description": "A path extension for the svg.js library",
5+
"keywords": ["svg", "svg.js", "path"],
6+
"homepage": "http://otm.github.io/svg.path.js/",
7+
"bugs": {
8+
"url" : "http://github.com/owner/project/issues"
9+
},
10+
"license": "MIT",
11+
"author": {
12+
"name": "Nils Lagerkvist",
13+
"url": "https://github.com/otm"
14+
},
15+
"repository" : {
16+
"type" : "git",
17+
"url" : "https://github.com/otm/svg.path.js.git"
18+
},
19+
"engines": {
20+
"node": ">= 0.10.0"
21+
},
22+
"devDependencies": {
23+
"grunt": "~0.4.2",
24+
"grunt-contrib-watch": "~0.5.3",
25+
"grunt-contrib-concat": "~0.3.0",
26+
"grunt-contrib-uglify": "~0.2.7",
27+
"grunt-contrib-jshint": "~0.8.0"
28+
}
29+
}

0 commit comments

Comments
 (0)