JS Dev Environment
The In Depth Process
Once we have all the necessary apps and services on our machine, we're ready to grab a copy of the environment, set it up, and get it started.
Here's how.
Grab the JS Dev Environment
Start by getting the repository from which we'll make our development environment.
Here's how to do this:
- Go to the environment's repository link.
- Click on the "Use This Template" button (make sure you're signed into your Github account).
- This process will ask you to save the repository to your own Github account. Fill in the relevant information (see here for more details), and then let the process work.
First, fill out the information here. There's no spaces in a repo, name, so use camel case or hypens (I prefer the latter for repo names).
Let that process run after clicking the green button at the bottom. Once you do that, you'll be presented with this repository on your GitHub account.
Clone to Your Machine
Next, we need to clone the repository. That is, we need to get all the code down from GitHub to your local machine will keeping a link between the local and remote. To do that, click on the "Code" button and click the clipboard icon. We'll use that copied URL in the next section.
VSCode makes this process pretty easy. So open the app and follow these steps.
- In the Start section of the home screen, click "Clone Git Repository"
- A dialog will appear in the top center of the window. Paste the URL there. Confirm the command that's highlighted.
- VSCode will ask you for a location of the repositry. Find a folder for this repo to go into.
- VSCode will then clone the repo to that location. All of the files on Github in your instance will be transferred to your machine.
- Finally, open the repository in VSCode by clicking "Open" in the bottom right.
Reveal the Environment
Now that we have the repository cloned to our local machine, we can open it in VSCode and begin to work in it.
- Open VSCode.
- Choose File / Open
- Navigate to where the repository folder is located.
- Select the folder name.
- Click "Open".
And now you are inside the enviornment.
Install the Environment
Now that the environment has been revealed, we need to install it on our machines. Don't worry. This is just an install that downloads the JavaScript dependencies to the environment (that is contained in the folder). Here's how to do so:
- Open the terminal inside of VSCode. Press the control + tilde keys.
- Type
npm install
.- This command will download all the dependencies from the
package.json
file. It takes a few minutes. A fewWARN
notes might show up in the terminal. That's fine. There's nothing that will break in this version.
- This command will download all the dependencies from the
Now, the enviornment is installed. We can now start it up (one more step) and then use it.
Start up the Development Server
For this to work, we need to run a development server. So, in the terminal, let's type npm start
. This command will
- Compile the files together, building them into a
index.html
file. - Serve this file to the URL
localhost:1234
.
And now the FileMaker app (go ahead and open it) will see the code in VSCode and will reflect all the changes you write.