diff --git a/README.md b/README.md index d0a5a82c..e097820f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ const { listFrameworks, hasFramework, getFramework } = require('@netlify/framewo console.log(await listFrameworks({ projectDir: './path/to/gatsby/website' })) // [ // { -// name: 'gatsby', +// id: 'gatsby', // title: 'Gatsby', // category: 'static_site_generator', // dev: { @@ -44,7 +44,7 @@ console.log(await listFrameworks({ projectDir: './path/to/gatsby/website' })) console.log(await listFrameworks({ projectDir: './path/to/vue/website' })) // [ // { -// name: 'vue', +// id: 'vue', // title: 'Vue.js', // category: 'frontend_framework', // dev: { @@ -65,7 +65,7 @@ console.log(await hasFramework('vue', { projectDir: './path/to/vue/website' })) console.log(await getFramework('vue', { projectDir: './path/to/vue/website' })) // { -// name: 'vue', +// id: 'vue', // title: 'Vue.js', // category: 'frontend_framework', // dev: { @@ -90,7 +90,7 @@ gatsby $ framework-info --long ./path/to/vue/website [ { - "name": "vue", + "id": "vue", "title": 'Vue.js', "category": "frontend_framework", "dev": { @@ -136,11 +136,11 @@ single object or several objects. Each object has the following properties. -#### name +#### id _Type_: `string` -Name such as `"gatsby"`. +Id such as `"gatsby"`. ## title @@ -202,14 +202,14 @@ _Type_: `string[]` A list of recommend Netlify build plugins to install for the framework. -## hasFramework(frameworkName, options?) +## hasFramework(frameworkId, options?) `options`: `object?`\ _Return value_: `Promise` Same as [`listFramework()`](#listframeworksoptions) except only for a specific framework and returns a boolean. -## getFramework(frameworkName, options?) +## getFramework(frameworkId, options?) `options`: `object?`\ _Return value_: `Promise` @@ -223,7 +223,7 @@ detected. A single framework object is returned. $ framework-info [projectDirectory] ``` -This prints the names of each framework. +This prints the ids of each framework. If known is found, `unknown` is printed. @@ -237,7 +237,7 @@ Each framework is a JSON file in the `/src/frameworks/` directory. For example: ```json { - "name": "gatsby", + "id": "gatsby", "title": "Gatsby", "category": "static_site_generator", "detect": { @@ -260,11 +260,11 @@ Each framework is a JSON file in the `/src/frameworks/` directory. For example: All properties are required. -## name +## id _Type_: `string` -Name of the framework, lowercase. +Id of the framework. ## title diff --git a/site/react/App.jsx b/site/react/App.jsx index 9246d2e4..b4f4c7b4 100644 --- a/site/react/App.jsx +++ b/site/react/App.jsx @@ -52,5 +52,5 @@ export const App = () => { } }, []) - return frameworks.map((framework) => ) + return frameworks.map((framework) => ) } diff --git a/site/vanilla/index.html b/site/vanilla/index.html index 1f028c44..ce826431 100644 --- a/site/vanilla/index.html +++ b/site/vanilla/index.html @@ -46,7 +46,7 @@ const body = document.querySelector('body') frameworks.forEach((framework) => { const div = document.createElement('div') - div.setAttribute('id', framework.name) + div.setAttribute('id', framework.id) // eslint-disable-next-line fp/no-mutation div.textContent = JSON.stringify(framework) body.append(div) diff --git a/src/bin.js b/src/bin.js index 90019919..9acb50d2 100755 --- a/src/bin.js +++ b/src/bin.js @@ -49,13 +49,9 @@ const serializeFrameworks = function (frameworks, long) { return NO_FRAMEWORKS } - return frameworks.map((framework) => getName(framework)).join('\n') + return frameworks.map(({ id }) => id).join('\n') } const NO_FRAMEWORKS = 'unknown' -const getName = function ({ name }) { - return name -} - runCli() diff --git a/src/core.js b/src/core.js index 6627ae2d..3d882665 100644 --- a/src/core.js +++ b/src/core.js @@ -42,7 +42,7 @@ const getContext = (context) => { /** * @typedef {object} Framework - * @property {string} name - framework name such as `"gatsby"` + * @property {string} id - framework id such as `"gatsby"` * @property {string} title - framework title as `"Gatsby"` * @property {string} category - Category among `"static_site_generator"`, `"frontend_framework"` and `"build_tool"` * @property {Dev} dev - Information about the dev command @@ -75,13 +75,13 @@ const listFrameworks = async function (context) { /** * Return whether a project uses a specific framework * - * @param {string} frameworkName - Name such as `"gatsby"` + * @param {string} frameworkId - Id such as `"gatsby"` * @param {Context} [context] - Context * * @returns {boolean} result - Whether the project uses this framework */ -const hasFramework = async function (frameworkName, context) { - const framework = getFrameworkByName(frameworkName) +const hasFramework = async function (frameworkId, context) { + const framework = getFrameworkById(frameworkId) const { pathExists, packageJson, packageJsonPath } = getContext(context) const { npmDependencies } = await getProjectInfo({ pathExists, packageJson, packageJsonPath }) const result = await usesFramework(framework, { pathExists, npmDependencies }) @@ -91,13 +91,13 @@ const hasFramework = async function (frameworkName, context) { /** * Return some information about a framework used by a project. * - * @param {string} frameworkName - Name such as `"gatsby"` + * @param {string} frameworkId - Id such as `"gatsby"` * @param {Context} [context] - Context * * @returns {Framework} framework - Framework used by a project */ -const getFramework = async function (frameworkName, context) { - const framework = getFrameworkByName(frameworkName) +const getFramework = async function (frameworkId, context) { + const framework = getFrameworkById(frameworkId) const { pathExists, packageJson, packageJsonPath, nodeVersion } = getContext(context) const { scripts, runScriptCommand } = await getProjectInfo({ pathExists, @@ -108,17 +108,17 @@ const getFramework = async function (frameworkName, context) { return frameworkInfo } -const getFrameworkByName = function (frameworkName) { - const framework = FRAMEWORKS.find(({ name }) => name === frameworkName) +const getFrameworkById = function (frameworkId) { + const framework = FRAMEWORKS.find(({ id }) => id === frameworkId) if (framework === undefined) { - const frameworkNames = FRAMEWORKS.map((knownFramework) => getFrameworkName(knownFramework)).join(', ') - throw new Error(`Invalid framework "${frameworkName}". It should be one of: ${frameworkNames}`) + const frameworkIds = FRAMEWORKS.map((knownFramework) => getFrameworkId(knownFramework)).join(', ') + throw new Error(`Invalid framework "${frameworkId}". It should be one of: ${frameworkIds}`) } return framework } -const getFrameworkName = function ({ name }) { - return name +const getFrameworkId = function ({ id }) { + return id } const getProjectInfo = async function ({ pathExists, packageJson, packageJsonPath }) { @@ -131,7 +131,7 @@ const getProjectInfo = async function ({ pathExists, packageJson, packageJsonPat const getFrameworkInfo = function ( { - name, + id, title, category, dev: { command: frameworkDevCommand, port }, @@ -144,7 +144,7 @@ const getFrameworkInfo = function ( const devCommands = getDevCommands({ frameworkDevCommand, scripts, runScriptCommand }) const recommendedPlugins = getPlugins(plugins, { nodeVersion }) return { - name, + id, title, category, dev: { commands: devCommands, port }, diff --git a/src/frameworks/angular.json b/src/frameworks/angular.json index d723aabd..8018b1e9 100644 --- a/src/frameworks/angular.json +++ b/src/frameworks/angular.json @@ -1,5 +1,5 @@ { - "name": "angular", + "id": "angular", "title": "Angular", "category": "frontend_framework", "detect": { diff --git a/src/frameworks/assemble.json b/src/frameworks/assemble.json index 76fa9482..531fd5d8 100644 --- a/src/frameworks/assemble.json +++ b/src/frameworks/assemble.json @@ -1,5 +1,5 @@ { - "name": "assemble", + "id": "assemble", "title": "Assemble", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/brunch.json b/src/frameworks/brunch.json index 5f50e183..b8162cfe 100644 --- a/src/frameworks/brunch.json +++ b/src/frameworks/brunch.json @@ -1,5 +1,5 @@ { - "name": "brunch", + "id": "brunch", "title": "Brunch", "category": "build_tool", "detect": { diff --git a/src/frameworks/create-react-app.json b/src/frameworks/create-react-app.json index 5cb5d366..234007d6 100644 --- a/src/frameworks/create-react-app.json +++ b/src/frameworks/create-react-app.json @@ -1,5 +1,5 @@ { - "name": "create-react-app", + "id": "create-react-app", "title": "Create React App", "category": "frontend_framework", "detect": { diff --git a/src/frameworks/docpad.json b/src/frameworks/docpad.json index 41d0fff7..63262708 100644 --- a/src/frameworks/docpad.json +++ b/src/frameworks/docpad.json @@ -1,5 +1,5 @@ { - "name": "docpad", + "id": "docpad", "title": "DocPad", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/docusaurus-v2.json b/src/frameworks/docusaurus-v2.json index 53aa164d..69c8f81a 100644 --- a/src/frameworks/docusaurus-v2.json +++ b/src/frameworks/docusaurus-v2.json @@ -1,5 +1,5 @@ { - "name": "docusaurus-v2", + "id": "docusaurus-v2", "title": "Docusaurus 2", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/docusaurus.json b/src/frameworks/docusaurus.json index 1604cf95..7412d3ff 100644 --- a/src/frameworks/docusaurus.json +++ b/src/frameworks/docusaurus.json @@ -1,5 +1,5 @@ { - "name": "docusaurus", + "id": "docusaurus", "title": "Docusaurus", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/eleventy.json b/src/frameworks/eleventy.json index 207e6aaa..96c77750 100644 --- a/src/frameworks/eleventy.json +++ b/src/frameworks/eleventy.json @@ -1,5 +1,5 @@ { - "name": "eleventy", + "id": "eleventy", "title": "Eleventy", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/ember.json b/src/frameworks/ember.json index 3c8b4bb5..a3087820 100644 --- a/src/frameworks/ember.json +++ b/src/frameworks/ember.json @@ -1,5 +1,5 @@ { - "name": "ember", + "id": "ember", "title": "Ember.js", "category": "frontend_framework", "detect": { diff --git a/src/frameworks/expo.json b/src/frameworks/expo.json index 8f0a6782..966006ed 100644 --- a/src/frameworks/expo.json +++ b/src/frameworks/expo.json @@ -1,5 +1,5 @@ { - "name": "expo", + "id": "expo", "title": "Expo", "category": "frontend_framework", "detect": { diff --git a/src/frameworks/gatsby.json b/src/frameworks/gatsby.json index fdbc52a7..57c86a4b 100644 --- a/src/frameworks/gatsby.json +++ b/src/frameworks/gatsby.json @@ -1,5 +1,5 @@ { - "name": "gatsby", + "id": "gatsby", "title": "Gatsby", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/gridsome.json b/src/frameworks/gridsome.json index 89aa91e0..6b3d833e 100644 --- a/src/frameworks/gridsome.json +++ b/src/frameworks/gridsome.json @@ -1,5 +1,5 @@ { - "name": "gridsome", + "id": "gridsome", "title": "Gridsome", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/grunt.json b/src/frameworks/grunt.json index 41026062..25b1159b 100644 --- a/src/frameworks/grunt.json +++ b/src/frameworks/grunt.json @@ -1,5 +1,5 @@ { - "name": "grunt", + "id": "grunt", "title": "Grunt", "category": "build_tool", "detect": { diff --git a/src/frameworks/gulp.json b/src/frameworks/gulp.json index b026a90e..38cc23fd 100644 --- a/src/frameworks/gulp.json +++ b/src/frameworks/gulp.json @@ -1,5 +1,5 @@ { - "name": "gulp", + "id": "gulp", "title": "gulp.js", "category": "build_tool", "detect": { diff --git a/src/frameworks/harp.json b/src/frameworks/harp.json index 820806cb..be3afa7c 100644 --- a/src/frameworks/harp.json +++ b/src/frameworks/harp.json @@ -1,5 +1,5 @@ { - "name": "harp", + "id": "harp", "title": "Harp", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/hexo.json b/src/frameworks/hexo.json index fa6dea02..5ee6e41e 100644 --- a/src/frameworks/hexo.json +++ b/src/frameworks/hexo.json @@ -1,5 +1,5 @@ { - "name": "hexo", + "id": "hexo", "title": "Hexo", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/hugo.json b/src/frameworks/hugo.json index 8d86c1b3..c4c633f9 100644 --- a/src/frameworks/hugo.json +++ b/src/frameworks/hugo.json @@ -1,5 +1,5 @@ { - "name": "hugo", + "id": "hugo", "title": "Hugo", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/jekyll.json b/src/frameworks/jekyll.json index a15a63f0..eec96b6c 100644 --- a/src/frameworks/jekyll.json +++ b/src/frameworks/jekyll.json @@ -1,5 +1,5 @@ { - "name": "jekyll", + "id": "jekyll", "title": "Jekyll", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/metalsmith.json b/src/frameworks/metalsmith.json index fdb997b8..aa6c2cfb 100644 --- a/src/frameworks/metalsmith.json +++ b/src/frameworks/metalsmith.json @@ -1,5 +1,5 @@ { - "name": "metalsmith", + "id": "metalsmith", "title": "Metalsmith", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/middleman.json b/src/frameworks/middleman.json index 6de4e52f..b668258d 100644 --- a/src/frameworks/middleman.json +++ b/src/frameworks/middleman.json @@ -1,5 +1,5 @@ { - "name": "middleman", + "id": "middleman", "title": "Middleman", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/next.json b/src/frameworks/next.json index 95ec9812..6f9b205a 100644 --- a/src/frameworks/next.json +++ b/src/frameworks/next.json @@ -1,5 +1,5 @@ { - "name": "next", + "id": "next", "title": "Next.js", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/nuxt.json b/src/frameworks/nuxt.json index 5b6d96e6..995ec5eb 100644 --- a/src/frameworks/nuxt.json +++ b/src/frameworks/nuxt.json @@ -1,5 +1,5 @@ { - "name": "nuxt", + "id": "nuxt", "title": "Next.js", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/parcel.json b/src/frameworks/parcel.json index 51b32541..8cd54be3 100644 --- a/src/frameworks/parcel.json +++ b/src/frameworks/parcel.json @@ -1,5 +1,5 @@ { - "name": "parcel", + "id": "parcel", "title": "Parcel", "category": "build_tool", "detect": { diff --git a/src/frameworks/phenomic.json b/src/frameworks/phenomic.json index 2c9583f2..63458288 100644 --- a/src/frameworks/phenomic.json +++ b/src/frameworks/phenomic.json @@ -1,5 +1,5 @@ { - "name": "phenomic", + "id": "phenomic", "title": "Phenomic", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/quasar-v0.17.json b/src/frameworks/quasar-v0.17.json index 293ab508..e11942d6 100644 --- a/src/frameworks/quasar-v0.17.json +++ b/src/frameworks/quasar-v0.17.json @@ -1,5 +1,5 @@ { - "name": "quasar-v0.17", + "id": "quasar-v0.17", "title": "Quasar", "category": "frontend_framework", "detect": { diff --git a/src/frameworks/quasar.json b/src/frameworks/quasar.json index ba1aba54..75d3faa2 100644 --- a/src/frameworks/quasar.json +++ b/src/frameworks/quasar.json @@ -1,5 +1,5 @@ { - "name": "quasar", + "id": "quasar", "title": "Quasar", "category": "frontend_framework", "detect": { diff --git a/src/frameworks/react-static.json b/src/frameworks/react-static.json index de62c233..6a93d3e4 100644 --- a/src/frameworks/react-static.json +++ b/src/frameworks/react-static.json @@ -1,5 +1,5 @@ { - "name": "react-static", + "id": "react-static", "title": "React Static", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/roots.json b/src/frameworks/roots.json index db499f48..08f992da 100644 --- a/src/frameworks/roots.json +++ b/src/frameworks/roots.json @@ -1,5 +1,5 @@ { - "name": "roots", + "id": "roots", "title": "Roots", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/sapper.json b/src/frameworks/sapper.json index 211034a6..d5d3c4a1 100644 --- a/src/frameworks/sapper.json +++ b/src/frameworks/sapper.json @@ -1,5 +1,5 @@ { - "name": "sapper", + "id": "sapper", "title": "Sapper", "category": "frontend_framework", "detect": { diff --git a/src/frameworks/stencil.json b/src/frameworks/stencil.json index 3a82f0e0..d56c485d 100644 --- a/src/frameworks/stencil.json +++ b/src/frameworks/stencil.json @@ -1,5 +1,5 @@ { - "name": "stencil", + "id": "stencil", "title": "Stencil", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/svelte.json b/src/frameworks/svelte.json index c1429296..c0be29bd 100644 --- a/src/frameworks/svelte.json +++ b/src/frameworks/svelte.json @@ -1,5 +1,5 @@ { - "name": "svelte", + "id": "svelte", "title": "Svelte", "category": "frontend_framework", "detect": { diff --git a/src/frameworks/vue.json b/src/frameworks/vue.json index 96d6861a..048bc60f 100644 --- a/src/frameworks/vue.json +++ b/src/frameworks/vue.json @@ -1,5 +1,5 @@ { - "name": "vue", + "id": "vue", "title": "Vue.js", "category": "frontend_framework", "detect": { diff --git a/src/frameworks/vuepress.json b/src/frameworks/vuepress.json index 6bef0ecb..66d1a0c5 100644 --- a/src/frameworks/vuepress.json +++ b/src/frameworks/vuepress.json @@ -1,5 +1,5 @@ { - "name": "vuepress", + "id": "vuepress", "title": "VuePress", "category": "static_site_generator", "detect": { diff --git a/src/frameworks/wintersmith.json b/src/frameworks/wintersmith.json index 547e10bc..b7e48ded 100644 --- a/src/frameworks/wintersmith.json +++ b/src/frameworks/wintersmith.json @@ -1,5 +1,5 @@ { - "name": "wintersmith", + "id": "wintersmith", "title": "Wintersmith", "category": "static_site_generator", "detect": { diff --git a/src/main.js b/src/main.js index 42b1340a..bdd5d825 100644 --- a/src/main.js +++ b/src/main.js @@ -21,7 +21,7 @@ const { listFrameworks: list, hasFramework: has, getFramework: get } = require(' /** * @typedef {object} Framework - * @property {string} name - Name such as `"gatsby"` + * @property {string} id - Id such as `"gatsby"` * @property {string} category - Category among `"static_site_generator"`, `"frontend_framework"` and `"build_tool"` * @property {Dev} dev - Information about the dev command * @property {Build} build - Information about the build command @@ -44,27 +44,27 @@ const listFrameworks = async function (opts) { /** * Return whether a project uses a specific framework * - * @param {string} frameworkName - Name such as `"gatsby"` + * @param {string} frameworkId - Id such as `"gatsby"` * @param {Options} [options] - Context * * @returns {boolean} result - Whether the project uses this framework */ -const hasFramework = async function (frameworkName, options) { +const hasFramework = async function (frameworkId, options) { const context = await getContext(options) - return await has(frameworkName, context) + return await has(frameworkId, context) } /** * Return some information about a framework used by a project. * - * @param {string} frameworkName - Name such as `"gatsby"` + * @param {string} frameworkId - Id such as `"gatsby"` * @param {Context} [context] - Context * * @returns {Framework} framework - Framework used by a project */ -const getFramework = async function (frameworkName, options) { +const getFramework = async function (frameworkId, options) { const context = await getContext(options) - return await get(frameworkName, context) + return await get(frameworkId, context) } module.exports = { listFrameworks, hasFramework, getFramework } diff --git a/test/bin.js b/test/bin.js index 4a117679..90f12a61 100644 --- a/test/bin.js +++ b/test/bin.js @@ -12,7 +12,7 @@ test('CLI --help flag', async (t) => { t.snapshot(stdout) }) -test('CLI print framework names', async (t) => { +test('CLI print framework ids', async (t) => { const binPath = await BINARY_PATH const { stdout } = await execa(binPath, [`${FIXTURES_DIR}/multiple`]) t.snapshot(stdout) diff --git a/test/detect.js b/test/detect.js index d6b91f0f..60eb1e9d 100644 --- a/test/detect.js +++ b/test/detect.js @@ -37,7 +37,7 @@ test('Should detect config files', async (t) => { if (nodeVersion !== 'v8.3.0') { test('Should detect Next.js plugin for Next.js if when Node version >= 10.13.0', async (t) => { const frameworks = await getFrameworks('next-plugin') - t.is(frameworks[0].name, 'next') + t.is(frameworks[0].id, 'next') t.deepEqual(frameworks[0].plugins, ['@netlify/plugin-nextjs']) }) } @@ -45,7 +45,7 @@ if (nodeVersion !== 'v8.3.0') { if (nodeVersion === 'v8.3.0') { test('Should not detect Next.js plugin for Next.js if when Node version < 10.13.0', async (t) => { const frameworks = await getFrameworks('next-plugin') - t.is(frameworks[0].name, 'next') + t.is(frameworks[0].id, 'next') t.is(frameworks[0].plugins.length, 0) }) } diff --git a/test/frameworks.js b/test/frameworks.js index c8396052..271188f3 100644 --- a/test/frameworks.js +++ b/test/frameworks.js @@ -47,10 +47,10 @@ const PLUGIN_SCHEMA = { const MAX_PORT = 65535 const FRAMEWORK_JSON_SCHEMA = { type: 'object', - required: ['name', 'title', 'category', 'detect', 'dev', 'build', 'env'], + required: ['id', 'title', 'category', 'detect', 'dev', 'build', 'env'], additionalProperties: false, properties: { - name: { type: 'string', pattern: '^[a-z\\d_]+', minLength: 1 }, + id: { type: 'string', pattern: '^[a-z\\d_]+', minLength: 1 }, title: { type: 'string', pattern: '^\\w+', minLength: 1 }, category: { type: 'string', @@ -105,7 +105,7 @@ const FRAMEWORK_JSON_SCHEMA = { } each(FRAMEWORKS, (info, framework) => { - test(`Framework "${framework.name}" should have a valid shape`, (t) => { + test(`Framework "${framework.id}" should have a valid shape`, (t) => { t.is(validate(framework, FRAMEWORK_JSON_SCHEMA), true) }) }) diff --git a/test/helpers/main.js b/test/helpers/main.js index 5f6d7cdd..f423d3ce 100644 --- a/test/helpers/main.js +++ b/test/helpers/main.js @@ -9,12 +9,12 @@ const getFrameworks = function (fixtureName) { return listFrameworks(getOptions(fixtureName)) } -const getFramework = function (fixtureName, frameworkName) { - return getFrameworkLib(frameworkName, getOptions(fixtureName)) +const getFramework = function (fixtureName, frameworkId) { + return getFrameworkLib(frameworkId, getOptions(fixtureName)) } -const hasFramework = function (fixtureName, frameworkName) { - return hasFrameworkLib(frameworkName, getOptions(fixtureName)) +const hasFramework = function (fixtureName, frameworkId) { + return hasFrameworkLib(frameworkId, getOptions(fixtureName)) } module.exports = { getFrameworks, getFramework, hasFramework, FIXTURES_DIR } diff --git a/test/snapshots/bin.js.md b/test/snapshots/bin.js.md index 1415c9d7..de5dec88 100644 --- a/test/snapshots/bin.js.md +++ b/test/snapshots/bin.js.md @@ -24,7 +24,7 @@ Generated by [AVA](https://ava.li). `[␊ {␊ - "name": "vuepress",␊ + "id": "vuepress",␊ "title": "VuePress",␊ "category": "static_site_generator",␊ "dev": {␊ @@ -43,7 +43,7 @@ Generated by [AVA](https://ava.li). "plugins": []␊ },␊ {␊ - "name": "vue",␊ + "id": "vue",␊ "title": "Vue.js",␊ "category": "frontend_framework",␊ "dev": {␊ @@ -63,7 +63,7 @@ Generated by [AVA](https://ava.li). }␊ ]` -## CLI print framework names +## CLI print framework ids > Snapshot 1 @@ -76,7 +76,7 @@ Generated by [AVA](https://ava.li). `[␊ {␊ - "name": "next",␊ + "id": "next",␊ "title": "Next.js",␊ "category": "static_site_generator",␊ "dev": {␊ @@ -104,7 +104,7 @@ Generated by [AVA](https://ava.li). `[␊ {␊ - "name": "next",␊ + "id": "next",␊ "title": "Next.js",␊ "category": "static_site_generator",␊ "dev": {␊ diff --git a/test/snapshots/bin.js.snap b/test/snapshots/bin.js.snap index 05c62323..c5c80acd 100644 Binary files a/test/snapshots/bin.js.snap and b/test/snapshots/bin.js.snap differ diff --git a/test/snapshots/main.js.md b/test/snapshots/main.js.md index 07db798a..176c1b42 100644 --- a/test/snapshots/main.js.md +++ b/test/snapshots/main.js.md @@ -23,7 +23,7 @@ Generated by [AVA](https://ava.li). port: 3000, }, env: {}, - name: 'sapper', + id: 'sapper', plugins: [], title: 'Sapper', } @@ -48,7 +48,7 @@ Generated by [AVA](https://ava.li). port: 3000, }, env: {}, - name: 'sapper', + id: 'sapper', plugins: [], title: 'Sapper', }, diff --git a/test/snapshots/main.js.snap b/test/snapshots/main.js.snap index 37acf60c..13bf7d5b 100644 Binary files a/test/snapshots/main.js.snap and b/test/snapshots/main.js.snap differ