-
-
Notifications
You must be signed in to change notification settings - Fork 190
Improve JS facing packaging #38
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
Comments
Re point 3, this would impact only |
I think a blacklist is more appropriate for a boilerplate, if someone wants to adds more js/css files, they already have to modify the appropriate |
One thing to note is that there's not really a strong reason to publish Dash components on the NPM registry as far as I know, other than just making them available to a CDN like unpkg. What's the use-case for a non-Dash JS project to depend on a dash-component NPM module? |
(and by the by, I think that serving the components locally by default makes more sense than relying on a CDN by default, thereby even further removing the need for NPM-publishing Dash components ;) |
@nicolaskruchten So set publish on npm to false by default ? |
hmmm good question. I would tend to vote yes personally, as it's not really required if serving locally is the default. |
@nicolaskruchten I agree with you that for most components npm publish seems mostly to be for the CDN. The dash-table is meant to be useable in a non-Dash environment but that's the exception more than the norm at the moment -- and if that's the case it makes some of the points above moot. |
Yes it does seem that dash-table is the project with the unique requirements in this context. |
Uh oh!
There was an error while loading. Please reload this page.
Ran into some issues packaging the dash-table for JS consumption and would like to suggest making these modifications to the boilerplate in order to make the npm packages cleaner.
This makes
import MyComponent from 'my-component'
return the expected value (with libraryTarget='umd', most probably the component itself)Default value could be
This would cover future bundle.dev.js, bundle.min.js, etc.
Package.json and *.md files are picked up automatically by npm.
This allows
npm publish
to pick up the file in {{cookiecutter.project_shortname}} correctly (otherwise since a package.json is present, the folder's content will be ignored -- configuring .npmignore to ignore that package.json will not modify this behavior)Do not promote the use of shrinkwrap for fully self-contained builds -- the shrinkwrap will override the peer & dev dependencies behavior and will install on wrapped dependencies on
npm install
Make it optional to set libraryTarget to 'umd' (maybe this is too specific to dash-table)
And modify react and react-dom external dependency resolution to cover the various use cases
The text was updated successfully, but these errors were encountered: