Browse Source

📝 Add instructions to install for ember

Added some instructions to install this package and use it in an EmberCLI app.

I came across other unmaintained shims to do this, but they seemed unnecessary. I think updating the docs here will help people who are looking for framework-specific solutions.

If there is a better place for these docs please let me know and I'll move them there.
pull/429/head
Tristan Toye 7 years ago committed by GitHub
parent
commit
34885d5658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 42
      README.md

42
README.md

@ -40,9 +40,49 @@ Get Started @@ -40,9 +40,49 @@ Get Started
Use [papaparse.min.js](https://github.com/mholt/PapaParse/blob/master/papaparse.min.js) for production.
For usage instructions, see the [homepage](http://papaparse.com) and, for more detail, the [documentation](http://papaparse.com/docs).
For detailed usage instructions, see the [homepage](http://papaparse.com) and, for more detail, the [documentation](http://papaparse.com/docs).
### Installing for EmberCLI
Installing with npm: `npm install papaparse --save`
Installing with yarn: `yarn add papaparse`
#### Use in a Single File
Import Papa Parse where you need it at the top of your files:
```
import Papa from 'npm:papaparse';
```
Follow docs as normal.
#### Use Globally
To import into your project call in `ember-cli-build.js`:
```
module.exports = function(defaults) {
...
// PapaParse
app.import('node_modules/papaparse/papaparse.min.js');
return app.toTree();
};
```
Update your `.eslintrc.js` to avoid linting errors:
```
module.exports = {
globals: {
"Papa": true
}
};
```
Follow docs as normal to use anywhere in your ember app.
Tests
-----

Loading…
Cancel
Save