Skip to content

Commit

Permalink
Merge pull request #446 from kethinov/0.21.1
Browse files Browse the repository at this point in the history
0.21.1
  • Loading branch information
kethinov authored Jan 6, 2023
2 parents 021b5d9 + 251c3de commit 885801b
Show file tree
Hide file tree
Showing 8 changed files with 369 additions and 372 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

- Put your changes here...

## 0.21.1

- Added a README.md to the list of files generated for sample apps.
- Improved clarity of command line output.
- Improved docs.
- Various dependencies bumped.

## 0.21.0

- Fixed certs generator npm script.
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ If you are a maintainer of generator-roosevelt, please follow the following rele
- Open and merge a pull request with those changes.
- Tag the merge commit as the a new release version number.
- Publish commit to npm.

### Important note: Do a new release of mkroosevelt with every release of generator-roosevelt

Even though `generator-roosevelt` is listed as `*` in mkroosevelt's package.json, the package-lock.json still needs to be regenerated every time `generator-roosevelt` is pushed to npm. As such, whenever doing a publish of `generator-roosevelt`, you should also bump the version number of `mkroosevelt` to match, regenerate the package-lock.json, and publish `mkroosevelt` to npm as well.
16 changes: 13 additions & 3 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,14 @@ module.exports = class extends Generator {
this.destinationPath('.gitignore')
)

this.fs.copyTpl(
this.templatePath('README.md.ejs'),
this.destinationPath('README.md'),
{
appName: this.appName
}
)

// models
if (this.usesTeddy) {
this.fs.copyTpl(
Expand Down Expand Up @@ -791,10 +799,12 @@ module.exports = class extends Generator {
if (!this.options['skip-closing-message']) {
this.log(`\nYour app ${this.appName} has been generated.\n`)
this.log('To run the app:')
this.log('- To run in dev mode: npm run dev')
this.log('- To run in prod mode: npm run prod')
this.log('- Change to your app directory: cd ' + this.dirname)
this.log('- Install dependencies: npm i')
this.log('- To run in development mode: npm run d')
this.log('- To run in production mode: npm run p')
const url = 'https://localhost:' + this.httpsPort
this.log('Once running, visit ' + terminalLink(url, url) + '\n')
this.log('- Once running, visit: ' + terminalLink(url, url) + '\n')
this.log('To make further changes to the config, edit package.json. See https://github.com/rooseveltframework/roosevelt#configure-your-app-with-parameters for information on the configuration options.')
}
}
Expand Down
29 changes: 29 additions & 0 deletions generators/app/templates/README.md.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# <%= appName %>

## Setup

- Clone this repo.

- Install dependencies:
- Use `npm ci` if a package-lock.json file already exists and you're not altering the dependency list or changing the versions of your dependencies.
- Use `npm install` or `npm i` if a package-lock.json file doesn't exist, you've altered the dependency list, or changed the version of one of your dependencies.

- Manage HTTPS certs:
- Use `npm run generate-certs` if you want to make self-signed certs.
- If you have your own certs, put a `cert.pem` and `key.pem` file in a `certs` directory at the root of your app.

- Run the app:
- Use `npm run production` to run in production mode.
- Default shorthands:
- `npm run prod`
- `npm run p`
- `npm start`
- Use `npm run development` to run in development mode.
- Default shorthands:
- `npm run dev`
- `npm run d`
- Use `npm run production-proxy` to run the app in production mode, but with `localhostOnly` set to true and `hostPublic` set to false. This mode will make it so your app only listens to requests coming from localhost and does not serve anything in the public folder. This mode is useful when you want to host your app behind a reverse proxy from a web server like Apache or nginx and [is considered a best practice for Node.js deployments](https://expressjs.com/en/advanced/best-practice-performance.html#use-a-reverse-proxy).
- Default shorthands:
- `npm run prodproxy`
- `npm run x`
- See [docs](https://github.com/rooseveltframework/roosevelt#available-npm-scripts) for more information about configuring and running the app.
2 changes: 1 addition & 1 deletion generators/app/templates/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"url": "https://somewhere.url/user/repo.git"
},
"scripts": {
"config-audit": "node ./node_modules/roosevelt/lib/scripts/configAuditor.js",
"audit-config": "node ./node_modules/roosevelt/lib/scripts/configAuditor.js",
"generate-certs": "node ./node_modules/roosevelt/lib/scripts/certsGenerator.js",
"d": "nodemon app.js --development-mode",
"dev": "nodemon app.js --development-mode",
Expand Down
Loading

0 comments on commit 885801b

Please sign in to comment.