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
work without npm, grunt and all that stuff #8
Comments
I'm assuming I have to convert the provided scss file to css too and include that in. |
Hi @pjebs thank you for the feedback – tbh I don't plan to make a stand-alone version. You are going to use a module loader anyway soon :-) |
Can you give some clues on how I can do it? |
When I look at your code, it looks like only a few lines of code need to be changed. |
please help me. |
@pjebs we need to make a webpack config to expose |
In that case, how can I use the compiled version you have in the dist folder: DayPicker.js and utils.js I included those files in my html file. Chrome keeps saying:
What other files would I need to include? |
Hi @pjebs, you could use browserify or webpack to minify the lib into a single file and expose it as global var. |
I attempted to use browserify. I don't think your code works with React 0.13 anymore. I cd into src directory. then ran sudo browserify DayPicker.js -o pj.js And it spits out this error:
|
@pjebs the src is written in babeljs, so if you want to compile from the source you need to use babelify. You go better with the dist version:
actually you shouldn't need to run it with Beware this won't be enough for your goal, because you need to make the module accessibile from the global scope (honestly i have no idea on how to make this with browserify). But again I suggest you to adopt the module from npm, and use browserify or webpack for writing your app – instead of messing up with this single module. You need to read some docs before, but it's worth the time spent. |
HI There,
How Can I make this work without any of those fancy node.js dependencies.
I'm new to react. Im just including the standard react.js file in my html file. I'm although using the JSX transformer (which I will get rid of later).
I just want to drop the js files (DayPicker.js and utils.js) and possibly moment.js (I noticed you wrote in a issue that it's not strictly required).
I took out the export and import statements from the Daypicker and utils file but it still isn't working.
The text was updated successfully, but these errors were encountered: