Hello world
Once the environment is installed, three files should exist inside ./src - index.js, index.html, and develop.js
You'll need to update some values in./jarb.config.json
{
"env" : {
"production" : {
"assetsPath":"//subdomain.example.com/",
"bodyHTML" : '{Any HTML markup}
}
}
}
you can change body.innerHTML
to whatever you want by using `bodyHTML`
you can change assetsPath
to whatever you want, normally / is used.
assetsPath
specifies the base URL from which images and assets are loaded
Go ahead and type document.body.innerHTML = 'HELLO WORLD'
inside develop.js
, save the file and run npm start
Code you write in develop.js will appear in the dev server only.
Code you write in index.js will appear production only
To share code between the two, move the code to a different file
To build the static website, run npm run build
The ./dist directory should have a complete static website ready
This starts up the dev server and shows the the changed DOM! (See {@tutorial developersCommonIssues} for any problems)