Skip to content

Commit 1418a76

Browse files
changed name cuz of conficts with existing angular module
0 parents  commit 1418a76

17 files changed

+700
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/bower_components/
2+
/node_modules/
3+
4+
.DS_Store

.jshintrc

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"node": true,
3+
"browser": true,
4+
"esnext": true,
5+
"bitwise": true,
6+
"camelcase": true,
7+
"curly": false,
8+
"eqeqeq": true,
9+
"immed": true,
10+
"indent": 2,
11+
"latedef": true,
12+
"newcap": true,
13+
"noarg": true,
14+
"quotmark": "single",
15+
"regexp": true,
16+
"undef": true,
17+
"unused": false,
18+
"strict": true,
19+
"globalstrict": true,
20+
"trailing": true,
21+
"smarttabs": true,
22+
"predef": [
23+
"angular"
24+
]
25+
}

.project

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ng-chartjs-directive</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
</buildSpec>
9+
<natures>
10+
<nature>com.aptana.projects.webnature</nature>
11+
</natures>
12+
</projectDescription>

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- '0.10'
4+
- '0.8'

CONTRIBUTING.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
## Important notes
4+
Please don't edit files in the `dist` subdirectory as they are generated via Grunt. You'll find source code in the `src` subdirectory!
5+
6+
### Code style
7+
Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already.**
8+
9+
### PhantomJS
10+
While Grunt can run the included unit tests via [PhantomJS](http://phantomjs.org/), this shouldn't be considered a substitute for the real thing. Please be sure to test the `test/*.html` unit test file(s) in _actual_ browsers.
11+
12+
## Modifying the code
13+
First, ensure that you have the latest [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed.
14+
15+
Test that Grunt's CLI and Bower are installed by running `grunt --version` and `bower --version`. If the commands aren't found, run `npm install -g grunt-cli bower`. For more information about installing the tools, see the [getting started with Grunt guide](http://gruntjs.com/getting-started) or [bower.io](http://bower.io/) respectively.
16+
17+
1. Fork and clone the repo.
18+
1. Run `npm install` to install all build dependencies (including Grunt).
19+
1. Run `bower install` to install the front-end dependencies.
20+
1. Run `grunt` to grunt this project.
21+
22+
Assuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing is broken.
23+
24+
## Submitting pull requests
25+
26+
1. Create a new branch, please don't work in your `master` branch directly.
27+
1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail.
28+
1. Fix stuff.
29+
1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done.
30+
1. Open `test/*.html` unit test file(s) in actual browser to ensure tests pass everywhere.
31+
1. Update the documentation to reflect any changes.
32+
1. Push to your fork and submit a pull request.

Gruntfile.js

+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
// Generated on 2013-10-19 using generator-angular-component 0.2.3
2+
'use strict';
3+
4+
module.exports = function(grunt) {
5+
grunt.loadNpmTasks('grunt-contrib-coffee');
6+
// Configurable paths
7+
var yoConfig = {
8+
livereload: 35729,
9+
src: 'src',
10+
dist: 'dist'
11+
};
12+
13+
// Livereload setup
14+
var lrSnippet = require('connect-livereload')({port: yoConfig.livereload});
15+
var mountFolder = function (connect, dir) {
16+
return connect.static(require('path').resolve(dir));
17+
};
18+
19+
// Load all grunt tasks
20+
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
21+
22+
// Project configuration
23+
grunt.initConfig({
24+
pkg: grunt.file.readJSON('package.json'),
25+
yo: yoConfig,
26+
meta: {
27+
banner: '/**\n' +
28+
' * <%= pkg.name %>\n' +
29+
' * @version v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
30+
' * @link <%= pkg.homepage %>\n' +
31+
' * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n' +
32+
' * @license MIT License, http://www.opensource.org/licenses/MIT\n' +
33+
' */\n'
34+
},
35+
open: {
36+
server: {
37+
path: 'http://localhost:<%= connect.options.port %>'
38+
}
39+
},
40+
clean: {
41+
dist: {
42+
files: [{
43+
dot: true,
44+
src: [
45+
'.tmp',
46+
'<%= yo.dist %>/*',
47+
'!<%= yo.dist %>/.git*'
48+
]
49+
}]
50+
},
51+
server: '.tmp'
52+
},
53+
watch: {
54+
gruntfile: {
55+
files: '<%= jshint.gruntfile.src %>',
56+
tasks: ['jshint:gruntfile']
57+
},
58+
less: {
59+
files: ['<%= yo.src %>/{,*/}*.less'],
60+
tasks: ['less:dist']
61+
},
62+
app: {
63+
files: [
64+
'<%= yo.src %>/{,*/}*.html',
65+
'{.tmp,<%= yo.src %>}/{,*/}*.css',
66+
'{.tmp,<%= yo.src %>}/{,*/}*.js'
67+
],
68+
options: {
69+
livereload: yoConfig.livereload
70+
}
71+
},
72+
test: {
73+
files: '<%= jshint.test.src %>',
74+
tasks: ['jshint:test', 'qunit']
75+
}
76+
},
77+
connect: {
78+
options: {
79+
port: 9000,
80+
hostname: '0.0.0.0' // Change this to '0.0.0.0' to access the server from outside.
81+
},
82+
livereload: {
83+
options: {
84+
middleware: function (connect) {
85+
return [
86+
lrSnippet,
87+
mountFolder(connect, '.tmp'),
88+
mountFolder(connect, yoConfig.src)
89+
];
90+
}
91+
}
92+
}
93+
},
94+
less: {
95+
options: {
96+
// dumpLineNumbers: 'all',
97+
paths: ['<%= yo.src %>']
98+
},
99+
dist: {
100+
files: {
101+
'<%= yo.src %>/<%= yo.name %>.css': '<%= yo.src %>/<%= yo.name %>.less'
102+
}
103+
}
104+
},
105+
jshint: {
106+
gruntfile: {
107+
options: {
108+
jshintrc: '.jshintrc'
109+
},
110+
src: 'Gruntfile.js'
111+
},
112+
src: {
113+
options: {
114+
jshintrc: '.jshintrc'
115+
},
116+
src: ['<%= yo.src %>/{,*/}*.js']
117+
},
118+
test: {
119+
options: {
120+
jshintrc: 'test/.jshintrc'
121+
},
122+
src: ['test/**/*.js']
123+
}
124+
},
125+
karma: {
126+
options: {
127+
configFile: 'karma.conf.js',
128+
browsers: ['PhantomJS']
129+
},
130+
unit: {
131+
singleRun: true
132+
},
133+
server: {
134+
autoWatch: true
135+
}
136+
},
137+
ngmin: {
138+
options: {
139+
banner: '<%= meta.banner %>'
140+
},
141+
dist: {
142+
src: ['<%= yo.src %>/<%= pkg.name %>.js'],
143+
dest: '<%= yo.dist %>/<%= pkg.name %>.js'
144+
}
145+
// dist: {
146+
// files: {
147+
// '/.js': '/.js'
148+
// }
149+
// }
150+
},
151+
concat: {
152+
options: {
153+
banner: '<%= meta.banner %>',
154+
stripBanners: true
155+
},
156+
dist: {
157+
src: ['<%= yo.src %>/<%= pkg.name %>.js'],
158+
dest: '<%= yo.dist %>/<%= pkg.name %>.js'
159+
}
160+
},
161+
uglify: {
162+
options: {
163+
banner: '<%= meta.banner %>'
164+
},
165+
dist: {
166+
src: '<%= concat.dist.dest %>',
167+
dest: '<%= yo.dist %>/<%= pkg.name %>.min.js'
168+
}
169+
},
170+
coffee : {
171+
compile : {
172+
files : {
173+
'<%= yo.src %>/<%= pkg.name %>.js' : '<%= yo.src %>/<%= pkg.name %>.coffee',
174+
'<%= yo.test %>/<%= pkg.name %>.js' : '<%= yo.test %>/<%= pkg.name %>.coffee'
175+
}
176+
}
177+
}
178+
});
179+
180+
grunt.registerTask('test', [
181+
'jshint',
182+
'karma:unit'
183+
]);
184+
185+
grunt.registerTask('build', [
186+
'clean:dist',
187+
'less:dist',
188+
'ngmin:dist',
189+
'uglify:dist'
190+
]);
191+
192+
grunt.registerTask('release', [
193+
'test',
194+
'bump-only',
195+
'dist',
196+
'bump-commit'
197+
]);
198+
199+
grunt.registerTask('default', ['build']);
200+
201+
};

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ng-chartjs-directive
2+
3+
4+
5+
## Getting Started
6+
7+
Download the [production version][min] or the [development version][max].
8+
9+
[min]: https://raw.github.com/jonniespratley/jquery-ng-chartjs-directive/master/dist/angular-ng-chartjs-directive.min.js
10+
[max]: https://raw.github.com/jonniespratley/jquery-ng-chartjs-directive/master/dist/angular-ng-chartjs-directive.js
11+
12+
In your web page:
13+
14+
```html
15+
<script src="angular.js"></script>
16+
<script src="dist/ng-chartjs-directive.min.js"></script>
17+
```
18+
19+
## Documentation
20+
_(Coming soon)_
21+
22+
## Examples
23+
_(Coming soon)_
24+

bower.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "ng-chartjs-directive",
3+
"version": "0.0.1",
4+
"dependencies": {
5+
},
6+
"devDependencies": {
7+
"angular-unstable": "latest",
8+
"angular-mocks": "latest",
9+
"jquery": "latest"
10+
}
11+
}

karma.conf.js

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// Karma configuration
2+
3+
// base path, that will be used to resolve files and exclude
4+
basePath = '';
5+
6+
// list of files / patterns to load in the browser
7+
files = [
8+
JASMINE,
9+
JASMINE_ADAPTER,
10+
'bower_components/angular-unstable/angular.js',
11+
'bower_components/jquery/jquery.js',
12+
'bower_components/angular-mocks/angular-mocks.js',
13+
'src/*.js',
14+
'test/spec/*.js'
15+
];
16+
17+
// list of files to exclude
18+
exclude = [];
19+
20+
// test results reporter to use
21+
// possible values: dots || progress || growl
22+
reporters = ['progress'];
23+
24+
// web server port
25+
port = 8080;
26+
27+
// cli runner port
28+
runnerPort = 9100;
29+
30+
// enable / disable colors in the output (reporters and logs)
31+
colors = true;
32+
33+
// level of logging
34+
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
35+
logLevel = LOG_INFO;
36+
37+
// enable / disable watching file and executing tests whenever any file changes
38+
autoWatch = false;
39+
40+
// Start these browsers, currently available:
41+
// - Chrome
42+
// - ChromeCanary
43+
// - Firefox
44+
// - Opera
45+
// - Safari (only Mac)
46+
// - PhantomJS
47+
// - IE (only Windows)
48+
browsers = ['Chrome'];
49+
50+
// If browser does not capture in given timeout [ms], kill it
51+
captureTimeout = 5000;
52+
53+
// Continuous Integration mode
54+
// if true, it capture browsers, run tests and exit
55+
singleRun = false;

0 commit comments

Comments
 (0)