Hello everyone!
I was giving a try at the task of creating and linking the npm package to the Sealious playground template. (Task details)
I have found a solution that works for me, but I would like to hear your opinion, especially regarding its performance on Linux systems.
The following command should clone the template and install its dependencies:
npm init sealious-app
And if you’re interested about the code, here I will place a link to the github project. Takes you to the file I added: Link to github proyect
I am open to any comment or correction, probably there are ways of making it more efficient
Well, I noticed that I was uploading more files than needed, so I removed all but the executable “bin” one.
It clones perfectly the app, but it cannot open the folder because recieves its name as “undefined”:
First of all, the repository is hosted on GitHub - we host all Sealcode code on Sealhub. I’ve created a small repository using Module Starter · module-starter
For ease of code review, please move the functionality that you’ve coded there into the new repository, commit the changes, and don’t push those - submit them for review following the Coding and review workflow.
The code uses typescript you need to run npm run build every time you make changes to TS code, or you can run npm run build -- --watch in a separate terminal to automatically build every time you make changes.
You can test your code without publishing it to npm, just by running the main executable with the node command.
cd /tmp
node /path/to/your/repo/lib/index.js
The repo that I’ve created for you contains the minimal amount of boilerplate, thanks to that it should be close to being as performant as possible
I have added a file named “cli.js” that is meant to do the job. Also I included a line on the package.json that would execute it when using the npm function. Yet to upload to npm!
Nice! One thing before I move on with code review - this npm init thing should live in a clone of module-starter, not in module-starter itself. Please move your changes to a clone, so it can have its own independent identity. For your convenience, I’ve forked module starter. To move your changes to that fork, please follow these steps:
cd ~
git clone ssh://git@hub.sealcode.org/source/create-sealious-app.git
Then, copy the changed files to ~/create-sealious-app, and run arc diff according to the regular workflow