Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract libmmel out as a separate package #104

Draft
wants to merge 63 commits into
base: main
Choose a base branch
from
Draft

Conversation

ribose-jeffreylau
Copy link
Contributor

No description provided.

Commands used:

```bash
  cd packages

  while read -r file
  do
    echo file is $file
    path="${file##*/src}"
    path="${path%/*}"
    path="${path#/}"
    path="${path:-.}"
    echo file=$file
    echo path=$path
    sed -i  -r "s|(import .*')(\..*)';|printf  \"\1@/\"\; realpath --relative-to=. -m \"${path}/\2\" \| tr -d \"\n\" \; printf \"'; \"\;|ge" "$file"
  done < <(fd . legacy/src -t f -e ts -e tsx)

  while read -r file
  do
    echo file is $file
    path="${file##*/src}"
    path="${path%/*}"
    path="${path#/}"
    path="${path:-.}"
    echo file=$file
    echo path=$path
    sed -i  -r "s|(import .*')(\..*)';|printf  \"\1@/\"\; realpath --relative-to=. -m \"${path}/\2\" \| tr -d \"\n\" \; printf \"'; \"\;|ge" "$file"
  done < <(fd . libmmel/src -t f -e ts -e tsx)
```
Commands used:

```bash
cd packages

while read -r file
do
	echo file is $file

	path="${file##*/src}"
	path="${path%/*}"
	path="${path#/}"
	path="${path:-.}"
	echo file=$file
	echo path=$path

	sed -i -r \
		"s|(.*)(from ')(\..*)';| printf \"\1\2@/\"\; realpath --relative-to=. -m \"${path}/\3\" \| tr -d \"\n\" \; printf \"';\"\;|ge" \
		"$file"

done < <(fd . legacy/src -t f -e ts -e tsx)

while read -r file
do
	echo file is $file

	path="${file##*/src}"
	path="${path%/*}"
	path="${path#/}"
	path="${path:-.}"
	echo file=$file
	echo path=$path

	sed -i -r \
		"s|(.*)(from ')(\..*)';| printf \"\1\2@/\"\; realpath --relative-to=. -m \"${path}/\3\" \| tr -d \"\n\" \; printf \"';\"\;|ge" \
		"$file"

done < <(fd . libmmel/src -t f -e ts -e tsx)

```
... for the case when `workflow_dispatch` is triggered.
The error in Paneron when initializing the extension was:

  Invalid hook call. Hooks can only be called inside of the body of a
  function component. This could happen for one of the following reasons:

    1. You might have mismatching versions of React and the renderer
       (such as React DOM)
    2. You might be breaking the Rules of Hooks
    3. You might have more than one copy of React in the same app See
       for tips about how to debug and fix this problem.
... except for except for ts-node which is required by Jest to read Typescript configuration files.
... in preparation for move of libmmel to Paneron core
... so that TS 5 ("importsNotUsedAsValues") will be happy, too
... to prepare for incorporation of libmmel in Paneron core.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ backend enhancement New feature or request 🧹refactor Clean up technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract mmel parser to separate repo
1 participant