Skip to content

Instantly share code, notes, and snippets.

@totten
Last active September 15, 2019 03:59
Downloading api4 frontend deps
{
"name": "civipkg/org.civicrm.api4",
"license": "AGPL-3.0",
"require": {
"civicrm/composer-downloads-plugin": "^2.0"
},
"extra": {
"downloads": {
"*": {
"path": "bower_components/{$id}"
},
"js-yaml": {
"url": "https://github.com/nodeca/js-yaml/archive/3.12.1.zip",
"ignore": ["benchmark", "bin", "demo", "examples", "lib", "support", "test"]
},
"bootstrap-css": {
"url": "https://github.com/twbs/bootstrap/releases/download/v3.4.1/bootstrap-3.4.1-dist.zip"
},
"bootstrap-dropdown.js": {
"url": "https://github.com/twbs/bootstrap/raw/v3.4.1/js/dropdown.js"
}
}
}
}
commit fb26e2e372bb1ace4cef0bf68476b045ff888789
Author: Tim Otten <totten@civicrm.org>
Date: Sat Sep 14 20:12:28 2019 -0400
api4Explorer.ang.php - Use new location for js-yaml
diff --git a/ang/api4Explorer.ang.php b/ang/api4Explorer.ang.php
index e00ea09..72462b8 100644
--- a/ang/api4Explorer.ang.php
+++ b/ang/api4Explorer.ang.php
@@ -5,7 +5,7 @@ return [
'ang/api4Explorer.js',
'ang/api4Explorer/*.js',
'ang/api4Explorer/*/*.js',
- 'lib/*.js',
+ 'bower_components/js-yaml/dist/js-yaml.min.js',
],
'css' => [
'css/explorer.css',
commit 48494f7b4a07dc9f436fe1e11eecf211d2699a45
Author: Tim Otten <totten@civicrm.org>
Date: Sat Sep 14 20:13:37 2019 -0400
Load bootstrap files from `bower_components`
diff --git a/js/load-bootstrap.js b/js/load-bootstrap.js
index aff280a..da60cce 100644
--- a/js/load-bootstrap.js
+++ b/js/load-bootstrap.js
@@ -1,7 +1,7 @@
-// Loads a copy of shoreditch's bootstrap if bootstrap is missing
+// Loads a copy of bootstrap.css if it is missing
CRM.$(function($) {
if (!$.isFunction($.fn.dropdown)) {
- CRM.loadScript(CRM.vars.api4.basePath + 'lib/shoreditch/dropdown.js');
- $('head').append('<link type="text/css" rel="stylesheet" href="' + CRM.vars.api4.basePath + 'lib/shoreditch/bootstrap.css" />');
+ CRM.loadScript(CRM.vars.api4.basePath + 'bower_components/bower_components/bootstrap-dropdown.js');
+ $('head').append('<link type="text/css" rel="stylesheet" href="' + CRM.vars.api4.basePath + 'bower_components/bootstrap-css/css/bootstrap.css" />');
}
});
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment