Skip to content

Commit

Permalink
MNT: Github actions, composer requirements, linting (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfendeksilverstripe authored Nov 29, 2022
1 parent 0585e2a commit 19c30f7
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 243 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@silverstripe/webpack-config/.eslintrc');
module.exports = require('@silverstripe/eslint-config/.eslintrc');
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Module CI
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
ci:
uses: silverstripe/github-actions-ci-cd/.github/workflows/ci.yml@v0.1
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
2 changes: 1 addition & 1 deletion client/dist/js/embargo-expiry.js

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

1 change: 0 additions & 1 deletion client/dist/js/embargo-expiry.js.map

This file was deleted.

20 changes: 10 additions & 10 deletions client/src/bundles/embargo-expiry.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ window.jQuery.entwine('ss', ($) => {
versionedObjectSaveButton = $('button[name="action_doSave"]');
};

const showHidePublishButtons = (hasEmbargo) => {
if (hasEmbargo) {
hidePublishButton();

return;
}

showPublishButton();
};

const hidePublishButton = () => {
if (siteTreePublishButton !== null) {
siteTreePublishButton.detach();
Expand All @@ -43,6 +33,16 @@ window.jQuery.entwine('ss', ($) => {
}
};

const showHidePublishButtons = (hasEmbargo) => {
if (hasEmbargo) {
hidePublishButton();

return;
}

showPublishButton();
};

$('input[name="DesiredPublishDate"]').entwine({
onchange() {
// Any time we match this field, make sure we have the latest instance of our buttons.
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
},
"require": {
"php": "^7.4 || ^8.0",
"silverstripe/vendor-plugin": "^1.0",
"silverstripe/framework": "^4@dev",
"silverstripe/cms": "^4@dev",
"symbiote/silverstripe-queuedjobs": "^4.0.0",
"silverstripe/vendor-plugin": "^1.6",
"silverstripe/framework": "^4.7",
"silverstripe/cms": "^4.7",
"symbiote/silverstripe-queuedjobs": "^4.1",
"opis/closure": "^3.6"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"silverstripe/recipe-testing": "^2",
"tractorcow/silverstripe-fluent": "^6.0",
"slevomat/coding-standard": "^8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "NODE_ENV=production webpack -p --bail --progress",
"watch": "NODE_ENV=development webpack --watch --progress",
"css": "WEBPACK_CHILD=css npm run build",
"lint": "eslint client/src && sass-lint -v"
"lint": "eslint client/src"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 19c30f7

Please sign in to comment.