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

Add note how to install #54

Open
MartinMuzatko opened this issue Nov 29, 2017 · 6 comments
Open

Add note how to install #54

MartinMuzatko opened this issue Nov 29, 2017 · 6 comments

Comments

@MartinMuzatko
Copy link

npm install
and
require('css-grid-polyfill')

@Sideness
Copy link

Sideness commented Dec 7, 2017

I didn't find anything in npm packages. Is it available?

@MartinMuzatko
Copy link
Author

I am not sure if it is installable at all. I couldn't find a way.. Looking at the package.json it looks like it is called css-polyfills.

@Sideness
Copy link

Sideness commented Dec 7, 2017

I'll keep trying to install it (or just make it work) in the next hours. If I find anything, I'll let you know!

@zendu
Copy link

zendu commented Dec 7, 2017

There is no npm package. Just include js file in old way.

@Sideness
Copy link

Sideness commented Dec 7, 2017

Yes. I just did that and it worked!
I added in my root react component

 componentDidMount(){
      injectTapEventPlugin();
      let script = document.createElement('script');
      script.src = "css-polyfills.min.js";
      script.type = "text/javascript";

      document.getElementsByTagName('body')[0].appendChild(script);
  }

And i did the trick.
Good luck :)

@FremyCompany
Copy link
Owner

FremyCompany commented Dec 7, 2017

I would indeed recommend to use the script directly. There is a bower port courtesy of #24 but I don't think it is entirely up to date (probably not).

At the same time, it's a good time to remind people that the project currently isn't actively maintained by anyone so using this in production should be really done with caution only.

IMPORTANT NOTE: The Grid specification has undergone several major changes since this polyfill was written, and I have not had time to work on keeping the polyfill up to date. I welcome contributions and am ready to help, but I do not have time to commit on fixing issues myself at this time.

I might have some time during the holiday period to finish the work of some of the pull requests that have been submitted but not entirely ironed out by their authors, so there might be an update coming that would help us bring this closer to the current spec, but there is still a fair amount of work remaining.

Be cautious out there ;)

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

No branches or pull requests

4 participants