Skip to content

Commit

Permalink
Introduce Grunt build step, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish committed May 3, 2012
1 parent bff38e3 commit 0aad823
Show file tree
Hide file tree
Showing 8 changed files with 712 additions and 19 deletions.
File renamed without changes.
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,24 +228,48 @@ $.stellar({
});
```

Using Stellar.js on your site?
------------------------------
Sites Using Stellar.js
----------------------

[Magic City](http://mc.starz.com)
[François Hollande](http://www.parti-socialiste.fr/latimelineduchangement)
[WS Interactive](http://www.ws-interactive.fr/methode)
[360 Strategy Group](http://360strategygroup.com)

[I'd love to hear about it!](http://twitter.com/markdalgleish) Let me know if you'd like me to feature your site here.
I'm sure there are heaps more. [Let me know if you'd like me to feature your site here.]((http://twitter.com/markdalgleish))

How to Build
------------

The code is minified using UglifyJS using the following command:
Stellar.js uses [Grunt](http://gruntjs.com).

Once you've got Grunt set up, you can validate, concatenate and minify the project with the following command:

`grunt`

To validate the code using JSHint:

`uglifyjs -o stellar.min.js stellar.js`
`grunt lint`

To continuously validate the code while developing:

`grunt watch`

Contributing to Stellar.js
--------------------------

If you want to contribute in a way that changes the API, please file an issue before submitting a pull request so we can dicuss how to appropriately integrate your ideas.
Make sure that all plugin changes are made in `src/jquery.stellar.js` (`jquery.stellar.js` and `jquery.stellar.min.js` are generated by Grunt), and that you build the project with `grunt` before committing.

If you want to contribute in a way that changes the API, please file an issue before submitting a pull request so we can discuss how to appropriately integrate your ideas.

Questions?
----------

Contact me on GitHub or Twitter: [@markdalgleish](http://twitter.com/markdalgleish)
Contact me on GitHub or Twitter: [@markdalgleish](http://twitter.com/markdalgleish)

License
-------

Copyright 2012, Mark Dalgleish
This content is released under the MIT license
http://markdalgleish.mit-license.org
61 changes: 61 additions & 0 deletions grunt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*global module:false*/
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*!\n' +
' * <%= pkg.title || pkg.name %> v<%= pkg.version %>\n' +
' * <%= pkg.homepage %>\n' +
' * \n' +
' * Copyright <%= grunt.template.today("yyyy") %>, <%= pkg.author.name %>\n' +
' * This content is released under the <%= _.pluck(pkg.licenses, "type").join(", ") %> license<%= pkg.licenses.length === 1 ? "" : "s" %>\n' +
' * <%= _.pluck(pkg.licenses, "url").join(", ") %>\n' +
' */',
microbanner: '/*! <%= pkg.title || pkg.name %> v<%= pkg.version %> | Copyright <%= grunt.template.today("yyyy") %>, <%= pkg.author.name %> | <%= pkg.homepage %> | <%= _.pluck(pkg.licenses, "url").join(", ") %> */'
},
lint: {
files: ['grunt.js', 'src/**/*.js']
},
concat: {
dist: {
src: ['<banner:meta.banner>', '<file_strip_banner:src/<%= pkg.name %>.js>'],
dest: '<%= pkg.name %>.js'
}
},
min: {
dist: {
src: ['<banner:meta.microbanner>', '<config:concat.dist.dest>'],
dest: '<%= pkg.name %>.min.js'
}
},
watch: {
files: '<config:lint.files>',
tasks: 'lint'
},
jshint: {
options: {
curly: false,
eqeqeq: true,
immed: false,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
browser: true
},
globals: {
jQuery: true
}
},
uglify: {}
});

// Default task.
grunt.registerTask('default', 'lint concat min');

};
Loading

0 comments on commit 0aad823

Please sign in to comment.