Comments (13)
Just a first guess, but it seems that the github version won't work unless you do one of the following:
- manually compile ng-grid after you install with jspm
- write tricky amounts of meta properties (shims) for all the files so they are loaded in the proper order. You can start by defining
main
in your override to be that last file that needs to load, then make a shim for this file and list it's dependencies, then walk up the dependency tree, adding entries for all the other files (i.e. constants.js depends on bootstrap.js, and bootstrap.js is at the top of the dependency tree). - Hope that the feature in jspm/jspm-cli#160 gets implemented, then add the build config to your package override. @guybedford :D
- Use the npm endpoint.
- Use the bower endpoint, if it exists (I didn't check)
You're in luck. You can use the npm endpoint because the NPM version of ng-grid ships with everything all built for you in the build
folder. The bower version if it exists might also have things pre-built, but to use a bower endpoint with jspm you'll need to install jspm-bower.
For the npm endpoint option, use an override something along the lines of:
{
"main": "build/ng-grid",
"dependencies": ["angular"],
"shim": {
"build/ng-grid": {
"deps": ["angular"]
}
}
}
Then after you've installed it from the npm endpoint using that override, you can
import "ng-grid";
or
require("ng-grid");
depending on which module loading style you're using.
from registry.
Thanks for the help, but I believe the version in npm is 2.0.1 and was last updated 2 years ago. It looks like I'll have to take one of the other routes.
I believe that jspm-bower
is not maintained and is probably out-of-date since the recent jspm endpoint API changes. Until jspm-bower
is updated, I'm not sure it is a viable solution, even though I believe [email protected] is available via bower.
I assume it currently is not possible to run npm install; grunt build
as a jspm postinstall script? This would mean downloading the full repo.
It may be easier to just download and build this dependency and manually put it into my project instead of installing it via jspm.
from registry.
This is because of https://github.com/angular-ui/ng-grid#how-can-i-test-30.
I managed to dig a little deeper and if you follow the repository in the bower.json it takes you to this repo - https://github.com/angular-ui/ui-grid.info/tree/v3.0.0-rc.12.
So you should be able to do jspm install angular-ui/[email protected]
.
from registry.
Closing for now, updates on this welcome.
from registry.
@guybedford Just wanted to point out here (and that @tauren mentioned) jspm post install scripts to the rescue.
from registry.
I was able to install newest RC of ui-grid using @guybedford s suggestion above, however I imagine I need to provide a override to point to the main file similar to what @trusktr suggested?
Any update on how to integrate this library using jspm?
from registry.
@MikeJoyce19 yes exactly, I'd suggest following an example override like https://github.com/jspm/registry/blob/master/package-overrides/github/angular-translate/bower-angular-translate%402.5.2.json for installing this. You can create that file locally and then install via jspm install angular-ui/[email protected] -o override.json
. Just let me know if you need further assistance.
from registry.
Thanks @guybedford I actually just had that moment of clarity where overrides and all that make complete sense!
from registry.
Has anyone gotten this to work recently?
jspm install npm:angular-ui-grid
fails with:
Looking up npm:angular-ui-grid
Updating registry cache...
Downloading npm:[email protected]
warn Error on processPackageConfig
ReferenceError: ui is not defined
at NPMLocation.processPackageConfig (C:\WCTK-CVE\workspace\Stores\WebProjects\teststudentinfo\node_modules\jspm-npm\lib\npm.js:274:7)
at C:\WCTK-CVE\workspace\Stores\WebProjects\teststudentinfo\node_modules\jspm\lib\registry.js:117:30
at lib$rsvp$$internal$$tryCatch (C:\WCTK-CVE\workspace\Stores\WebProjects\teststudentinfo\node_modules\rsvp\dist\rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (C:\WCTK-CVE\workspace\Stores\WebProjects\teststudentinfo\node_modules\rsvp\dist\rsvp.js:1048:17)
at C:\WCTK-CVE\workspace\Stores\WebProjects\teststudentinfo\node_modules\rsvp\dist\rsvp.js:331:11
at lib$rsvp$asap$$flush (C:\WCTK-CVE\workspace\Stores\WebProjects\teststudentinfo\node_modules\rsvp\dist\rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:419:9)
at process._tickCallback (node.js:348:13)
warn Error processing package config for npm:angular-ui-grid.
err Error processing package config for npm:angular-ui-grid.
warn Installation changes not saved.
And the github versions are not built, so there's nothing to shim unless you manually build. Is that still the best approach?
from registry.
@nlwillia thanks that's a bug I've fixed in jspm/npm@681a964 pending release.
from registry.
Thanks! After merging the warning fix in my local jspm, I was able to get this working with:
jspm install npm:angular-ui-grid -o "{main: 'ui-grid.min', shim: { 'ui-grid.min': { deps: ['./ui-grid.min.css!']}}, dependencies: { 'angular': '*' }}"
from registry.
@nlwillia thanks for the update. If you'd like to check that into the registry a PR here is always welcome.
from registry.
On reviewing this, I realized that I missed the fact that what's in the registry is not github:angular-ui/ui-grid
, but github:angular-ui/bower-ui-grid
. That project has the policy of deploying to both npm and a parallel bower- github project, so the current registry binding should work with the exception that they've chosen to not shim in the css dependency.
from registry.
Related Issues (20)
- Difference between Jenkins and local build HOT 7
- Slow/flaky npm.jspm.io registry HOT 7
- intro.js overrides? HOT 1
- npm Debug package override not applying HOT 3
- some fetch errors while making ts bundle HOT 1
- Latest d3 breaks jspm install HOT 3
- registry CI failure caused by transitive dependency update
- GitLab endpoint? HOT 1
- I'm confused by the module format documentation in the wiki HOT 2
- Is there a way in my package.json to tell JSPM not to install a specific dependency? HOT 14
- Mapping a dependency to `@empty` changes the import path
- Bootstrap install fails HOT 5
- `jspm install` not outputting anything in Windows bash
- React Router Dom 404
- new HOT 1
- Question: how much can I use dev.jspm.io? HOT 2
- kasperlewau.github.io/registry is not found HOT 1
- Licensing information. Can this project make it explicit?
- @shopify/app-bridge-utils is missing all new versions for the last 9 months HOT 2
- Self-hosting JSPM? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from registry.