Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork254
Official documentation website for the ReScript programming language
License
rescript-lang/rescript-lang.org
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is the official documentation platform for theReScript programming language.
Please report any technical issues with ReScript to thecompiler repository.
In case you are missing some specific documentation:
- Some language / compiler feature may not be documented yet
- Create an issue to let us know what you are missing
- In case you want to contribute missing docs, please refer to ourContribution section
node@20or highernpm@10or higher
# For first time clone / build (install dependencies)npm i# Initial buildnpx rescript# Build the index data. Only needed for initial clone (or content H2 changes)npm run update-index# In a new tabnpm run devopen localhost:3000
In case you want to run ReScript in watchmode:
npx rescript -w
We are parsing our content for specific index data (such as, all interestingsearch terms we need for searching inside theBelt docs). You can create yourindex by running following command:
npm run update-index
All the index data is stored inindex_data, but will not be tracked by git.Make sure to build the index after a fresh clone, otherwise Next might notbuild specific pages (fileindex_data/x.json not found).
data: Contains hand-curated data, such as sidebar ordering, blog data, etcindex_data: Contains generated data, usually generated by scripts likescripts/extract-tocs.jscompilers: Contains a subdirectory with independently installed ReScript compilers, to be able to compile / test examples with different ReScript versionsmisc_docs: Containspagesindependent resources that are embedded in miscellaneous pages (e.g. for the syntax lookup)pages: All Next pages. Those are written in JS / MDX, some pages are re-exporting ReScript based pages from thesrc/directory.styles: Contains all extra CSS that cannot be expressed with Tailwindsrc: Contains all ReScript related code for the UI. Withinsrc, you will also find all ReScript based Next pages that are re-exported in thepagesdirectory/bindings: (Zero-cost) bindings to JS libraries / apis/common: ReScript modules that are neitherbindings, norcomponents/components: ReScript / React components used by multiple pages/ffi: (to be deprecated) Plain JS that some ReScript code binds to (userawstatements for that)/layouts: All Next layouts used in our pages. Check outsrc/common/App.resfor mapping layouts to routes
plugins: Contains plugins for all kinds of things: HighlightJS, MDX, webpack loader, etc.scripts: Contains a mix of JS / ReScript based scripts that do all kind of code generation / code introspection logictailwind.config.js: Contains our Tailwind configuration for all the low level design tokens
We check the validity of our code examples marked with:
```res example(ReScript code snippet)```res sig(signature)```res prelude(ReScript code snippet available for all subsequent code snippets)
Run the checks with:
node scripts/test-examples.mjs
We are also verifying markdown href links to relative resources (via[text](url) syntax) with ourscripts/test-hrefs.js script. Here is a shortexplanation on how the href testing works:
Domain relative links, such as/docs/manual/latest,./introduction,introduction,/docs/foo/introduction.md will be verified. That means thetester will check if given path exists in thepages directory.
If there are any anchor refs, such as/docs/manual#test, then the anchor willbe ignored for the specific file path check. If there are any hrefs with.md,.mdx or.html file extension, then those will be stripped before the checkhappens (the markdown renderer drops file extensions on relative links aswell).
External hrefs, such ashttps://www.hello.world,//www.hello.world will NOT bechecked since they are assumed to be external resources.
Here is an example on how to run the tests:
# Tests all filesnode scripts/test-hrefs.mjs# Or just a subset (glob pattern)node scripts/test-hrefs.mjs"pages/docs/manual/**/*.mdx"
Always make sure to runnpm test before pushing any content, otherwise our CImight trigger a failure warning. Failing branches are very unlikely to be merged.
Design mockups can be foundhere.
Be aware that some screen designs might still be work in progress, if you haveany design / UX questions, either comment directly on the design tool as guest,or open an issue.
Build CSS seperately vianpx postcss (useful for debugging)
# Devmodenpx postcss styles/main.css -o test.css# ProductionNODE_ENV=production npx postcss styles/main.css -o test.css
In case you are a blog author, please refer to ourguide on writing blog posts.
In case your company is a user of ReScript and wants to be displayed on our front page ("Trusted by our users" section), do the following:
- Get your logo as a black / white
.svgversion and use#979AADas a fill color (check out the existing logos on our front page). - Put your logo into the
public/static/lpfolder; the file should be named after your company. - Opensrc/common/OurUsers.res and add your info
- Commit, push, and open a PR.
Please make sure to first read and comply to ourCode of Conduct and check out ourCONTRIBUTING.md file to learn how to get started with our contribution process!
About
Official documentation website for the ReScript programming language
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.