Skip to content

how should I use modified source code? #3582

Closed

Description

@jimmyzzzzzzz

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?

Activity

  1. natanrolnik commented on Feb 28, 2017

    @natanrolnik
    Contributor

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

  2. acinader commented on Feb 28, 2017

    @acinader
    Contributor

    @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?

  3. jimmyzzzzzzz commented on Mar 1, 2017

    @jimmyzzzzzzz
    Author

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions