From 5ed0226e9b441983b28691c378d42364ef56a7de Mon Sep 17 00:00:00 2001 From: David Ascher Date: Fri, 24 Jan 2014 15:09:30 -0800 Subject: [PATCH] make default path shorter --- Gruntfile.js | 8 +++++++- README.md | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 272c3b1..74ff99b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -136,7 +136,13 @@ module.exports = function(grunt) { grunt.task.run('connect:server'); }); - grunt.registerTask('default', 'help message', function() { + grunt.registerTask('check_customize', 'see if a component exists, and if not, run customize', function() { + if (! grunt.file.exists('component.html')) { + grunt.task.run('customize'); + } + }); + grunt.registerTask('default', ['check_customize', 'serve']); + grunt.registerTask('help', 'help message', function() { grunt.log.writeln(''); grunt.log.writeln('_\'grunt customize\'_ to create your initial component'); grunt.log.writeln('_\'grunt lint\'_ to check your component'); diff --git a/README.md b/README.md index e69de29..39b9f56 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,10 @@ + +1. Fork this repo +2. Rename it (e.g. my-component) +3. Git clone it to your computer +4. CD into it and: + +* `npm install` +* `grunt` + +5. Go to appmaker, sign in, and add a component, specifying the URL that step 4 gives you.