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 should I use modified source code? #3582

Closed
jimmyzzzzzzz opened this issue Feb 28, 2017 · 3 comments
Closed

how should I use modified source code? #3582

jimmyzzzzzzz opened this issue Feb 28, 2017 · 3 comments

Comments

@jimmyzzzzzzz
Copy link

jimmyzzzzzzz commented Feb 28, 2017

I downloaded some files form GitHub's master branch yesterday and modified their codes. Later, I tried to put it back to node_modules/parse-server/lib but they are incompatible. for example in Auth.js, the first 2 lines in GitHub's version are
var Parse = require('parse/node').Parse;
var RestQuery = require('./RestQuery');
but the first 2 lines in node_modules/parse-server/lib folder are
'use strict';
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }. I'm using 2.3.6.
What is the preferred way to use modified parse-server source, directly modify node_modules/parse-server/lib or copy src folder to my project?

@natanrolnik
Copy link
Contributor

Fork parse-server, and point in your package to use your own fork.

@acinader
Copy link
Contributor

acinader commented Feb 28, 2017

@jimmyzzzzzzz the parse source code is transpiled by babel.

Here's my package.json from an old branch that I needed to work on a remote machine: https://github.com/acinader/parse-server/blob/npm-git-workable/package.json

note that on line 66 I added the postinstall to build after npm has installed parse-server.....

Hopefully that helps some?

@jimmyzzzzzzz
Copy link
Author

jimmyzzzzzzz commented Mar 1, 2017

@acinader thanks a lot for your info on babel. it helped me a lot.
I modified package.json for 2.3.6 so that it will work with npm install.
https://gist.github.com/jimmyzzzzzzz/9d259f916cbbf58f7b8f3b9a04d72975
in case anyone else needs to install the newest version from own private repo.

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

3 participants