npm install and build of forked github repo -
this not totally new question, i've been looking around while , i'm having trouble finding solution.
i'm using module angular app called angular-translate. however, i've had make few small modifications source code working way i'd like, , want persist changes on npm install
. colleague suggested fork repo of source code , point forked repo dependency, i've tried in these ways, e.g.
npm install https://github.com/myrepo/angular-translate npm install https://github.com/myrepo/angular-translate/archive/master.tar.gz
the first gives me directory no build. package.json, .npmignore, , markdown files
-angular-translate .npmignore .nvmrc changelog.md package.json etc
the second npm install
gives me full repo, again don't build when use command npm install angular-translate
. i've seen dicussion of running prepublish script, i'm not sure how when installing modules. i've tried publishing fork own module npm registry, again no build, , i'm not sure that's right thing do...
i apologise ignorance on topic. don't have huge amount of experience npm. love feedback on issue. seems common enough issue when modifications need made package's source code? maybe there's better solution? in advance help.
try npm install <ghusername>/<reponame>
, <ghusername>
github username (without @
) , <reponame>
name of repository. should correctly install it. want use --save
or --save-dev
flag install command save dependency in package.json
.
if isn't working correctly, check contents of .npmignore
file.
don't panic if install command takes long time; installing git repository slower installing npm registry.
edit:
your problem in case, dist/
not committed repo (since in .gitignore
). actual code lives. dist/
built files in src/
before package published npm registry, dist/
never committed repo.
it's ugly, in case have remove dist/
.gitignore
, run:
npm run build git add . git commit git push
(ensure have run npm install
first)
you should able install github.
there might way using postinstall
script, i'm not sure if that's possible; i've never tried it.
Comments
Post a Comment