Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
feat(ci): remove dependabot support in generated projects
Browse files Browse the repository at this point in the history
BREAKIING CHANGE: Dependabot now is natively
available with GitHub and easy to setup using GitHub's UI.
Since the standalone Dependabot will be turned off in 8/20
there's no reason to still have it in this project.
  • Loading branch information
amclin committed Jul 12, 2021
1 parent 40e833b commit 5239f18
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 43 deletions.
30 changes: 10 additions & 20 deletions create-app.js
Expand Up @@ -27,7 +27,7 @@ const createApp = async ({
gitRemote,
isStatic,
noGit = false,
useNpm
useNpm,
}) => {
const root = path.resolve(appPath)
const appName = path.basename(root)
Expand Down Expand Up @@ -90,7 +90,7 @@ const createApp = async ({
await install({
root,
useYarn,
isOnline
isOnline,
})
log()
} else {
Expand All @@ -103,12 +103,12 @@ const createApp = async ({
private: true,
repository: {
type: 'git',
url: gitRemote
url: gitRemote,
},
homepage,
bugs: {
url: `${homepage}/issues`
}
url: `${homepage}/issues`,
},
},
isStatic ? staticTemplateSettings.package : ssrTemplateSettings.package
)
Expand All @@ -119,7 +119,7 @@ const createApp = async ({
)

log(`Installing runtime dependencies using ${displayedCommand}:`)
templateSettings.dependencies.forEach(dep => {
templateSettings.dependencies.forEach((dep) => {
log(` * ${chalk.cyan(dep)}`)
})
log()
Expand All @@ -128,12 +128,12 @@ const createApp = async ({
root,
dependencies: templateSettings.dependencies,
useYarn,
isOnline
isOnline,
})
log()

log(`Installing dev dependencies using ${displayedCommand}:`)
templateSettings.devDependencies.forEach(dep => {
templateSettings.devDependencies.forEach((dep) => {
log(` * ${chalk.cyan(dep)}`)
})
log()
Expand All @@ -143,7 +143,7 @@ const createApp = async ({
dependencies: templateSettings.devDependencies,
useYarn,
isOnline,
devDependencies: true
devDependencies: true,
})
log()

Expand Down Expand Up @@ -201,18 +201,8 @@ and then run the onetime command:
${chalk.cyan('git push --follow-tags push')}`)
log(`-----------------------------------------------`)
}
log()
log(`-Dependabot------------------------------------
Your project is prepared with Dependabot support
for automated management of updating dependencies
with bugfixes and security updates. To enable it,
you need to visit:
${chalk.cyan(`https://dependabot.com `)}
and grant Dependabot access to your GitHub
repository.`)
log(`-----------------------------------------------`)
}

module.exports = {
createApp
createApp,
}
2 changes: 1 addition & 1 deletion helpers/copy-template-files.js
Expand Up @@ -2,7 +2,7 @@ const cpy = require('cpy')
const path = require('path')

const copyTemplateFiles = (root, dir) =>
cpy(['**', '.dependabot/**', '.husky/**'], root, {
cpy(['**', '.husky/**'], root, {
parents: true,
cwd: path.join(__dirname, '..', 'templates', dir),
rename: (name) => {
Expand Down
21 changes: 0 additions & 21 deletions templates/default/.dependabot/config.yml

This file was deleted.

5 changes: 4 additions & 1 deletion templates/default/README.md
@@ -1,7 +1,6 @@
<!-- //TODO: Wire this up to the project-specific build status path for Gitlab? -->
<!-- [![npm version](https://badge.fury.io/js/%40amclin%2Fcreate-react-app.svg)](https://www.npmjs.com/@amclin/create-react-app) -->
<!-- [![Build Status](https://travis-ci.org/amclin/react-project-boilerplate.svg?branch=master)](https://travis-ci.org/amclin/react-project-boilerplate) -->
<!-- [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=amclin/react-project-boilerplate)](https://dependabot.com) -->

![Branch Code Coverage](./coverage/badge-branches.svg) ![Functions Code Coverage](./coverage/badge-functions.svg) ![Lines Code Coverage](./coverage/badge-lines.svg) ![Statements Code Coverage](./coverage/badge-statements.svg)

Expand All @@ -26,16 +25,19 @@ After checking out this repo, run `npm install` to install dependencies
Run `npm run dev` to launch a NextJS development webserver at `http://localhost:3000`

### Running in Production Mode

For convenience and consistency, the preferred method of running in produciton mode is to use Docker. This will best match how an application is running on a shared environment.

#### Build a Docker image

Create a Docker image from your current source code by running:

`npm run docker`

**Warning** You must have Docker Desktop or similar Docker daemon installed and running or the script will fail.

#### Run a Docker Container

Once the Docker image exists in your registry of choice (local or remote), you can then run the app and specify what port it should run on:

```
Expand All @@ -45,6 +47,7 @@ docker run -p 0.0.0.0:3000:3000 %%APPNAME%%:latest
If you'd like to run on a different port, replace the first `3000` with the desired port.

#### Alternative "local" production mode

Alternatively the application can be run locally without using Docker. See [NextJS documentation for more details](https://nextjs.org/docs#production-deployment).

## Contributing
Expand Down

0 comments on commit 5239f18

Please sign in to comment.