Another week, another newsletter. Let’s get to it!
Around the Web
- Deno allows you to create command line interfaces (CLI), but I didn’t realize you could use web prompts for the, i.e.
alert('completed')
! For more info, check the examples for input prompts. - Regardless of what you think about React, this is a really great documentary. This also ties into last week’s newsletter’s post from my co-worker Seldo
- Stackblitz has released the WebContainer API. There’s a bunch of use cases for this, for example integrated playgrounds in documentation. Also, of you’ve never checked out Stackblitz, it’s an awesome online IDE for full-stack web development.
Fun Stuff
This made me chuckle.
Words of Wisdom for the Week
My friend Vic drops some truth bombs here.
Shameless Plugs
My Remix work got merged! There is now a v. 1.0.0 of the @netlify/remix-edge-adapter
chore: release main #44
🤖 I have created a release beep boop
remix-edge-adapter: 1.0.0
1.0.0 (2023-02-13)
Features
remix-runtime: 1.0.0
1.0.0 (2023-02-13)
Features
This PR was generated with Release Please. See documentation.
I’m wrapping up the Remix template for Netlify and then it’ll all be ready for prime time. 🥳 If you’re interested, here’s the pull request.
feat: update to official Netlify Remix template #83
Description
Updates the template. The updated template uses remix.init to offer installing Remix for Netlify Functions or for Netlify Edge Functions. The Netlify Functions template existed already within Remix, but when I was working on https://github.com/remix-run/remix/pull/3104, we turned it into one template, extending the template via remix.init to choose between Netlify Functions and Netlify Edge Functions.
Ignore the deploy preview loading with a page not found. The template has changed and a deploy preview does not make sense at the moment. We'll need to rethink how we deploy the different templates as a deploy preview.
Related Tickets & Documents
- Related Issue https://github.com/netlify/remix-compute/issues/17
- Closes #82
QA Instructions, Screenshots, Recordings
-
Ensure the Netlify CLI is installed and up to date.
-
Check out this branch, e.g. via the GitHub CLI,
gh co 83
-
There are four test scenarios:
- Create a Remix app using TypeScript for Netlify Functions
- Create a Remix app using JavaScript for Netlify Functions
- Create a Remix app using TypeScript for Netlify Edge Functions
- Create a Remix app using JavaScript for Netlify Edge Functions
-
For each scenario, it always starts by running the following from the root folder in a shell.
npx create-remix --template ./
- The CLI will prompt for a location for the project.
❯ npx create-remix --template ./
? Where would you like to create your app? (./my-remix-app)
Ensure that the location is outside of the Netlify Remix template folder, e.g. ../my-remix-app
- The Remix CLI will prompt you to choose TypeScript or JavaScript. Choose accordingly for the given test scenarios mentioned above.
? TypeScript or JavaScript? (Use arrow keys)
❯ TypeScript
JavaScript
- The Remix CLI will prompt you to install packages, press the ENTER to accept the default answer of Yes
? Do you want me to run `npm install`? (Y/n)
The npm packages will install.
- The Remix CLI extended with our questions will prompt to create the app with Netlify Functions or Netlify Edge Functions.
💿 Running remix.init script
? Run your Remix site with: (Use arrow keys)
❯ Netlify Functions - Choose this for stable support for production sites
Netlify Edge Functions (beta) - Try this for improved performance on non-critical sites
Choose accordingly for the given test scenarios mentioned above.
- Change to the the directory of the project you just created, e.g.
../my-remix-app
- Note that the newly created project should not contain a
.github
folder - The
README.md
for the project should be for the given deployment target. If you created a new Remix app using the Netlify Functions template, it should have this README. Otherwise, it should be this README. -
- The
netlify.toml
for the project should be for the given deployment target. If you created a new Remix app using the Netlify Functions template, it should have this netlify.toml. Otherwise, it should be this netlify.toml.
- The
- Run
npm install
- Run
ntl build --offline
- Run
ntl serve
- Navigate to
https://localhost:8888
and the page loads.
Testing a deployment
If you want to test a deploy of your new Remix app created by the Remix template:
- Ensure you're logged in to Netlify via the CLI
ntl login
- Create a new site:
ntl init
- Deploy the site:
ntl deploy --build
or for production
ntl deploy --build --prod
For us to review and ship your PR efficiently, please perform the following steps:
- [x] Open a bug/issue before writing your code
🧑💻 . This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire🔥 (e.g. incident related), you can skip this step. - [x] Read the contribution guidelines
📖 . This ensures your code follows our style guide and passes our tests. - [ ] Update or add tests (if any source code was changed or added)
🧪 - [ ] Update or add documentation (if features were changed or added)
📝 - [x] Make sure the status checks below are successful
✅
A picture of a cute animal (not mandatory, but encouraged)
I had a great time hanging with Chris Demars last week. Check out the live stream recording on YouTube and don’t forget to give a subscribe. 😎
Jobs
- Prisma is looking for a Senior Dev Advocate! Remote (North America)
- Netlify, where I work, is looking for a Senior, Solutions Engineer (EST Time Zone - US Remote)
I post jobs in the iamdeveloper.com community, plus all other kinds of content, as do others. If you’re looking for another friendly nook of the internet, head over to discord.iamdeveloper.com.
If you liked this newsletter, you can subscribe or if RSS is your jam, you can also subscribe via RSS.