Permalink
Browse files

add success message and dependencies, tweak README

  • Loading branch information...
jamesknelson committed Jan 7, 2019
1 parent 75ad16d commit b1c6161d1f12ea8f694b2b7e5ff4c411b75d6f32
Showing with 395 additions and 4 deletions.
  1. +1 −1 README.md
  2. +41 −0 create-react-blog.js
  3. +8 −3 package.json
  4. +345 −0 yarn.lock
@@ -4,7 +4,7 @@ npx create-react-blog
Create a blog with **create-react-app**, **MDX**, and **Navi**.<br />
Themed after Gatsby's blog starter and Dan Abramov's overreacted.io.

![Screenshot of generated app](./media/scrennshot.png)
![Screenshot of generated app](https://raw.githubusercontent.com/frontarm/create-react-blog/master/media/screenshot.png)

Comes with:

@@ -1,3 +1,4 @@
#!/usr/bin/env node
/**
* Copyright (c) 2015-present, Facebook, Inc.
* This source code is licensed under the MIT license.
@@ -247,6 +248,46 @@ async function run(
path.join(root, 'package.json'),
JSON.stringify(appPackage, null, 2) + os.EOL
);

const displayedCommand = useYarn ? 'yarn' : 'npm';

console.log();
console.log(`Success! Created ${appName} at ${root}`);
console.log('Inside that directory, you can run several commands:');
console.log();
console.log(chalk.cyan(` ${displayedCommand} start`));
console.log(' Starts the development server.');
console.log();
console.log(
chalk.cyan(` ${displayedCommand} ${useYarn ? '' : 'run '}build`)
);
console.log(' Bundles the app into static files for production.');
console.log();
console.log(chalk.cyan(` ${displayedCommand} test`));
console.log(' Starts the test runner.');
console.log();
console.log(
chalk.cyan(` ${displayedCommand} ${useYarn ? '' : 'run '}deploy`) +
' and ' +
chalk.cyan(`${displayedCommand} ${useYarn ? '' : 'run '}deploy:prod`));
console.log(' Deploys your blog with Netlify.');
console.log();
console.log(
chalk.cyan(` ${displayedCommand} ${useYarn ? '' : 'run '}eject`)
);
console.log(
' Removes this tool and copies build dependencies, configuration files'
);
console.log(
' and scripts into the app directory. If you do this, you can’t go back!'
);
console.log();
console.log('We suggest that you begin by typing:');
console.log();
console.log(chalk.cyan(' cd'), appName);
console.log(` ${chalk.cyan(`${displayedCommand} start`)}`);
console.log();
console.log('Happy hacking!');
}
catch (reason) {
console.log();
@@ -1,7 +1,7 @@
{
"name": "create-react-blog",
"description": "Initialize a React blog with create-react-app, MDX, and Navi",
"version": "0.11.0",
"version": "0.11.2",
"license": "MIT",
"author": "James K Nelson <james@frontarm.com>",
"bin": {
@@ -20,7 +20,12 @@
"dependencies": {
"chalk": "1.1.3",
"commander": "2.18.0",
"cross-spawn": "^6.0.5",
"fs-extra": "^7.0.1"
"cross-spawn": "6.0.5",
"envinfo": "6.0.1",
"fs-extra": "7.0.1",
"hyperquest": "2.1.3",
"tar-pack": "3.4.1",
"tmp": "0.0.33",
"validate-npm-package-name": "3.0.0"
}
}
Oops, something went wrong.

0 comments on commit b1c6161

Please sign in to comment.