Permalink
Browse files

Replaced Makefile with Gruntfile.

  • Loading branch information...
1 parent 16f088c commit 90e421b8115186ed012923de075ad19d61381794 @hiddentao committed Sep 20, 2013
Showing with 2,953 additions and 871 deletions.
  1. +3 −1 .travis.yml
  2. +4 −0 CHANGELOG.md
  3. +64 −0 Gruntfile.js
  4. +0 −33 Makefile
  5. +11 −12 README.md
  6. +1 −1 bower.json
  7. +460 −146 docs/docco.css
  8. +2,312 −547 docs/squel.html
  9. +39 −26 package.json
  10. +58 −80 squel.js
  11. +1 −25 squel.min.js
View
@@ -6,10 +6,12 @@ node_js:
- "0.10"
before_script:
+ - "npm install -g grunt-cli"
+ - "npm install -g docco"
- "npm install"
script:
- - "make test"
+ - "grunt"
notifications:
email:
View
@@ -1,6 +1,10 @@
# Changelog for [squel](https://github.com/hiddentao/squel)
+## In progress...
+* Switched from Make to Grunt
+
+
## 10 Jun 2013 (1.1.3)
* Table names in SELECT queries can now be queries themselves (i.e. SQL sub statements)
View
@@ -0,0 +1,64 @@
+'use strict';
+
+module.exports = function (grunt) {
+ require('load-grunt-tasks')(grunt);
+ require('time-grunt')(grunt);
+
+ grunt.initConfig({
+ clean: {
+ build: ['squel.js', 'squel.min.js'],
+ docs: 'docs'
+ },
+ coffee: {
+ build: {
+ files: [{
+ src: 'src/*.coffee',
+ dest: './squel.js'
+ }]
+ }
+ },
+ uglify: {
+ build: {
+ options: {
+ banner: '/*! squel | https://github.com/hiddentao/squel | BSD license */'
+ },
+ files: {
+ './squel.min.js': [ './squel.js' ]
+ }
+ }
+ },
+ mochaTest: {
+ test: {
+ options: {
+ reporter: 'spec',
+ ui: 'exports',
+ require: 'coffee-script'
+ },
+ src: ['test/*.test.coffee']
+ }
+ },
+ shell: {
+ docs: {
+ command: 'docco src/*.coffee'
+ }
+ }
+ });
+
+
+
+ grunt.registerTask('test', [
+ 'mochaTest'
+ ]);
+
+ grunt.registerTask('build', [
+ 'clean',
+ 'coffee:build',
+ 'uglify:build',
+ 'shell:docs'
+ ]);
+
+ grunt.registerTask('default', [
+ 'test',
+ 'build'
+ ]);
+};
View
@@ -1,33 +0,0 @@
-BIN = node_modules/.bin
-TESTS = test/*.test.coffee
-
-
-all: docs squel.min.js
-
-
-squel.js: src/squel.coffee
- $(BIN)/coffee -c -o . $?
-
-squel.min.js: squel.js
- $(BIN)/uglifyjs -o $@ $?
-
-docs/squel.html: src/squel.coffee
- $(BIN)/docco $?
-
-
-test:
- $(BIN)/mocha $(TESTS)
-
-docs: docs/squel.html
-
-clean_docs:
- rm -rf docs
-
-clean_js:
- rm *.js
-
-clean: clean_docs clean_js
-
-
-.PHONY: test docs all clean clean_docs clean_js
-
View
@@ -249,25 +249,24 @@ Squel allows you to override the built-in query builders with your own as well a
// 'PRAGMA COMPRESS test'
-## Documentation
-
-Full API documentation is available at [http://squeljs.org/](http://squeljs.org/).
+## Building it
-Annotated source code can be found in the `docs/` folder. This is built using
-[docco](http://jashkenas.github.com/docco/). To build it yourself you will first need to have the latest dev version
-of [pygment](http://pygments.org/download/) installed in your local Python environment. Then do the following inside
-the project folder:
+We use Grunt to do the build and [docco](http://jashkenas.github.com/docco/) to build annotated source code docs.
+ $ npm install -g grunt-cli
+ $ npm install -g docco
$ npm install
- $ make docs
+ $ grunt <-- this will build the code and run the tests
-## Testing
+Annotated source code can be found in the `docs/` folder.
-Tests are written in [Mocha](http://visionmedia.github.com/mocha/) and can be found in the `test/` folder. To run them do the following:
+Tests are written in [Mocha](http://visionmedia.github.com/mocha/) and can be found in the `test/` folder. To run them:
- $ npm install
- $ make test
+ $ grunt test
+
+## Documentation
+Full documentation (guide and API) is available at [http://squeljs.org/](http://squeljs.org/).
## Contributing
View
@@ -1,6 +1,6 @@
{
"name": "squel",
- "version": "1.1.3",
+ "version": "1.2",
"main": "squel.js",
"ignore": [
"**/.*",
Oops, something went wrong.

0 comments on commit 90e421b

Please sign in to comment.