-
Notifications
You must be signed in to change notification settings - Fork 36
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
Create brjsify command #1611
Comments
@trueadm, do you think this command would meet your needs? |
@dchambers Looks good, my only concern is how modules in |
Items 1, 2, 3 & 6 have been completed so far. 4 & 5 are less important, and can be done later, and 8 requires some discussion with the team since it's affected by #1621. For the time being, I'm going to work on item 7. |
My plan for creating automated tests for brjsify is as follows (I'm not sure when I'll next be able to look at this): Create an inner
Regarding the original items for this issue, Items 7 & 8 were completed yesterday, and 4 & 5 can be done later, so this is the main bit of work remaining on this issue. |
We should create a
brjsify
command that allows developers to create a simple project containing all of the NPM dependencies they wish to use within BRJS, for example:which then allows them to BRJSify these libraries, and any transitive dependencies, to a given BRJS target directory, for example:
brjsify ~/dev/brjs
This would work as follows:
dependencies
inpackage.json
to determine the list of libraries that will be exported.main
to thesrc
directory of the exported library.src/index.js
file that re-exports whatevermain
points to.@brjs/presenter
) are namedbrjs-presenter
, but have arequirePrefix
of@brjs/presenter
.@brjs
->@br
@<scope>/<lib>
-><scope>/<lib>
(e.g.@caplin/trading
->caplin/trading
)<require-prefix>/modules/<require-suffix>
-><require-prefix>/<require-suffix>
(e.g.br/presenter/modules/PresentationNode
->br/presenter/PresentationNode
)Within BRJS, this will require us to add support for
index.js
files that allow us to define the root require-path.Conundrum 1:
What about BRJS libraries that are migrated to NPM, that don't naturally have a
main
entry, but where everything needs to be exported?Conundrum 2:
What about the fact that we don't currently support require-paths with characters that can't be supported by NamespacedJs code?
The text was updated successfully, but these errors were encountered: