{"id":1359,"date":"2021-04-02T19:13:15","date_gmt":"2021-04-03T02:13:15","guid":{"rendered":"https:\/\/coderpad-staging.io\/?post_type=programming-language&#038;p=1089"},"modified":"2023-04-17T04:03:35","modified_gmt":"2023-04-17T11:03:35","slug":"html-css-js","status":"publish","type":"programming-language","link":"https:\/\/coderpad.io\/languages\/html-css-js\/","title":{"rendered":"HTML\/CSS\/JS"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>TypeScript<\/strong><\/h2>\n\n\n\n<p>HTML\/CSS\/JS pads are pre-configured to support <a href=\"https:\/\/www.typescriptlang.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">TypeScript<\/a>, but you can define <code>.js<\/code> and <code>.jsx<\/code> files instead.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>IntelliSense<\/strong><\/h2>\n\n\n\n<p>IntelliSense is running across the entire project, allowing you to see when there are syntax errors or to get quick hints for how to resolve errors or TypeScript issues.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Shell<\/strong><\/h2>\n\n\n\n<p>A shell is provided to you so you can inspect your container in more detail. &nbsp;The shell can be used to install <a href=\"https:\/\/www.npmjs.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">NPM<\/a> packages using <code>npm install &lt;package&gt;<\/code>. &nbsp;In addition to installing packages, the shell can be used for executing a test suite if you have one defined.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p>\u26a0\ufe0fWhile it&#8217;s possible to edit files directly from the shell, we recommend using the editor to make your changes. &nbsp;That way, other people in the pad can see your changes as they&#8217;re being made.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>About Vite<\/strong><\/h2>\n\n\n\n<p>This pad is served by <a href=\"https:\/\/vitejs.dev\/\" target=\"_blank\" rel=\"noreferrer noopener\">Vite<\/a>. &nbsp;Changes are automatically captured as you type them, and other people in the Pad can see them. &nbsp;You can add as many files to the project as you need, as well as any NPM packages.<\/p>\n\n\n\n<p>We chose Vite because of its <a href=\"https:\/\/vitejs.dev\/guide\/why.html#slow-server-start\" target=\"_blank\" rel=\"noreferrer noopener\">fast startup times<\/a> and <a href=\"https:\/\/vitejs.dev\/guide\/why.html#slow-updates\" target=\"_blank\" rel=\"noreferrer noopener\">quick browser updates<\/a> using native ES Modules. &nbsp;You probably won&#8217;t need to change any of the <a href=\"https:\/\/vitejs.dev\/config\/\" target=\"_blank\" rel=\"noreferrer noopener\">Vite configuration options<\/a>, but if you do, you can edit the <code>vite.config.ts<\/code> file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Hot Module Reloading<\/strong><\/h2>\n\n\n\n<p>Vite provides hot module reloading by default, meaning that changes you make to the files in your project are automatically applied (after a 2 second debounce); there is no need to refresh the iframe to see the changes. &nbsp;Vite will display any errors directly in the application output, or if there is a system-wide error, in the logs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Container Limits<\/strong><\/h2>\n\n\n\n<p>The container running your application has a few limitations. &nbsp;Currently, we don&#8217;t limit your CPU usage, though this may change in future. &nbsp;In addition to CPU, we monitor the network bandwidth that is consumed, and limit you to 75 MB for the duration of the container. &nbsp;Finally, we limit the amount of memory accessible to each container to 2 GB.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Assets<\/strong><\/h2>\n\n\n\n<p>Out-of-the-box support for SVG files is included, just add a <code>whatever.svg<\/code> file and then import it wherever you need it. &nbsp;Other assets will need to be hosted elsewhere and fetched via the shell, or just referenced directly in HTML tags.<\/p>\n","protected":false},"parent":0,"menu_order":0,"template":"","class_list":["post-1359","programming-language","type-programming-language","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/programming-language\/1359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/programming-language"}],"about":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/types\/programming-language"}],"wp:attachment":[{"href":"https:\/\/coderpad.io\/wp-json\/wp\/v2\/media?parent=1359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}