diff --git a/__fixtures__/test-project/.gitignore b/__fixtures__/test-project/.gitignore index c09f46d03101..9b8149560d9b 100644 --- a/__fixtures__/test-project/.gitignore +++ b/__fixtures__/test-project/.gitignore @@ -2,7 +2,8 @@ .DS_Store .env .netlify -.redwood +.redwood/* +!.redwood/README.md dev.db* dist dist-babel diff --git a/__fixtures__/test-project/.redwood/README.md b/__fixtures__/test-project/.redwood/README.md new file mode 100644 index 000000000000..04a7b3a742c6 --- /dev/null +++ b/__fixtures__/test-project/.redwood/README.md @@ -0,0 +1,44 @@ +# .redwood + +## What is this directory? + +Redwood uses this `.redwood` directory to store transitory data that aids in the smooth and convienent operation of your Redwood project. + +## Do I need to do anything with this directory? + +No. You shouldn't have to create, edit or delete anything in this directory in your day-to-day work with Redwood. + +You don't need to commit any other contents of this directory to your version control system. It's ignored by default. + +## What's in this directory? + +### Files + +| Name | Description | +| :---------------- | :------- | +| commandCache.json | This file contains mappings to assist the Redwood CLI in efficiently executing commands. | +| schema.graphql | This is the GraphQL schema which has been automatically generated from your Redwood project. | +| studio.db | The sqlite database used by the experimental `rw exp studio` feature. | +| telemetry.txt | Contains a unique ID used for telemetry. This value is rotated every 24 hours to protect your project's anonymity. | +| test.db | The sqlite database used when running tests. | + +### Directories + +| Name | Description | +| :---------- | :------- | +| locks | Stores temporary files that Redwood uses to keep track of the execution of async/background tasks between processes. | +| logs | Stores log files for background tasks such as update checking. | +| prebuild | Stores transpiled JavaScript that is generated as part of Redwood's build process. | +| telemetry | Stores the recent telemetry that the Redwood CLI has generated. You may inspect these files to see everything Redwood is anonymously collecting. | +| types | Stores the results of type generation. | +| updateCheck | Stores a file which contains the results of checking for Redwood updates. | + +We try to keep this README up to date but you may, from time to time, find other files or directories in this `.redwood` directory that have not yet been documented here. This is likely nothing to worry about but feel free to let us know and we'll update this list. + +### Telemetry + +RedwoodJS collects completely anonymous telemetry data about general usage. For transparency, that data is viewable in the respective directories and files. To learn more and manage your project's settings, visit [telemetry.redwoodjs.com](https://telemetry.redwoodjs.com). + +### Have any questions? + +Feel free to reach out to us in the [RedwoodJS Community](https://community.redwoodjs.com/) forum if you have any questions. diff --git a/packages/create-redwood-app/templates/js/.redwood/README.md b/packages/create-redwood-app/templates/js/.redwood/README.md new file mode 100644 index 000000000000..04a7b3a742c6 --- /dev/null +++ b/packages/create-redwood-app/templates/js/.redwood/README.md @@ -0,0 +1,44 @@ +# .redwood + +## What is this directory? + +Redwood uses this `.redwood` directory to store transitory data that aids in the smooth and convienent operation of your Redwood project. + +## Do I need to do anything with this directory? + +No. You shouldn't have to create, edit or delete anything in this directory in your day-to-day work with Redwood. + +You don't need to commit any other contents of this directory to your version control system. It's ignored by default. + +## What's in this directory? + +### Files + +| Name | Description | +| :---------------- | :------- | +| commandCache.json | This file contains mappings to assist the Redwood CLI in efficiently executing commands. | +| schema.graphql | This is the GraphQL schema which has been automatically generated from your Redwood project. | +| studio.db | The sqlite database used by the experimental `rw exp studio` feature. | +| telemetry.txt | Contains a unique ID used for telemetry. This value is rotated every 24 hours to protect your project's anonymity. | +| test.db | The sqlite database used when running tests. | + +### Directories + +| Name | Description | +| :---------- | :------- | +| locks | Stores temporary files that Redwood uses to keep track of the execution of async/background tasks between processes. | +| logs | Stores log files for background tasks such as update checking. | +| prebuild | Stores transpiled JavaScript that is generated as part of Redwood's build process. | +| telemetry | Stores the recent telemetry that the Redwood CLI has generated. You may inspect these files to see everything Redwood is anonymously collecting. | +| types | Stores the results of type generation. | +| updateCheck | Stores a file which contains the results of checking for Redwood updates. | + +We try to keep this README up to date but you may, from time to time, find other files or directories in this `.redwood` directory that have not yet been documented here. This is likely nothing to worry about but feel free to let us know and we'll update this list. + +### Telemetry + +RedwoodJS collects completely anonymous telemetry data about general usage. For transparency, that data is viewable in the respective directories and files. To learn more and manage your project's settings, visit [telemetry.redwoodjs.com](https://telemetry.redwoodjs.com). + +### Have any questions? + +Feel free to reach out to us in the [RedwoodJS Community](https://community.redwoodjs.com/) forum if you have any questions. diff --git a/packages/create-redwood-app/templates/js/gitignore.template b/packages/create-redwood-app/templates/js/gitignore.template index c09f46d03101..9b8149560d9b 100644 --- a/packages/create-redwood-app/templates/js/gitignore.template +++ b/packages/create-redwood-app/templates/js/gitignore.template @@ -2,7 +2,8 @@ .DS_Store .env .netlify -.redwood +.redwood/* +!.redwood/README.md dev.db* dist dist-babel diff --git a/packages/create-redwood-app/templates/ts/.redwood/README.md b/packages/create-redwood-app/templates/ts/.redwood/README.md new file mode 100644 index 000000000000..04a7b3a742c6 --- /dev/null +++ b/packages/create-redwood-app/templates/ts/.redwood/README.md @@ -0,0 +1,44 @@ +# .redwood + +## What is this directory? + +Redwood uses this `.redwood` directory to store transitory data that aids in the smooth and convienent operation of your Redwood project. + +## Do I need to do anything with this directory? + +No. You shouldn't have to create, edit or delete anything in this directory in your day-to-day work with Redwood. + +You don't need to commit any other contents of this directory to your version control system. It's ignored by default. + +## What's in this directory? + +### Files + +| Name | Description | +| :---------------- | :------- | +| commandCache.json | This file contains mappings to assist the Redwood CLI in efficiently executing commands. | +| schema.graphql | This is the GraphQL schema which has been automatically generated from your Redwood project. | +| studio.db | The sqlite database used by the experimental `rw exp studio` feature. | +| telemetry.txt | Contains a unique ID used for telemetry. This value is rotated every 24 hours to protect your project's anonymity. | +| test.db | The sqlite database used when running tests. | + +### Directories + +| Name | Description | +| :---------- | :------- | +| locks | Stores temporary files that Redwood uses to keep track of the execution of async/background tasks between processes. | +| logs | Stores log files for background tasks such as update checking. | +| prebuild | Stores transpiled JavaScript that is generated as part of Redwood's build process. | +| telemetry | Stores the recent telemetry that the Redwood CLI has generated. You may inspect these files to see everything Redwood is anonymously collecting. | +| types | Stores the results of type generation. | +| updateCheck | Stores a file which contains the results of checking for Redwood updates. | + +We try to keep this README up to date but you may, from time to time, find other files or directories in this `.redwood` directory that have not yet been documented here. This is likely nothing to worry about but feel free to let us know and we'll update this list. + +### Telemetry + +RedwoodJS collects completely anonymous telemetry data about general usage. For transparency, that data is viewable in the respective directories and files. To learn more and manage your project's settings, visit [telemetry.redwoodjs.com](https://telemetry.redwoodjs.com). + +### Have any questions? + +Feel free to reach out to us in the [RedwoodJS Community](https://community.redwoodjs.com/) forum if you have any questions. diff --git a/packages/create-redwood-app/templates/ts/gitignore.template b/packages/create-redwood-app/templates/ts/gitignore.template index c09f46d03101..9b8149560d9b 100644 --- a/packages/create-redwood-app/templates/ts/gitignore.template +++ b/packages/create-redwood-app/templates/ts/gitignore.template @@ -2,7 +2,8 @@ .DS_Store .env .netlify -.redwood +.redwood/* +!.redwood/README.md dev.db* dist dist-babel diff --git a/tasks/test-project/rebuild-test-project-fixture.js b/tasks/test-project/rebuild-test-project-fixture.js index 020cd25321d0..5be24be335ba 100755 --- a/tasks/test-project/rebuild-test-project-fixture.js +++ b/tasks/test-project/rebuild-test-project-fixture.js @@ -478,7 +478,11 @@ async function runCommand() { task: async () => { // @TODO: This only works on UNIX, we should use path.join everywhere // remove all .gitignore - await rimraf(`${OUTPUT_PROJECT_PATH}/.redwood`) + await rimraf(`${OUTPUT_PROJECT_PATH}/.redwood/**/*`, { + glob: { + ignore: `${OUTPUT_PROJECT_PATH}/.redwood/README.md`, + }, + }) await rimraf(`${OUTPUT_PROJECT_PATH}/api/db/dev.db`) await rimraf(`${OUTPUT_PROJECT_PATH}/api/db/dev.db-journal`) await rimraf(`${OUTPUT_PROJECT_PATH}/api/dist`)