Skip to content

Conversation

@amtoine
Copy link
Member

@amtoine amtoine commented Nov 18, 2022

After some private discussion with @nicolaslesquoy, the use of a nushell script to generate the language file of oberon is probably not the best...

the former ./scripts/generate-language was mandatory to build the language.json file, which is in turn required by ./scripts/generate-website to generate the pages for the static website of the oberon language 🤔

the changes

this PR proposes the following:

  • remove the nushell script generate-language
  • replace it with an equivalent NUON version of the data
    as said in the page above,

NUON is a superset of JSON! That is, any JSON code is a valid NUON code

  • track language.json
  • generate language.json with
nushell> open language.nuon | save language.json

some tests

i've generated the website, from nushell to leverage the format conversion from NUON to JSON of the shell, with

> open language.nuon | save language.json
> ./scripts/generate-website

and did check the pages with

> qutebrowser website/index.html

on my machine

the generated pages look the same 👍

i've also conducted a more exhaustive test as follows

> open language.nuon | save language.json
> ./scripts/generate-website
> rm /path/to/oberonproject.github.io/syntax -r
> cp -r website/ /path/to/oberonproject.github.io/syntax
> git -C /path/to/oberonproject.github.io status

which gives me

On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

when the tree is already clean before the test on the main branch of oberonproject.github.io
the files are indeed the same!!

@amtoine amtoine self-assigned this Nov 18, 2022
@amtoine amtoine added the needs-triage An issue or PR without a label label Nov 26, 2022
@amtoine amtoine marked this pull request as draft December 21, 2022 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-triage An issue or PR without a label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants