Skip to content

Commit

Permalink
feat(template): remove dotenv module (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo authored and atinux committed Jun 19, 2020
1 parent 3e00d6a commit 908efc4
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 16 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ yarn create nuxt-app <my-project>
1. Choose Nuxt.js modules:
- [Axios](https://github.com/nuxt-community/axios-module)
- [Progressive Web App (PWA) Support](https://github.com/nuxt-community/pwa-module)
- [DotEnv](https://github.com/nuxt-community/dotenv-module)
1. Choose linting tools:
- [ESLint](https://github.com/nuxt/eslint-config)
- [Prettier](https://github.com/prettier/prettier)
Expand Down
1 change: 0 additions & 1 deletion packages/cna-template/template/.env

This file was deleted.

4 changes: 0 additions & 4 deletions packages/cna-template/template/nuxt/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ export default {
<%_ if (pwa) { _%>
'@nuxtjs/pwa',
<%_ } _%>
<%_ if (dotenv) { _%>
// Doc: https://github.com/nuxt-community/dotenv-module
'@nuxtjs/dotenv',
<%_ } _%>
],
<%_ if (axios) { _%>
/*
Expand Down
3 changes: 0 additions & 3 deletions packages/cna-template/template/nuxt/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ module.exports = {
if (!features.includes('pwa')) {
delete pkg.dependencies['@nuxtjs/pwa']
}
if (!features.includes('dotenv')) {
delete pkg.dependencies['@nuxtjs/dotenv']
}

// TS
const typescript = language.includes('ts')
Expand Down
1 change: 0 additions & 1 deletion packages/cna-template/template/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"@nuxt/typescript-runtime": "^0.4.9",
"@nuxtjs/axios": "^5.11.0",
"@nuxtjs/pwa": "^3.0.0-beta.20",
"@nuxtjs/dotenv": "^1.4.1",
"nuxt": "^2.12.2"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/create-nuxt-app/lib/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ module.exports = [
pageSize: 10,
choices: [
{ name: 'Axios', value: 'axios' },
{ name: 'Progressive Web App (PWA) Support', value: 'pwa' },
{ name: 'DotEnv', value: 'dotenv' }
{ name: 'Progressive Web App (PWA) Support', value: 'pwa' }
],
default: []
},
Expand Down
5 changes: 1 addition & 4 deletions packages/create-nuxt-app/lib/saofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module.exports = {
const lintStaged = eslint && this.answers.linter.includes('lintStaged')
const stylelint = this.answers.linter.includes('stylelint')
const axios = this.answers.features.includes('axios')
const dotenv = this.answers.features.includes('dotenv')
const pm = this.answers.pm === 'yarn' ? 'yarn' : 'npm'
const pmRun = this.answers.pm === 'yarn' ? 'yarn' : 'npm run'

Expand All @@ -36,8 +35,7 @@ module.exports = {
axios,
edge,
pm,
pmRun,
dotenv
pmRun
}
},
actions () {
Expand Down Expand Up @@ -84,7 +82,6 @@ module.exports = {
'_jsconfig.json': 'devTools.includes("jsconfig.json")',
'tsconfig.json': 'language.includes("ts")',
'semantic.yml': 'devTools.includes("semantic-pull-requests")',
'.env': 'features.includes("dotenv")',
'_stylelint.config.js': 'linter.includes("stylelint")'
},
templateDir
Expand Down

0 comments on commit 908efc4

Please sign in to comment.