How do I install this widget from GitHub? - macos

I am completely unfamiliar with GitHub.
I am trying to install this Decimal Clock widget from GitHub (https://github.com/XXIIVV/clock) on my Mac.
I have downloaded and git cloned the files. I have tried using npm install and npm run build to no avail.
When I ran npm install (as instructed in the link), it returns: "up to date, audited 3 packages in 2s, found 0 vulnerabilities"
When I run npm run build_osx (as instructed in the link), I get this error: Missing script: "build_osx"
The files in the folder are:
CNAME, PREVIEW.jpg, index.html, pascal (folder), LICENSE.md, README.md, index.js, web (folder)
Inside the pascal folder is "neralie.pas"
I have been trying to install it for days. Perhaps step-by-step instructions would be helpful.

Related

why does npm gives me warning when i try to install jquery-csv library using VS in ubuntu

I'm trying to install jquery-csv library
with visual studio in ubuntu for the first time
the instruction says that to install package I should run:
npm i jquery-csv
however whenever I tried it npm warns me that it can't find package.son:
is this something i'm expected to see in a normal package installation?
if not, please help me with some instructions
The error you're getting suggests you aren't using a Node.js project and don't have a package.json file.
If this is an existing browser-based project and you want to add the library, you can download jquery.csv.min.js from here: https://github.com/typeiii/jquery-csv/tree/master/src , and add a client-side (browser) reference in your HTML file as shown on the readme:
<script src="jquery.csv.min.js"></script>
If you're working on a new Node.js project, the first step is to run npm init, see npm init - create a package.json file

I didn't run "Yarn add react-native" to a folder, will I run into issues when starting a project? I'm a noob and am just starting out

I used the CLI to install React Native, Node and Python but was not aware if I needed to save it to a file first.
I ran the yarn command:
➜ ~yarn add <package>
I would get this warning message when running yarn check:
➜ ~ yarn check
warning package.json: No license field
warning No license field
warning "jest-haste-map#fsevents#node-pre-gyp#^0.12.0" could be deduped from "0.12.0" to "node-pre-gyp#0.12.0"
Questions:
1. Do I only ~ yarn add when I start a project?
2. Since I've installed python, node, and react-native without creating a project folder will I run into issues down the road?
3. Do I add the json file with the licenses manually when starting a project with yarn?
4. Am I hopeless? lol
I've tried uninstalling and reinstalling from yarn and updating yarn. Also, I've tried installing python and node from Homebrew to see if that changes anything.
Below is a log of the output from the CLI after running ~ yarn check
Last login: Sat Aug 24 02:21:38 on ttys001
➜ ~ yarn check
yarn check v1.17.3
warning package.json: No license field
warning No license field
warning "jest-haste-map#fsevents#node-pre-gyp#^0.12.0" could be deduped from "0.12.0" to "node-pre-gyp#0.12.0"
success Folder in sync.
✨ Done in 1.99s.
Solution I figured it out! So after poking around I realized that once I started a project I had a yarn.lock and package.json file one level up in the directory where the file was located. What I did was I deleted yarn.lock and package.json associated with the folder in the directory. After that was complete I then went into my project and installed the correct packages.
You're not hopeless. This project may be, you've bitten off waaaay more than you can chew yet.
To answer your main question:
yarn add and it's cousin npm install will install the thing you tell them to in the node_modules folder in the directory you run the command in. The reason it's yelling at you is because usually you'll want to save the thing you installed as a dependency of your project, and you can't do that without a package.json file. You should run npm init to set up the package.json file for your project, then running yarn add will actually save it to the dependencies list so that you have a reproducible. If you have a package.json file already, it sounds like you maybe created it by hand (since it's missing a license field?) rather than have npm set it up for you, which is a bad idea.
Two more things:
React Native is awesome! ...But, it's a tool for people who already have good familiarity with Javascript command line/tooling/ecosystem/coding/React to build mobile apps. It is a lousy choice for a first project if you're just getting started with programming. Building a webpage with React is a lot easier, but even that may be too much.
If you really want to build a React Native app and you just can't wait look at this to get started.
But seriously, learn Javascript then npm then yarn then React then React Native. In that order.

How do I install vuetify directly from github?

When I try with
npm install vuetifyjs/vuetify#v1.5.2
I get "Cannot find package".
UPDATE:
There is a packages folder under which there is a vuetify directory.
I tried npm installing that folder. Everything appeared to go well until I started the dev server.
Now in the console log I see:
[Vuetify] Multiple instances of Vue detected
Seems to be related to https://github.com/vuetifyjs/vuetify/issues/4068 but I cannot tell what the solution is at this point.
I had the same issue to use my own version of Vuetify, waiting for my pull request being accepted.
Here what I did:
I build the vuetify project with my fix.
yarn
yarn build
Then I took the content of 'packages/vuetify' and put it in a new git repository. I remove the .gitignore to be able to commit built files (/es5, /lib, /lib-temp, /dist)
Finally I add this git repository to my project to replace my vuetify version:
npm install git+https://gitlab.com/GITLABUSERNAME/REPOSITORYNAME.git
Looking at the package.json file, the package doesn't have a name property, which it would need to have for you to be able to install it from GitHub.
So the short answer is that you can't install vuetify directly from GitHub via npm.
However, you can install it directly from npm:
npm install vuetify#1.5.2
You can't install vuetify directly from GitHub but you can edit code in 1 component node_modules/vuetify/lib/components/VSlider/VSlider.js Then, you install patch-package and execute path package vuetify Delete node modules and execute yarn to create new node modules Last, yarn serve, you see your code is work
https://www.npmjs.com/package/patch-package

Swagger Editor offline installation

Our company is using swagger to document their API's, currently a couple of developers are using the online swagger editor on their PC's.
I want to move this piece of the design process into our standard development environment, which is in a walled garden without internet access.
How do I go about installing npm and the swagger editor in an offline environment?
There are options to use either RHEL or Windows machines, although Windows is preferable as developers have local admin rights
In short answer is https://swagger.io/docs/swagger-tools/#swagger-editor
git clone https://github.com/swagger-api/swagger-editor.git
cd swagger-editor
npm install
npm run build
npm start
And it will works in your Intranet OK.
npm is not required, you can download the compiled files from the Swagger Editor repository:
index.html
dist\*
and open index.html locally (from the file system) or put the files onto a web server in your network.
With one command with npm/npx:
npx swagger-editor-binary
Download the one of the source releases from swagger-editor's github page (click releases link on the page)
unzip the downloaded source release zip/tar file.
cd into the extracted source dir, type 'npm install' (or if you have some npm mirror module installed, such as cnpm, use 'cnpm install' instead)
Use a browser to open index.html file in the source dir. Or, follow official guide the 'Setup with http-server module from GitHub' section to serve from a local static web server.
PS. You don't need to build the source code unless you want to contribute as written in the 'Contribute' section of the official document.

Heroku buildpack - Installing texlive binary package

I'm trying to install the texlive-full package on heroku through making a custom buildpack. I'm working on django application, so I'm currently using version of heroku-buildpack-python (https://github.com/heroku/heroku-buildpack-python).
According to this tutorial:
https://devcenter.heroku.com/articles/buildpack-binaries
I found a binary package of texlive on http://packages.ubuntu.com/lucid/texlive-binaries (Links in the right column - Download Source Package) and I added these lines of code in python default heroku buildpack in the section #Build time in order to extract and install texlive-full on heroku.
# Build Time
# Switch to the repo's context.
cd $BUILD_DIR
TEXLIVE_BINARY="http://archive.ubuntu.com/ubuntu/pool/main/t/texlive-base/texlive-base_2012.20120611-5.debian.tar.gz"
TEXLIVE_VENDOR="vendor/texlive"
# vendor awesome-vm
mkdir -p $1/$TEXLIVE_VENDOR
curl $TEXLIVE_BINARY -o - | tar -xz -C $1/$TEXLIVE_VENDOR -f -
After pushing the django application to heroku I can see that slug is 58.0 MB big (before it was just 10.0 MB), so it might have added texlive-full binary package to it (which is about 44 MB). However the latex equation on the site is still not showing and the same error appears; (That appears when texlive is not installed)
ValueError at / latex returned code 32512 for formula:
Is there some easier way to install texlive-full on heroku? Or what is the correct notation for installing texlive-full in buildpack or any other kind of debian package?
Based on this buildpack I built my own version: https://github.com/syphar/heroku-buildpack-tex
It installs a small version of TeX-Live 2013 in your slug, and you can extend it by adding your own packages (collections or single packages from CTAN).
Since your (compressed) slug-size is limited to 300 MB on Heroku you can't texlive-full inside your application.
This buildpack worked for me:
https://github.com/holiture/heroku-buildpack-tex
That error code tends to be returned because of problems with your path (https://tex.stackexchange.com/questions/21692/latex-compilation-failure-on-mac-os-x-from-python-script) Follow the last step of the tutorial here https://devcenter.heroku.com/articles/buildpack-binaries and add the directory that your build pack works on to your path.

Resources