Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit ba93891

Browse files
authored
feat(template): remove dotenv module (#544)
1 parent 4121c01 commit ba93891

File tree

9 files changed

+3
-119
lines changed

9 files changed

+3
-119
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ yarn create nuxt-app <my-project>
5858
1. Choose Nuxt.js modules:
5959
- [Axios](https://github.com/nuxt-community/axios-module)
6060
- [Progressive Web App (PWA) Support](https://github.com/nuxt-community/pwa-module)
61-
- [DotEnv](https://github.com/nuxt-community/dotenv-module)
6261
1. Choose linting tools:
6362
- [ESLint](https://github.com/nuxt/eslint-config)
6463
- [Prettier](https://github.com/prettier/prettier)

packages/cna-template/template/.env

-1
This file was deleted.

packages/cna-template/template/nuxt/nuxt.config.js

-4
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ export default {
110110
<%_ if (pwa) { _%>
111111
'@nuxtjs/pwa',
112112
<%_ } _%>
113-
<%_ if (dotenv) { _%>
114-
// Doc: https://github.com/nuxt-community/dotenv-module
115-
'@nuxtjs/dotenv',
116-
<%_ } _%>
117113
],
118114
<%_ if (axios) { _%>
119115
/*

packages/cna-template/template/nuxt/package.js

-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ module.exports = {
6464
if (!features.includes('pwa')) {
6565
delete pkg.dependencies['@nuxtjs/pwa']
6666
}
67-
if (!features.includes('dotenv')) {
68-
delete pkg.dependencies['@nuxtjs/dotenv']
69-
}
7067

7168
// TS
7269
const typescript = language.includes('ts')

packages/cna-template/template/nuxt/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"@nuxt/typescript-runtime": "^0.4.9",
2121
"@nuxtjs/axios": "^5.11.0",
2222
"@nuxtjs/pwa": "^3.0.0-beta.20",
23-
"@nuxtjs/dotenv": "^1.4.1",
2423
"nuxt": "^2.12.2"
2524
},
2625
"devDependencies": {

packages/create-nuxt-app/lib/prompts.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ module.exports = [
6262
pageSize: 10,
6363
choices: [
6464
{ name: 'Axios', value: 'axios' },
65-
{ name: 'Progressive Web App (PWA) Support', value: 'pwa' },
66-
{ name: 'DotEnv', value: 'dotenv' }
65+
{ name: 'Progressive Web App (PWA) Support', value: 'pwa' }
6766
],
6867
default: []
6968
},

packages/create-nuxt-app/lib/saofile.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ module.exports = {
1818
const lintStaged = eslint && this.answers.linter.includes('lintStaged')
1919
const stylelint = this.answers.linter.includes('stylelint')
2020
const axios = this.answers.features.includes('axios')
21-
const dotenv = this.answers.features.includes('dotenv')
2221
const pm = this.answers.pm === 'yarn' ? 'yarn' : 'npm'
2322
const pmRun = this.answers.pm === 'yarn' ? 'yarn' : 'npm run'
2423

@@ -36,8 +35,7 @@ module.exports = {
3635
axios,
3736
edge,
3837
pm,
39-
pmRun,
40-
dotenv
38+
pmRun
4139
}
4240
},
4341
actions () {
@@ -84,7 +82,6 @@ module.exports = {
8482
'_jsconfig.json': 'devTools.includes("jsconfig.json")',
8583
'tsconfig.json': 'language.includes("ts")',
8684
'semantic.yml': 'devTools.includes("semantic-pull-requests")',
87-
'.env': 'features.includes("dotenv")',
8885
'_stylelint.config.js': 'linter.includes("stylelint")'
8986
},
9087
templateDir

packages/create-nuxt-app/test/snapshots/index.test.js.md

+1-103
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,12 @@ Generated by [AVA](https://avajs.dev).
486486
}␊
487487
`
488488

489-
## verify features: Axios, Progressive Web App (PWA) Support, DotEnv
489+
## verify features: Axios, Progressive Web App (PWA) Support
490490

491491
> Generated files
492492
493493
[
494494
'.editorconfig',
495-
'.env',
496495
'.gitignore',
497496
'README.md',
498497
'assets/README.md',
@@ -517,7 +516,6 @@ Generated by [AVA](https://avajs.dev).
517516
{
518517
dependencies: {
519518
'@nuxtjs/axios': '^5.11.0',
520-
'@nuxtjs/dotenv': '^1.4.1',
521519
'@nuxtjs/pwa': '^3.0.0-beta.20',
522520
nuxt: '^2.12.2',
523521
},
@@ -578,8 +576,6 @@ Generated by [AVA](https://avajs.dev).
578576
// Doc: https://axios.nuxtjs.org/usage␊
579577
'@nuxtjs/axios',␊
580578
'@nuxtjs/pwa',␊
581-
// Doc: https://github.com/nuxt-community/dotenv-module␊
582-
'@nuxtjs/dotenv',␊
583579
],␊
584580
/*␊
585581
** Axios module configuration␊
@@ -595,104 +591,6 @@ Generated by [AVA](https://avajs.dev).
595591
}␊
596592
`
597593

598-
## verify features: DotEnv
599-
600-
> Generated files
601-
602-
[
603-
'.editorconfig',
604-
'.env',
605-
'.gitignore',
606-
'README.md',
607-
'assets/README.md',
608-
'components/Logo.vue',
609-
'components/README.md',
610-
'layouts/README.md',
611-
'layouts/default.vue',
612-
'middleware/README.md',
613-
'nuxt.config.js',
614-
'package.json',
615-
'pages/README.md',
616-
'pages/index.vue',
617-
'plugins/README.md',
618-
'static/README.md',
619-
'static/favicon.ico',
620-
'store/README.md',
621-
]
622-
623-
> package.json
624-
625-
{
626-
dependencies: {
627-
'@nuxtjs/dotenv': '^1.4.1',
628-
nuxt: '^2.12.2',
629-
},
630-
devDependencies: {},
631-
private: true,
632-
scripts: {
633-
build: 'nuxt build',
634-
dev: 'nuxt',
635-
generate: 'nuxt generate',
636-
start: 'nuxt start',
637-
},
638-
}
639-
640-
> Generated nuxt.config.js
641-
642-
`␊
643-
export default {␊
644-
/*␊
645-
** Nuxt rendering mode␊
646-
** See https://nuxtjs.org/api/configuration-mode␊
647-
*/␊
648-
mode: 'universal',␊
649-
/*␊
650-
** Headers of the page␊
651-
** See https://nuxtjs.org/api/configuration-head␊
652-
*/␊
653-
head: {␊
654-
title: process.env.npm_package_name || '',␊
655-
meta: [␊
656-
{ charset: 'utf-8' },␊
657-
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },␊
658-
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊
659-
],␊
660-
link: [␊
661-
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊
662-
]␊
663-
},␊
664-
/*␊
665-
** Global CSS␊
666-
*/␊
667-
css: [␊
668-
],␊
669-
/*␊
670-
** Plugins to load before mounting the App␊
671-
** https://nuxtjs.org/guide/plugins␊
672-
*/␊
673-
plugins: [␊
674-
],␊
675-
/*␊
676-
** Nuxt.js dev-modules␊
677-
*/␊
678-
buildModules: [␊
679-
],␊
680-
/*␊
681-
** Nuxt.js modules␊
682-
*/␊
683-
modules: [␊
684-
// Doc: https://github.com/nuxt-community/dotenv-module␊
685-
'@nuxtjs/dotenv',␊
686-
],␊
687-
/*␊
688-
** Build configuration␊
689-
** See https://nuxtjs.org/api/configuration-build/␊
690-
*/␊
691-
build: {␊
692-
}␊
693-
}␊
694-
`
695-
696594
## verify features: Progressive Web App (PWA) Support
697595

698596
> Generated files
Binary file not shown.

0 commit comments

Comments
 (0)