-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yoann Chaudet
committed
Jul 19, 2022
1 parent
43a5456
commit ba4576e
Showing
26 changed files
with
317 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| // const {ConfigParser} = require('./config-parser') | ||
| // const fs = require('fs') | ||
| // const assert = require('assert') | ||
|
|
||
| // const srcFolder = `${process.cwd()}/src/fixtures` | ||
| // const tmpFolder = `${process.cwd()}/src/fixtures/tmp` | ||
| // const expectedFolder = `${process.cwd()}/src/fixtures/expected` | ||
|
|
||
| // const repoPath = '/amazing-new-repo/' | ||
|
|
||
| // const cases = [ | ||
| // [ | ||
| // 'next.config.js', | ||
| // { | ||
| // configurationFile: `${tmpFolder}/next.config.js`, | ||
| // propertyName: 'basePath', | ||
| // propertyValue: repoPath, | ||
| // blankConfigurationFile: `${process.cwd()}/src/blank-configurations/next.js` | ||
| // } | ||
| // ], | ||
| // [ | ||
| // 'next.config.old.js', | ||
| // { | ||
| // configurationFile: `${tmpFolder}/next.config.old.js`, | ||
| // propertyName: 'basePath', | ||
| // propertyValue: repoPath, | ||
| // blankConfigurationFile: `${process.cwd()}/src/blank-configurations/next.js` | ||
| // } | ||
| // ], | ||
| // [ | ||
| // 'next.config.old.missing.js', | ||
| // { | ||
| // configurationFile: `${tmpFolder}/next.config.old.missing.js`, | ||
| // propertyName: 'basePath', | ||
| // propertyValue: repoPath, | ||
| // blankConfigurationFile: `${process.cwd()}/src/blank-configurations/next.js` | ||
| // } | ||
| // ], | ||
| // [ | ||
| // 'gatsby-config.js', | ||
| // { | ||
| // configurationFile: `${tmpFolder}/gatsby-config.js`, | ||
| // propertyName: 'pathPrefix', | ||
| // propertyValue: repoPath, | ||
| // blankConfigurationFile: `${process.cwd()}/src/blank-configurations/gatsby.js` | ||
| // } | ||
| // ], | ||
| // [ | ||
| // 'gatsby-config.old.js', | ||
| // { | ||
| // configurationFile: `${tmpFolder}/gatsby-config.old.js`, | ||
| // propertyName: 'pathPrefix', | ||
| // propertyValue: repoPath, | ||
| // blankConfigurationFile: `${process.cwd()}/src/blank-configurations/gatsby.js` | ||
| // } | ||
| // ], | ||
| // [ | ||
| // 'nuxt.config.js', | ||
| // { | ||
| // configurationFile: `${tmpFolder}/nuxt.config.js`, | ||
| // propertyName: 'router.base', | ||
| // propertyValue: repoPath, | ||
| // blankConfigurationFile: `${process.cwd()}/src/blank-configurations/nuxt.js` | ||
| // } | ||
| // ], | ||
| // [ | ||
| // 'nuxt.config.missing.js', | ||
| // { | ||
| // configurationFile: `${tmpFolder}/nuxt.config.missing.js`, | ||
| // propertyName: 'router.base', | ||
| // propertyValue: repoPath, | ||
| // blankConfigurationFile: `${process.cwd()}/src/blank-configurations/nuxt.js` | ||
| // } | ||
| // ], | ||
| // [ | ||
| // 'nuxt.config.old.js', | ||
| // { | ||
| // configurationFile: `${tmpFolder}/nuxt.config.old.js`, | ||
| // propertyName: 'router.base', | ||
| // propertyValue: repoPath, | ||
| // blankConfigurationFile: `${process.cwd()}/src/blank-configurations/nuxt.js` | ||
| // } | ||
| // ] | ||
| // ] | ||
|
|
||
| // describe('configParser', () => { | ||
| // test.each(cases)('%p parsed correctly', (fileName, configuration) => { | ||
| // srcFileName = `${srcFolder}/${fileName}` | ||
| // tmpFileName = `${tmpFolder}/${fileName}` | ||
| // expectedFileName = `${expectedFolder}/${fileName}` | ||
| // fs.mkdirSync(tmpFolder, {recursive: true}) | ||
| // fs.copyFileSync(srcFileName, tmpFileName) | ||
| // const parser = new ConfigParser(configuration) | ||
| // parser.parse() | ||
|
|
||
| // var expectedContent = fs.readFileSync(expectedFileName).toString() | ||
| // var actualContent = fs.readFileSync(tmpFileName).toString() | ||
| // assert.equal(actualContent, expectedContent) | ||
| // fs.rmSync(tmpFileName) | ||
| // }) | ||
| // }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| // Default Pages configuration for Gatsby | ||
| module.exports = { pathPrefix: "/docs/" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // This file is not read by the test suite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| module.exports = { | ||
| pathPrefix: "/docs/", | ||
| siteMetadata: { | ||
| title: `My Gatsby Site`, | ||
| siteUrl: `https://www.yourdomain.tld`, | ||
| }, | ||
| plugins: [], | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = { | ||
| siteMetadata: { | ||
| title: `My Gatsby Site`, | ||
| siteUrl: `https://www.yourdomain.tld`, | ||
| }, | ||
| plugins: [], | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| // Default Pages configuration for Next | ||
| const nextConfig = { basePath: "/docs/" } | ||
| module.exports = nextConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // This file is not read by the test suite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| /** @type {import('next').NextConfig} */ | ||
| const nextConfig = { | ||
| basePath: "/docs/", | ||
| reactStrictMode: true, | ||
| swcMinify: true, | ||
| } | ||
|
|
||
| module.exports = nextConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| /** @type {import('next').NextConfig} */ | ||
| const nextConfig = { | ||
| reactStrictMode: true, | ||
| swcMinify: true, | ||
| } | ||
|
|
||
| module.exports = nextConfig |
Oops, something went wrong.