From 8a420e8af5d9373811b4bf8fc8cd058cd36b7f41 Mon Sep 17 00:00:00 2001 From: Maples7 Date: Mon, 20 Mar 2017 14:00:51 +0800 Subject: [PATCH] add CNAME --- bin/barn | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/barn b/bin/barn index 00e0335..ab4243d 100644 --- a/bin/barn +++ b/bin/barn @@ -200,6 +200,11 @@ function barnGenerate() { // copy images shell.cp('-Rf', `themes/${spec.theme}/image/*`, 'dist/image'); + // generate CNAME + if (spec.cname) { + fs.writeFileSync('dist/CNAME', spec.cname); + } + shell.echo('Success to generate static files in folder dist!'); } diff --git a/package.json b/package.json index 25be1e4..e058cd7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "barn-cli", - "version": "0.1.1", + "version": "0.2.0", "description": "CLI tools for Barn.", "main": "lib/barn", "bin": {