Skip to content

Commit

Permalink
Merge pull request #2 from codersmedia/master
Browse files Browse the repository at this point in the history
Corrected README and allowed import of the const
  • Loading branch information
webda2l authored Dec 4, 2019
2 parents 351d1c6 + db2051a commit c32e447
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@ Manage your Symfony Form collection simply with vanilla JS

## Install

As first thing you need to pull the package using yarn or npm

```
yarn add @a2lix/symfony-collection
```
or
```
npm install @a2lix/symfony-collection
```

Then you can either import it in your files using ES6
```
yarn install @a2lix/symfony-collection or npm install @a2lix/symfony-collection
import a2lix_lib from '@a2lix/symfony-collection/src/a2lix_sf_collection';
```

or symlink/copy/move it in a folder and reference it directly in a `script` tag

## How to

After loading the dist version of **a2lix_sf_collection.min.js** file, init a2lix_lib.sfCollection, optionnaly with custom configuration.
After you loaded the dist version of **a2lix_sf_collection.min.js** file or imported through ES6 method, init a2lix_lib.sfCollection, optionnaly with custom configuration.

Default configuration:

Expand Down
2 changes: 1 addition & 1 deletion dist/a2lix_sf_collection.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/a2lix_sf_collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,6 @@ a2lix_lib.sfCollection = (() => {
return {
init
}
})()
})();

export default a2lix_lib;

0 comments on commit c32e447

Please sign in to comment.