conveyal / otp.js

OTP Javascript Client & Data Bindings
MIT License
19 stars 20 forks source link

Move from component to webpack #94

Closed ccyrille closed 4 years ago

ccyrille commented 5 years ago

Executing a make build on the master, even by removing disappeared dependencies like kpwebb/select2, I got the following :

installed : component/querystring@2.0.0 in 495ms
   installed : components/handlebars.js@v4.1.2 in 471ms
   installed : component/trim@0.0.1 in 531ms
   installed : component/type@1.1.0 in 584ms
   installed : es-shims/es5-shim@v4.5.13 in 666ms
   installed : es-shims/es6-shim@0.35.5 in 545ms
   installed : trevorgerhardt/haversine@master in 478ms
     install : complete

       build : resolved in 21ms

fs.js:128
  throw new ERR_INVALID_CALLBACK();
  ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:128:9)
    at Object.writeFile (fs.js:1158:14)
    at /Users/cyrille/WORKSPACE/otp.js/node_modules/component/bin/component-build:225:8
    at /Users/cyrille/WORKSPACE/otp.js/node_modules/component-build/lib/styles.js:14:5
    at /Users/cyrille/WORKSPACE/otp.js/node_modules/component-builder/lib/builders/builder.js:142:9
    at next (/Users/cyrille/WORKSPACE/otp.js/node_modules/chanel/lib/proto.js:258:5)
    at Function.onevent (/Users/cyrille/WORKSPACE/otp.js/node_modules/chanel/lib/proto.js:194:9)
    at Object.onceWrapper (events.js:277:13)
    at Function.emit (events.js:189:13)
    at /Users/cyrille/WORKSPACE/otp.js/node_modules/chanel/lib/proto.js:142:10
make: *** [build] Error 1

Problem appears to be at the heart of component package manager, which is not maintained since 2015 (see https://github.com/componentjs/component/issues/639). I decided to migrate the whole project to webpack, sticking as much as possible to the current implementation.

This also solve the following issue : https://github.com/conveyal/otp.js/issues/91

ccyrille commented 5 years ago

Hi @landonreed, thanks for your nice review ! I agree with all the recommandations you made, and pushed the associated changes. Don't hesitate to come back to me if needed...

ccyrille commented 4 years ago

Sorry to bother you @landonreed but any chance you can review this PR ? Do you need me to do additional work from me ?

ccyrille commented 4 years ago

Hi @demory @trevorgerhardt, sorry to bother you but I am stuck here. I have put some effort making the otp.js usable / maintainable again by moving to webpack, but I haven't here from Landon since then. Could you help ?

trevorgerhardt commented 4 years ago

Hi @ccyrille. We no longer maintain this project as we don't use it internally anymore. It appears the OpenTripPlanner project has mostly moved on from it also with https://github.com/opentripplanner/otp-react-redux and https://github.com/opentripplanner/otp-ui.

The next merged PR should probably be an update relating to the status of this project pointing users to more active client side OTP libs and a more up to date repo for this project.

ccyrille commented 4 years ago

Hi @trevorgerhardt, hoping that I didn't work for nothing :

Thanks, Cyrille