Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Handle scoped packages when loading Cljs from node dirs #300

Merged
merged 2 commits into from
Nov 9, 2017

Conversation

arichiardi
Copy link
Collaborator

@arichiardi arichiardi commented Oct 27, 2017

The inferNodeModulesClasspathLibs function becomes recursive so that we can
skip directories that don't contain package.json (like scoped package ones).

My Javascript is super poor and it took actually quite a bit to implement this one,
All the changes in the review on styling will be accepted with no barf 😄

@arichiardi
Copy link
Collaborator Author

I could not make pass the linter... isn't a little bit too aggressive with all these types 😄 ?

@arichiardi arichiardi force-pushed the cljs-scoped-load branch 4 times, most recently from 354a414 to 4901d00 Compare November 1, 2017 20:23
@arichiardi
Copy link
Collaborator Author

Yey! All green! 😉

@arichiardi arichiardi force-pushed the cljs-scoped-load branch 4 times, most recently from 4e2d4c0 to 23a07ba Compare November 9, 2017 17:51
src/js/lumo.js Outdated
@@ -10,36 +10,108 @@ import JSZip from 'jszip';
import ArrayStream from './array-stream';
import * as util from './util';

function inferNodeModulesClasspathLibs(): string[] {
const result = [];
type PackageJsonType = {|
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong. {| |} refers to a closed object, you want {}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh thanks! Sorry not a flow master I blindly copied your definitions

src/js/lumo.js Outdated
return libPath;
}

/* eslint-enable flowtype/no-weak-types */
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm

The inferNodeModulesClasspathLibs function becomes recursive so that we can
skip directories that don't contain package.json (like scoped package ones).
@anmonteiro anmonteiro merged commit 3b8173f into anmonteiro:master Nov 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants