Skip to content

Commit

Permalink
fix(docs): examples file loader (#3294)
Browse files Browse the repository at this point in the history
*By submitting this pull request, I confirm that my contribution is made
under the terms of the [Monada Contribution
License](https://www.winglang.io/terms-and-policies/contribution-license.html)*.
  • Loading branch information
ainvoner authored Jul 6, 2023
1 parent 43d8dc6 commit f43cb47
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion docs/docs/src/components/CodeComparison.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import FileCodeBlock from './FileCodeBlock';
import helloWPath from '!file-loader!../examples/function-upload-to-bucket/wing/hello.w';

import getExamplePlatforms from '../examples/getExamplePlatforms';
import getExampleWingFile from '../examples/getExampleWingFile';
Expand Down
22 changes: 11 additions & 11 deletions docs/docs/src/examples/function-upload-to-bucket/platforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

// Also js files are js.txt files until we find a way to make Docusaurus not minify them

import pulumiIndexPath from '!file-loader!./pulumi/index.js.txt';
import pulumiMainPath from '!file-loader!./pulumi/main.ts';
import pulumiPulumiPath from '!file-loader!./pulumi/pulumi.yaml';
import pulumiIndexPath from '!file-loader?outputPath=docs!./pulumi/index.js.txt';
import pulumiMainPath from '!file-loader?outputPath=docs!./pulumi/main.ts';
import pulumiPulumiPath from '!file-loader?outputPath=docs!./pulumi/pulumi.yaml';

import terraformIndexPath from '!file-loader!./terraform/index.js.txt';
import terraformMainPath from '!file-loader!./terraform/main.tf';
import terraformIndexPath from '!file-loader?outputPath=docs!./terraform/index.js.txt';
import terraformMainPath from '!file-loader?outputPath=docs!./terraform/main.tf';

import cdkHelloPath from '!file-loader!./aws-cdk/hello.js.txt';
import cdkIndexPath from '!file-loader!./aws-cdk/index.js.txt';
import cdkHelloPath from '!file-loader?outputPath=docs!./aws-cdk/hello.js.txt';
import cdkIndexPath from '!file-loader?outputPath=docs!./aws-cdk/index.js.txt';

import cdktfIndexPath from '!file-loader!./cdktf/index.js.txt';
import cdktfMainPath from '!file-loader!./cdktf/main.ts';
import cdktfIndexPath from '!file-loader?outputPath=docs!./cdktf/index.js.txt';
import cdktfMainPath from '!file-loader?outputPath=docs!./cdktf/main.ts';

import cloudformationIndexPath from '!file-loader!./cloudformation/index.js.txt';
import cloudformationTemplatePath from '!file-loader!./cloudformation/template.yaml';
import cloudformationIndexPath from '!file-loader?outputPath=docs!./cloudformation/index.js.txt';
import cloudformationTemplatePath from '!file-loader?outputPath=docs!./cloudformation/template.yaml';

const allPlatforms = [
{
Expand Down
3 changes: 1 addition & 2 deletions docs/docs/src/examples/function-upload-to-bucket/wing.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// We cannot parse the folder structure at runtime because of Docusaurus and webpack limitations

import wingHelloPath from '!file-loader!./wing/hello.w';

import wingHelloPath from '!file-loader?outputPath=docs!./wing/hello.w';
export default { name: "hello.js", path: wingHelloPath };

0 comments on commit f43cb47

Please sign in to comment.