Giter Site home page Giter Site logo

Comments (10)

12wrigja avatar 12wrigja commented on June 1, 2024

I can't reproduce this:

tmp/closure/closure-library$ npm install
npm WARN deprecated [email protected]: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated [email protected]: This package is unmaintained. Use @sinonjs/formatio instead
npm WARN deprecated [email protected]: This package has been deprecated in favour of @sinonjs/samsam
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade

> [email protected] prepare
> npm run gen_deps_js

# This 'prepare' script is generating deps.js on install.
> [email protected] gen_deps_js
> node scripts/generate_deps_js > ./closure/goog/deps.js


added 106 packages, and audited 108 packages in 19s

22 packages are looking for funding
  run `npm fund` for details

11 vulnerabilities (1 moderate, 4 high, 6 critical)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
jameswr:tmp/closure/closure-library$

from closure-library.

anhminhtran235 avatar anhminhtran235 commented on June 1, 2024

@12wrigja Could you check if deps.js was created? I got the same terminal output as you did but deps.js was not generated

from closure-library.

12wrigja avatar 12wrigja commented on June 1, 2024

closure/goog/deps.js does exist and contains what look like relevant dependency management lines.

Can you try running npm run gen_deps_js and seeing if closure/goog/deps.js will be generated for you? It does for me.

from closure-library.

anhminhtran235 avatar anhminhtran235 commented on June 1, 2024

@12wrigja Oh my bad. Looks like deps.js was generated. My VS Code just didn't see it until I gave it the full path closure/goog/deps.js

I still have one issue though. I followed the Closure tutorial but got an error:

image

It's supposed to display "Hello World" on the screen. When I used the latest release of closure library, it worked (but not if I pull code from the latest commit on master)

Here is my code in case you want to take a look at it. I basically just copied from the tutorial: https://github.com/anhminhtran235/google-closure-playground

from closure-library.

12wrigja avatar 12wrigja commented on June 1, 2024

Looking at that repo I don't think the link to the closure-library repo is setup properly - it's not a proper submodule link.

Why do you want to link against our repository directly? We offer no stability guarantees this way, and you are far better off consuming our NPM packages.

from closure-library.

anhminhtran235 avatar anhminhtran235 commented on June 1, 2024

I pushed my code to git just to show you the folder structure as well as the hello.html and hello.js files. For some reason when the code is pushed to github, it links to the closure-library like that. Here's what it looks like on my local computer

image

from closure-library.

12wrigja avatar 12wrigja commented on June 1, 2024

I see.

I think what you want to do instead is something like this:

Create a new NPM project:

npm init -y

Install the Closure Library NPM package (https://www.npmjs.com/package/google-closure-library):

npm install --save google-closure-library

Then, change your hello.html file to point to base.js and deps.js from within the node module package:

<script src="closure-library/closure/goog/base.js"></script> <-- old

becomes

<script src="./node_modules/google-closure-library/closure/goog/base.js"></script>

from closure-library.

anhminhtran235 avatar anhminhtran235 commented on June 1, 2024

That makes sense. That would use the release version so I think it'd work. Do you know who's maintaining this doc? It'd be super helpful if somebody can change the instruction from cloning this repo to installing from npm. It took me quite a while to figure out that the latest release would work for me. Thank you for your help!

from closure-library.

12wrigja avatar 12wrigja commented on June 1, 2024

I think I've found out where that doc is being maintained internally, so I'll see if I get that updated.

from closure-library.

anhminhtran235 avatar anhminhtran235 commented on June 1, 2024

Perfect! Thank you

from closure-library.

Related Issues (20)

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.