From b141f7201aae552c933084bb35fe88d9f666dbcf Mon Sep 17 00:00:00 2001 From: Hariadi Hinta Date: Sun, 12 Jan 2014 21:24:21 +0800 Subject: [PATCH 1/7] Various tweaks: * use grunt 0.4.2 * always use latest mocha for dev * update boilerplate devDeps --- app/templates/_package.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/templates/_package.json b/app/templates/_package.json index 0ad5e4b..18f5477 100644 --- a/app/templates/_package.json +++ b/app/templates/_package.json @@ -21,13 +21,13 @@ "test": "grunt assemble" }, "devDependencies": { - "assemble": "~0.4.22", - "grunt": "~0.4.1", + "assemble": "~0.4.33", + "grunt": "~0.4.2", "grunt-contrib-clean": "~0.5.0", - "grunt-contrib-connect": "~0.5.0", + "grunt-contrib-connect": "~0.6.0", "grunt-contrib-watch": "~0.5.3", - "load-grunt-tasks": "~0.1.3", - "time-grunt": "~0.1.1"<% if(plugin && plugin.length > 0){ %>, + "load-grunt-tasks": "~0.2.1", + "time-grunt": "~0.2.7"<% if(plugin && plugin.length > 0){ %>, <% if(typeof plugin === 'object'){ _.each(plugin, function(name, i) { %> "<%= name %>": "*"<% if(i < (plugin.length - 1)) { %>,<% } %> <% }); } else { %> diff --git a/package.json b/package.json index b245c75..d4d6435 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "yeoman-generator": "~0.15.0" }, "devDependencies": { - "mocha": "~1.16.2" + "mocha": "*" }, "peerDependencies": { "yo": ">=1.0.4" From 932f4acb1d5b6f4d57dcd648fcd9deaad55d255f Mon Sep 17 00:00:00 2001 From: Hariadi Hinta Date: Sun, 12 Jan 2014 21:25:43 +0800 Subject: [PATCH 2/7] Fix js assets --- app/templates/src/templates/layouts/default.hbs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/templates/src/templates/layouts/default.hbs b/app/templates/src/templates/layouts/default.hbs index 5a29b64..c892e57 100644 --- a/app/templates/src/templates/layouts/default.hbs +++ b/app/templates/src/templates/layouts/default.hbs @@ -8,7 +8,7 @@ - {{> navbar-fixed-top }} @@ -31,6 +31,6 @@ {{> body }} - + - \ No newline at end of file + From a4e18201b0345d355301af34d0bbd2cecf43ae27 Mon Sep 17 00:00:00 2001 From: Hariadi Hinta Date: Sun, 12 Jan 2014 21:49:49 +0800 Subject: [PATCH 3/7] Fix depcreated assert when update yeoman generator 0.16.0 --- package.json | 2 +- test/test-creation.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d4d6435..f03ee7c 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "test": "mocha --reporter spec" }, "dependencies": { - "yeoman-generator": "~0.15.0" + "yeoman-generator": "~0.16.0" }, "devDependencies": { "mocha": "*" diff --git a/test/test-creation.js b/test/test-creation.js index 41c15bf..1233a79 100644 --- a/test/test-creation.js +++ b/test/test-creation.js @@ -51,7 +51,7 @@ describe('Assemble generator', function () { }); this.app.run({}, function () { - helpers.assertFiles(expected); + helpers.assertFile(expected); done(); }); }); From 6ee1d04da2de0f27db24af7e8c940450da4a7791 Mon Sep 17 00:00:00 2001 From: Hariadi Hinta Date: Sun, 12 Jan 2014 22:20:36 +0800 Subject: [PATCH 4/7] Update template README info * add appName to header * link to Assemble docs, plugins and helpers * generate history change for 0.1.0 --- app/templates/README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/templates/README.md b/app/templates/README.md index 8f57631..8caa3af 100644 --- a/app/templates/README.md +++ b/app/templates/README.md @@ -1,9 +1,17 @@ -# assemble +# <%= _.slugify(projectName) %> -> Assemble a website from templates and data. +> My awesome static page generator. + +## [Assemble](http://assemble.io/) + +Assemble is a component and static site generator that makes it dead simple to build modular sites, documentation and components from reusable templates and data. + +* Documentation +* Plugins - Plugins extend the core functionality of Assemble. +* Helpers - Documentation for the helpers in the [handlebars-helpers](http://github.com/assemble/handlebars-helpers) library. ## Contributing -In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][http://gruntjs.com/]. +All contributions are welcome! The simplest way to show your support for this project is to **"star" it**. Please see [Contributing to Assemble](http://assemble.io/contributing) for more information. ## Release History -_(Nothing yet)_ + * <%= (new Date).toISOString().split('T')[0] %>   v0.1.0   Generated by the [Yeoman Generator](https://github.com/assemble/generator-assemble) for [Assemble](http://assemble.io) From 9fbf45ac5801cbf791bb0e5b63f52ef06857887d Mon Sep 17 00:00:00 2001 From: Hariadi Hinta Date: Mon, 13 Jan 2014 01:32:36 +0800 Subject: [PATCH 5/7] Prompt for project description --- app/index.js | 8 ++++++++ app/templates/README.md | 2 +- app/templates/_package.json | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/index.js b/app/index.js index 3c4d4c3..c2c9428 100644 --- a/app/index.js +++ b/app/index.js @@ -73,6 +73,13 @@ AssembleGenerator.prototype.askFor = function askFor() { default : this.appname }); + (!this.config.get("projectDesc") || force) && questions.push({ + type : "input", + name : "projectDesc", + message : "Your project description", + default : this.config.get("projectDesc") + }); + (!this.config.get("githubUser") || force) && questions.push({ type : "input", name : "githubUser", @@ -107,6 +114,7 @@ AssembleGenerator.prototype.askFor = function askFor() { this.prompt(questions, function (answers) { this.projectName = answers.projectName || this.config.get("projectName"); + this.projectDesc = answers.projectDesc || this.config.get("projectDesc"); this.authorLogin = answers.githubUser || this.config.get("githubUser"); this.plugin = answers.plugin; this.authorName = this.config.get("author").name; diff --git a/app/templates/README.md b/app/templates/README.md index 8caa3af..64fc725 100644 --- a/app/templates/README.md +++ b/app/templates/README.md @@ -1,6 +1,6 @@ # <%= _.slugify(projectName) %> -> My awesome static page generator. +> <%= _.capitalize(projectDesc) %>. ## [Assemble](http://assemble.io/) diff --git a/app/templates/_package.json b/app/templates/_package.json index 18f5477..a7ca1c2 100644 --- a/app/templates/_package.json +++ b/app/templates/_package.json @@ -1,8 +1,8 @@ { "name": "<%= _.slugify(projectName) %>", - "description": "Assemble a website from templates and data.", + "description": "<%= _.capitalize(projectDesc) %>.", "version": "0.1.0", - "homepage": "http://assemble.io", + "homepage": "https://github.com/<%= authorLogin %>/<%= _.slugify(projectName) %>", "author": { "name": "<%= authorName %>", "url": "http://github.com/<%= authorLogin %>/" From b376f991f5498a371a2a96df845b1699bed20f9f Mon Sep 17 00:00:00 2001 From: Hariadi Hinta Date: Mon, 13 Jan 2014 01:35:16 +0800 Subject: [PATCH 6/7] Option to force question and re-generating .yo-rc.json Command: yo assemble --init Alias: yo assemble -i Enable user to rewrite/replace boilerplate for existing project. File conflict manage by Yeoman. --- app/USAGE | 11 ++--------- app/index.js | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/app/USAGE b/app/USAGE index 0612a60..d6037a9 100644 --- a/app/USAGE +++ b/app/USAGE @@ -1,10 +1,3 @@ -Description: - Creates a default Assemble app - -Options: - --skip-install: Skips the automatic execution of `bower` and `npm` - after scaffolding has finished. - --s: alias --skip-install - Example: - yo assemble [--skip-install] [--silent] + yo assemble --init --skip-install --skip-welcome-message + yo assemble -i -s -w (alias) diff --git a/app/index.js b/app/index.js index c2c9428..6bd0a8e 100644 --- a/app/index.js +++ b/app/index.js @@ -12,6 +12,19 @@ var AssembleGenerator = module.exports = function AssembleGenerator(args, option yeoman.generators.Base.apply(this, arguments); + this.description = 'Creates a default Assemble boilerplate'; + + // Not required but need to show when user command `yo assemble -h` + this.option('init', { + alias: 'i', + desc: 'Force to prompt question and re-initialize of .yo-rc.json', + type: String, + defaults: false, + required: false + }); + + this.init = options['init'] || options['i'] || false; + this.on('end', function () { this.installDependencies({ skipInstall: options['skip-install'] || options['s'], @@ -56,7 +69,8 @@ AssembleGenerator.prototype.askFor = function askFor() { var done = this.async(); var force = false; - if (!this.config.existed) { + + if (!this.config.existed || this.init) { force = true; } From fb8703c3ceed48998e2affd48f7b7716b0cae0d8 Mon Sep 17 00:00:00 2001 From: Hariadi Hinta Date: Mon, 13 Jan 2014 02:15:56 +0800 Subject: [PATCH 7/7] v0.4.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f03ee7c..48780b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-assemble", - "version": "0.4.5", + "version": "0.4.6", "description": "The scaffolding for Assemble", "keywords": [ "yeoman-generator",