Repository: nuxt/create-nuxt-app
Pull request #405 (2020-01-05 03:16:12)

feat: add semantic pull request support
- [x] Enables support for [Semantic Pull Requests](https://github.com/apps/semantic-pull-requests) out-of-the-box for a fresh Nuxt application.


Patch:
diff --git a/README.md b/README.md
index 56a3edd..c09cb5f 100644
--- a/README.md
+++ b/README.md
@@ -80,6 +80,7 @@ yarn create nuxt-app <my-project>
     - [SPA](https://nuxtjs.org/guide/#single-page-applications-spa-)
 1. Choose development tools
     - [jsconfig.json](https://code.visualstudio.com/docs/languages/jsconfig)
+    - [Semantic PR](https://probot.github.io/apps/semantic-pull-requests/)
 
 ## CLI Options
 
diff --git a/prompts.js b/prompts.js
index 16516b3..2c6a755 100644
--- a/prompts.js
+++ b/prompts.js
@@ -116,7 +116,8 @@ module.exports = [
     message: 'Choose development tools',
     type: 'checkbox',
     choices: [
-      { name: 'jsconfig.json (Recommended for VS Code)', value: 'jsconfig.json' }
+      { name: 'jsconfig.json (Recommended for VS Code)', value: 'jsconfig.json' },
+      { name: 'Semantic Pull Requests', value: 'semantic-pull-requests' }
     ],
     default: []
   }
diff --git a/saofile.js b/saofile.js
index 87399f1..cf30499 100644
--- a/saofile.js
+++ b/saofile.js
@@ -101,6 +101,7 @@ module.exports = {
         '_.eslintrc.js': 'linter.includes("eslint")',
         '.prettierrc': 'linter.includes("prettier")',
         'jsconfig.json': 'devTools.includes("jsconfig.json")',
+        'semantic.yml': 'devTools.includes("semantic-pull-requests")',
         '.env': 'features.includes("dotenv")',
         '_stylelint.config.js': 'linter.includes("stylelint")'
       }
@@ -112,7 +113,8 @@ module.exports = {
         gitignore: '.gitignore',
         '_package.json': 'package.json',
         '_.eslintrc.js': '.eslintrc.js',
-        '_stylelint.config.js': 'stylelint.config.js'
+        '_stylelint.config.js': 'stylelint.config.js',
+        'semantic.yml': '.github/semantic.yml'
       }
     })
 
diff --git a/template/semantic.yml b/template/semantic.yml
new file mode 100644
index 0000000..40b6927
--- /dev/null
+++ b/template/semantic.yml
@@ -0,0 +1,5 @@
+# Always validate the PR title AND all the commits
+titleAndCommits: true
+# Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns")
+# this is only relevant when using commitsOnly: true (or titleAndCommits: true)
+allowMergeCommits: true


Test patch:
diff --git a/test/snapshots/index.test.js.md b/test/snapshots/index.test.js.md
index 079f93f..6809c46 100644
--- a/test/snapshots/index.test.js.md
+++ b/test/snapshots/index.test.js.md
@@ -100,6 +100,103 @@ Generated by [AVA](https://avajs.dev).
     }␊
     `
 
+## verify devTools: Semantic Pull Requests
+
+> Generated files
+
+    [
+      '.editorconfig',
+      '.github/semantic.yml',
+      '.gitignore',
+      'README.md',
+      'assets/README.md',
+      'components/Logo.vue',
+      'components/README.md',
+      'layouts/README.md',
+      'layouts/default.vue',
+      'middleware/README.md',
+      'nuxt.config.js',
+      'package.json',
+      'pages/README.md',
+      'pages/index.vue',
+      'plugins/README.md',
+      'static/README.md',
+      'static/favicon.ico',
+      'store/README.md',
+    ]
+
+> package.json
+
+    {
+      dependencies: {
+        nuxt: '^2.0.0',
+      },
+      devDependencies: {},
+      private: true,
+      scripts: {
+        build: 'nuxt build',
+        dev: 'nuxt',
+        generate: 'nuxt generate',
+        start: 'nuxt start',
+      },
+    }
+
+> Generated nuxt.config.js
+
+    `␊
+    export default {␊
+      mode: 'universal',␊
+      /*␊
+      ** Headers of the page␊
+      */␊
+      head: {␊
+        title: process.env.npm_package_name || '',␊
+        meta: [␊
+          { charset: 'utf-8' },␊
+          { name: 'viewport', content: 'width=device-width, initial-scale=1' },␊
+          { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }␊
+        ],␊
+        link: [␊
+          { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊
+        ]␊
+      },␊
+      /*␊
+      ** Customize the progress-bar color␊
+      */␊
+      loading: { color: '#fff' },␊
+      /*␊
+      ** Global CSS␊
+      */␊
+      css: [␊
+      ],␊
+      /*␊
+      ** Plugins to load before mounting the App␊
+      */␊
+      plugins: [␊
+      ],␊
+      /*␊
+      ** Nuxt.js dev-modules␊
+      */␊
+      buildModules: [␊
+      ],␊
+      /*␊
+      ** Nuxt.js modules␊
+      */␊
+      modules: [␊
+      ],␊
+      /*␊
+      ** Build configuration␊
+      */␊
+      build: {␊
+        /*␊
+        ** You can extend webpack config here␊
+        */␊
+        extend (config, ctx) {␊
+        }␊
+      }␊
+    }␊
+    `
+
 ## verify devTools: jsconfig.json (Recommended for VS Code)
 
 > Generated files