Skip to content

Commit

Permalink
copy missing files from croutonjs (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbraswell authored Jul 13, 2020
1 parent e3c9eb5 commit 37407ff
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ main_server/vendor
bmlt_conversion_tables.php
docs
node_modules
main_server/client_interface/html/crouton*.css
main_server/client_interface/html/crouton*.js
main_server/client_interface/html/croutonjs
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:
- DIST_DIR_GITHUB=dist/github
- GITHUB_RELEASE_FILENAME=bmlt-root-server.zip
install:
- composer install --no-dev
- cd main_server/client_interface/html && npm install && cd ../../../
- make deps
script:
- cp LICENSE.txt main_server && cp .htaccess main_server/vendor
- find ./main_server -type d | xargs chmod 755
Expand Down
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ lint:
lint-fix:
main_server/vendor/squizlabs/php_codesniffer/bin/phpcbf --warning-severity=6 --standard=PSR2 --ignore=vendor --extensions=php --report=full main_server

deps-dev:
composer install --dev

deps:
composer install --no-dev
npm install \
&& cp node_modules/@bmlt-enabled/croutonjs/crouton.css main_server/client_interface/html/crouton.css \
&& cp node_modules/@bmlt-enabled/croutonjs/crouton.min.css main_server/client_interface/html/crouton.min.css \
&& cp node_modules/@bmlt-enabled/croutonjs/crouton.js main_server/client_interface/html/crouton.js \
&& cp node_modules/@bmlt-enabled/croutonjs/crouton.min.js main_server/client_interface/html/crouton.min.js \
&& mkdir -p main_server/client_interface/html/croutonjs \
&& cp node_modules/@bmlt-enabled/croutonjs/*.css main_server/client_interface/html/croutonjs/ \
&& cp node_modules/@bmlt-enabled/croutonjs/*.js main_server/client_interface/html/croutonjs/ \
&& cp -r node_modules/@bmlt-enabled/croutonjs/templates main_server/client_interface/html/croutonjs/templates \
&& cp -r node_modules/@bmlt-enabled/croutonjs/fonts main_server/client_interface/html/croutonjs/fonts

clean:
rm -rf main_server/vendor
rm -rf node_modules
rm -rf main_server/client_interface/html/crouton*.css
rm -rf main_server/client_interface/html/crouton*.js
rm -rf main_server/client_interface/html/croutonjs

.PHONY: lint deps clean
.PHONY: lint deps deps-dev clean
6 changes: 3 additions & 3 deletions main_server/client_interface/html/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ function getBCP47TagForISO631Language($code)
?>
<link rel="icon" href="<?php echo sprintf("%s/local_server/server_admin/style/images/shortcut.png", $url) ?>" />
<link rel="stylesheet" href="<?php echo sprintf("%s/local_server/server_admin/style/styles.css", $url) ?>" />
<link rel="stylesheet" type="text/css" href="crouton.min.css" />
<script type="text/javascript" src="crouton.min.js"></script>
<link rel="stylesheet" type="text/css" href="croutonjs/crouton.min.css" />
<script type="text/javascript" src="croutonjs/crouton.min.js"></script>
<script type="text/javascript">
// Full list of parameters: https://github.com/bmlt-enabled/crouton/blob/master/croutonjs/src/js/crouton-core.js#L13
var crouton = new Crouton({
root_server: "<?php echo str_replace('client_interface/html/', '', GetURLToMainServerDirectory()) ?>",
service_body: <?php echo json_encode($service_body_ids) ?>,
template_path: "node_modules/@bmlt-enabled/croutonjs/templates",
template_path: "croutonjs/templates",
theme: "florida-nights",
has_languages: "1",
has_areas: "1",
Expand Down

0 comments on commit 37407ff

Please sign in to comment.