Skip to content

Commit d1b998c

Browse files
committed
init grunt
1 parent 18476fe commit d1b998c

14 files changed

+804
-579
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.swp
22
doc/
33
public/
4+
node_modules/

At.jquery.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "At",
3+
"title": "At",
4+
"description": "Add Github like mentions autocomplete to your application.",
5+
"version": "0.2.0",
6+
"homepage": "http://ichord.github.com/At.js/",
7+
"author": {
8+
"name": "ichord",
9+
"email": "[email protected]",
10+
"url": "http://ichord.github.com/"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git://github.com/ichord/At.js.git"
15+
},
16+
"bugs": {
17+
"url": "https://github.com/ichord/At.js/issues"
18+
},
19+
"licenses": [
20+
{
21+
"type": "MIT",
22+
"url": "http://ichord.github.com/At.js//blob/master/LICENSE-MIT"
23+
}
24+
],
25+
"dependencies": {
26+
"jquery": "*"
27+
},
28+
"keywords": []
29+
}

CONTRIBUTING.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
See the [Why does grunt complain that PhantomJS isn't installed?](https://github.com/gruntjs/grunt/blob/master/docs/faq.md#why-does-grunt-complain-that-phantomjs-isnt-installed) guide in the [Grunt FAQ](https://github.com/gruntjs/grunt/blob/master/docs/faq.md) for help with installing or troubleshooting PhantomJS.
13+
14+
## Modifying the code
15+
First, ensure that you have the latest [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed.
16+
17+
Test that grunt is installed globally by running `grunt --version` at the command-line. If grunt isn't installed globally, run `npm install -g grunt` to install the latest version. _You may need to run `sudo npm install -g grunt`._
18+
19+
_Note that in Windows, you may have to run `grunt.cmd` instead of `grunt`._
20+
21+
1. Fork and clone the repo.
22+
1. Run `npm install` to install all dependencies (including grunt).
23+
1. Run `grunt` to grunt this project.
24+
25+
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.
26+
27+
## Submitting pull requests
28+
29+
1. Create a new branch, please don't work in your `master` branch directly.
30+
1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail.
31+
1. Fix stuff.
32+
1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done.
33+
1. Open `test/*.html` unit test file(s) in actual browser to ensure tests pass everywhere.
34+
1. Update the documentation to reflect any changes.
35+
1. Push to your fork and submit a pull request.

LICENSE-MIT

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2013 [email protected]
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

grunt.js

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*global module:false*/
2+
module.exports = function(grunt) {
3+
4+
// Project configuration.
5+
grunt.initConfig({
6+
pkg: '<json:At.jquery.json>',
7+
meta: {
8+
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
9+
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
10+
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
11+
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
12+
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
13+
},
14+
// concat: {
15+
// dist: {
16+
// src: ['<banner:meta.banner>', '<file_strip_banner:src/<%= pkg.name %>.js>'],
17+
// dest: 'dist/<%= pkg.name %>.js'
18+
// }
19+
// },
20+
// min: {
21+
// dist: {
22+
// src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
23+
// dest: 'dist/<%= pkg.name %>.min.js'
24+
// }
25+
// },
26+
lint: {
27+
files: ['grunt.js', 'src/**/*.js', 'test/**/*.js']
28+
},
29+
watch: {
30+
files: '<config:lint.files>',
31+
tasks: 'lint jasmine_node'
32+
},
33+
jshint: {
34+
options: {
35+
curly: true,
36+
eqeqeq: true,
37+
immed: true,
38+
latedef: true,
39+
newcap: true,
40+
noarg: true,
41+
sub: true,
42+
undef: true,
43+
boss: true,
44+
eqnull: true,
45+
browser: true
46+
},
47+
globals: {
48+
jQuery: true
49+
}
50+
},
51+
coffee: {
52+
app: {
53+
src: ['src/*.coffee'],
54+
dest: 'js/'
55+
}
56+
},
57+
jasmine_node: {
58+
specNameMatcher: "spec", // load only specs containing specNameMatcher
59+
extensions: "coffee",
60+
projectRoot: ".",
61+
forceExit: true,
62+
jUnit: {
63+
report: false,
64+
savePath : "./spec/reports/",
65+
useDotNotation: true,
66+
consolidate: true
67+
}
68+
}
69+
});
70+
71+
// grunt.loadNpmTasks('grunt-jasmine-runner');
72+
// grunt.loadNpmTasks('grunt-contrib-coffee');
73+
grunt.loadNpmTasks('grunt-coffee');
74+
grunt.loadNpmTasks('grunt-jasmine-node');
75+
76+
// Default task.
77+
grunt.registerTask('default', 'coffee lint jasmine_node');
78+
79+
};

0 commit comments

Comments
 (0)