Skip to content
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

box-content-preview not available on NPM #752

Open
addula opened this issue Mar 29, 2018 · 5 comments
Open

box-content-preview not available on NPM #752

addula opened this issue Mar 29, 2018 · 5 comments

Comments

@addula
Copy link

addula commented Mar 29, 2018

Please fill out the following template so we can reproduce and fix your issue as quickly as possible!

Environment:

  • Preview version: 1.37.0
  • Browser name and version: NA
  • Operating system and version: NA

Steps to reproduce the problem:

  1. Go to npm site
  2. check for box-content-preview
  3. not available

What is the expected behavior? (Screenshots can be helpful here)
box-content-preview availability on NPM

What went wrong? (Screenshots can be helpful here)
box-content-preview not available on NPM

Link to application or sample code:

If relevant, link to file (or attach file here):

@jeremypress
Copy link
Contributor

jeremypress commented Mar 29, 2018

Hey @addula,
Thanks for the request. We currently don't support Preview itself being sourced from NPM. Depending on your requirements, you could include ContentPreview from our UI elements library This is available on NPM.

@addula
Copy link
Author

addula commented Apr 2, 2018

Hi @jeremypress I saw box-ui-elements (npm component) which consists box-content-preview too. As per documentation mentioned in box-content-preview, It looks like Box.Preview() is not available and instead Box.ContentPreview() is available which is not documented. It is so much of confusing to a developer like me who is new to Box and looking to develop something based on the limited/incorrect documentation available.
Just FYI, I am using Preview.js and Preview.css files from box-ui-elements which are same as available in box-content-preview repository. Kindly direct me to any documentation which helps in consuming Box in a proper way.

@priyajeet
Copy link
Contributor

priyajeet commented Apr 3, 2018

@addula Unfortunately we only support these two scenerios right now:

1] If you are a React app that can import our react components directly using ES2015 syntax, use UI Elements from NPM https://www.npmjs.com/package/box-ui-elements. Example for this is https://github.com/box/box-content-preview-demo/blob/master/src/index.js. Even if you use this mode, certain scripts are going to come from CDNs. The react wrapper component will auto add <script> tag pointing to our CDNs.

2] If you are not a React app, then you have to use our libraries via a <script> tag as mentioned on our public documentation: https://developer.box.com/docs/box-ui-elements. Example for this is https://codepen.io/box-platform/pen/rmZdjm

We do not have any near term plans to support publishing a pure npm version of preview.

@jeremypress
Copy link
Contributor

I'll keep this open for tracking purposes, as this is a feature request and will most likely come up again.

@addula
Copy link
Author

addula commented Apr 4, 2018

Thank you @priyajeet for detailed info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants