Commit 416d3524 authored by mattwire's avatar mattwire
Browse files

Distribute libraries with extension

parent 8f275368
......@@ -13,9 +13,12 @@ The extension is licensed under [AGPL-3.0](LICENSE.txt). sweetalert2 is availabl
## Installation
If installing from source, run `npm install`.
Install as a regular extension.
Otherwise, install as a regular extension.
## Packaging / Updating
1. If updating the sweetalert libraries, run `npm install`.
1. Then copy `node_modules/sweetalert2/dist/sweetalert2*.css ./css` and `node_modules/sweetalert2/dist/sweetalert2*.js ./js`
## Usage
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -139,8 +139,8 @@ function sweetalert_civicrm_entityTypes(&$entityTypes) {
*/
function sweetalert_civicrm_buildForm($formName, &$form) {
Civi::resources()
->addStyleFile('sweetalert', 'node_modules/sweetalert2/dist/sweetalert2.min.css')
->addScriptFile('sweetalert', 'node_modules/sweetalert2/dist/sweetalert2.min.js');
->addStyleFile(E::SHORT_NAME, 'css/sweetalert2.min.css')
->addScriptFile(E::SHORT_NAME, 'js/sweetalert2.min.js');
}
/**
......@@ -148,6 +148,6 @@ function sweetalert_civicrm_buildForm($formName, &$form) {
*/
function sweetalert_civicrm_pageRun(&$page) {
Civi::resources()
->addStyleFile('sweetalert', 'node_modules/sweetalert2/dist/sweetalert2.min.css')
->addScriptFile('sweetalert', 'node_modules/sweetalert2/dist/sweetalert2.min.js');
->addStyleFile(E::SHORT_NAME, 'css/sweetalert2.min.css')
->addScriptFile(E::SHORT_NAME, 'js/sweetalert2.min.js');
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment