Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I point my project's package.json at a fork of primeNg? What are the prepublish steps? #818

Closed
JakeSummers opened this issue Aug 31, 2016 · 2 comments

Comments

@JakeSummers
Copy link
Contributor

PrimeNg is missing some key functionality that I require so I have forked the repo (and submitted a pull request ). I am trying to point my project at my fork until the PR is accepted.

I have read through the devDependencies and GitHub URLs section of the package.json doc, but I can't figure out how to do the prepublish step.

This is what I have done so far...

I tried updating my package.json (in my project) from this:

"dependencies": {
    ...
    "primeng": "1.0.0-beta.13",
    ...
}

To this:

"dependencies": {
    ...
    "primeng": "JakeSummers/primeng.git#d35f5635a216005018bed89d249816e0f65f68f6
    ...
}

Looking in my node_modules directory we see that it is essentially empty:

[Aug-30 18:04][node_modules]$ tree primeng/
primeng/
├── LICENSE.md
├── package.json
└── README.md

0 directories, 3 files

Before the change to my package.json, the directory contained the following:

primeng/
├── components
│   ├── accordion
│   │   ├── accordion.d.ts
│   │   ├── accordion.js
│   │   └── accordion.js.map
│   ├── autocomplete
│   │   ├── autocomplete.d.ts
│   │   ├── autocomplete.js
│   │   └── autocomplete.js.map
│   ├── breadcrumb
│   │   ├── breadcrumb.d.ts
│   │   ├── breadcrumb.js
│   │   └── breadcrumb.js.map
│   ├── button
│   │   ├── button.d.ts
│   │   ├── button.js
│   │   └── button.js.map
│   ├── calendar
│   │   ├── calendar.d.ts
...
├── LICENSE.md
├── package.json
├── primeng.d.ts
├── primeng.js
├── primeng.js.map
├── prod
│   ├── application.js
│   ├── polyfills.js
│   └── vendor.js
└── README.md

62 directories, 195 files

Any pointers or examples would be appreciated. Thanks!

I cross posted this question to stackoverflow.

@JakeSummers
Copy link
Contributor Author

JakeSummers commented Aug 31, 2016

Update - but not a full solution

One reason that I am not getting anything when I try to pull in my repo is that the .npmignore file contains the following:

[Aug-31 11:28][primeng]$ cat .npmignore 
# dependencies
node_modules

# demo
showcase
index.html

# typescript
*.ts
!*.d.ts

# git
.git
.gitignore

# type definition
typings
typings.json

# config
tsconfig.json
webpack.config.js

# misc
*.log

Removing the contents of this file causes the the entire repo to get pulled into the node_modules folder. Great.

I think now there are two options...

  • Build the primeNg package as part of my project
  • (or the better option) Add a prepublish hook into the package.json of primeNg.

I would still be very interested to see how the PrimeFaces team is publishing this.

This is a pretty good article (relating to babble) on how to publish an npm module

@cagataycivici
Copy link
Member

cagataycivici commented May 29, 2017

Please use forum for "how-to" cases like these, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants