Permalink
Browse files

add Gruntfile

  • Loading branch information...
1 parent ea9cf7d commit ad664420828b57002e1eba6d9e272ff91a8d6fa0 @crdx committed Mar 26, 2013
Showing with 87 additions and 0 deletions.
  1. +66 −0 Gruntfile.js
  2. +21 −0 package.json
View
@@ -0,0 +1,66 @@
+module.exports = function(grunt) {
+ grunt.loadNpmTasks("grunt-contrib-less");
+ grunt.loadNpmTasks("grunt-contrib-watch");
+ grunt.loadNpmTasks("grunt-contrib-jshint");
+ grunt.loadNpmTasks("grunt-shell");
+
+ grunt.initConfig({
+ pkg: grunt.file.readJSON("package.json"),
+
+ less: {
+ dist: {
+ files: {
+ "css/style.css": "css/style.less" /* out: in */
+ },
+ },
+ },
+
+ watch: {
+ files: ["**/*", "!node_modules/**/*"],
+ tasks: ["jshint", "less:dist", "jekyll"]
+ },
+
+ jshint: {
+ Gruntfile: {
+ options: {
+ es5: true,
+ },
+ files: {
+ src: ["Gruntfile.js"],
+ },
+ },
+
+ js: {
+ options: {
+ laxbreak: true
+ },
+ files: {
+ src: ["js/{my,github-commits,cookie-generator,analytics}.js"]
+ },
+ },
+ },
+ });
+
+ grunt.registerTask("jekyll", "generates jekyll", function() {
+ var done = this.async();
+
+ grunt.util.spawn({ cmd: "jekyll" }, function(error, result, code) {
+ if (error)
+ {
+ grunt.log.error(error);
+ done(false);
+ }
+ else
+ {
+ grunt.log.writeln(result);
+ done(true);
+ }
+ });
+ });
+
+ grunt.registerTask("deploy", function() {
+
+ });
+
+ grunt.registerTask("default", ["watch"]);
+};
View
@@ -0,0 +1,21 @@
+{
+ "name": "crdx.org",
+ "version": "1.0.0",
+ "description": "source of crdx.org",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/crdx/crdx.org.git"
+ },
+ "author": "crdx",
+ "license": "MIT",
+ "readmeFilename": "README.md",
+ "devDependencies": {
+ "grunt": "~0.4.1",
+ "grunt-contrib-less": "~0.5.0",
+ "grunt-contrib-watch": "~0.3.1",
+ "grunt-contrib-jshint": "~0.3.0",
+ "execSync": "0.0.3",
+ "two-step": "0.0.3",
+ "first": "0.0.3"
+ }
+}

0 comments on commit ad66442

Please sign in to comment.