Giter VIP home page Giter VIP logo

Comments (3)

fwextensions avatar fwextensions commented on August 30, 2024 2

unpkg.com is a great CDN that lets you easily reference any npm package via a <script> tag. You can see all of the built files here: https://unpkg.com/browse/quick-score/dist/

You can either download the code and use the copy in your website or link to it. quick-score.esm.min.js is a minified ES6 module, while quick-score.min.js is a UMD module. It'll export everything on a quickScore global if you're not using an AMD packager like RequireJS.

If you want to link it on the CDN, you'll probably want to include a version number in the URL, like https://unpkg.com/[email protected]/dist/quick-score.min.js.

I'm curious what errors you're getting. If you have npm installed, you should be able to run these commands to build the files in the dist/ folder:

npm install quick-score
npm run build

from quick-score.

fwextensions avatar fwextensions commented on August 30, 2024 1

Glad unpkg will work for you.

I was wrong about the commands. Not sure what I was thinking. All you need to do is npm install quick-score, and then the built files will be in node_modules/quick-score/dist, the same ones that I mentioned above as available on unpkg. You can then copy whichever version of the built lib you want to use over to your project.

from quick-score.

Jos512 avatar Jos512 commented on August 30, 2024

Thanks for the quick and thorough reply! I didn't know that unpkg automatically (?) makes JavaScript files from repositories, although I did hear about unpkg earlier.

This solves my issue since I can use those files. 👍


For completeness, if I run those two commands, I get this output:

C:\Temp\QuickScore-test>npm install quick-score
C:\Temp\QuickScore-test
`-- [email protected]

npm WARN enoent ENOENT: no such file or directory, open 'C:\Temp\QuickScore-test\package.json'
npm WARN QuickScore-test No description
npm WARN QuickScore-test No repository field.
npm WARN QuickScore-test No README data
npm WARN QuickScore-test No license field.

C:\Temp\QuickScore-test>npm run build
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! path C:\Temp\QuickScore-test\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open 'C:\Temp\QuickScore-test\package.json'
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Temp\QuickScore-test\package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Temp\QuickScore-test\npm-debug.log

I'm pretty sure this has nothing to do with QuickScore but rather with my Node version, which is pretty old. Unfortunately there are several legacy projects on my computer that I still need to maintain so I'm very much off putting doing an update and breaking all kinds of things.

I'll close the issue since my original query is solved and you don't need to look further into this. I'm all set. 🙂

from quick-score.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.