Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Asset Build Tool #17262

Open
wants to merge 107 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
b4d57c8
Asset build tool
Skrypt Apr 4, 2024
0a226e7
Merge branch 'main' into skrypt/asset-build-tool
Skrypt Apr 12, 2024
e0d37a9
wip yarn build
Skrypt Apr 12, 2024
0c7f561
WIP Asset Build Tool
Skrypt Dec 19, 2024
4354f70
wip AdminMenu Assets.json
Skrypt Dec 19, 2024
979fcf1
Merge branch 'main' into skrypt/asset-build-tool
Skrypt Dec 19, 2024
7857435
wip Build Tool
Skrypt Dec 19, 2024
e045ae5
update SRI
Skrypt Dec 19, 2024
f475527
Use yarn for testing build assets
Skrypt Dec 19, 2024
18ba519
add corepack
Skrypt Dec 19, 2024
b424cde
yarn build instead of rebuild
Skrypt Dec 19, 2024
3314011
Rebuild all
Skrypt Dec 20, 2024
e476a06
Fix CI build
Skrypt Dec 20, 2024
c7325f3
CorePack
Skrypt Dec 20, 2024
e57bc54
Remove postinstall
Skrypt Dec 20, 2024
88510d2
build
Skrypt Dec 20, 2024
e5654ea
update yarn.lock
Skrypt Dec 20, 2024
ab69a7b
Adding gulp process as part of concurently
Skrypt Dec 20, 2024
0a3fc8f
remove gulp-rebuild
Skrypt Dec 20, 2024
3f75b7f
yarn build -g
Skrypt Dec 20, 2024
ab67333
Use gulp rebuild
Skrypt Dec 20, 2024
c3e10e3
Add command options
Skrypt Dec 20, 2024
d93a0cb
Update .scripts/assets-build-tool/Readme.md
Skrypt Dec 21, 2024
ed0c52a
Revert changes in OC.AdminMenu
Skrypt Dec 21, 2024
f854e18
Merge branch 'skrypt/asset-build-tool' of https://github.com/OrchardC…
Skrypt Dec 21, 2024
6bec184
Fix build under linux
Skrypt Jan 6, 2025
9e409c9
use old gulp rebuild
Skrypt Jan 6, 2025
5d63fbc
revert last commit
Skrypt Jan 6, 2025
1f5e8fa
revert
Skrypt Jan 6, 2025
7b97f88
keep npm install for gulp
Skrypt Jan 6, 2025
d5bc9f9
revert assets.json
Skrypt Jan 6, 2025
b225478
update pl
Skrypt Jan 6, 2025
5d6e58a
fix build
Skrypt Jan 6, 2025
96225f6
update yarn.lock
Skrypt Jan 6, 2025
e2ea2af
up pack.jso
Skrypt Jan 6, 2025
28a0c61
yarn cache clean
Skrypt Jan 6, 2025
e74955a
fix assets.json paths
Skrypt Jan 6, 2025
cb54b23
update assets paths
Skrypt Jan 6, 2025
99823ee
fix gulp rebuild
Skrypt Jan 6, 2025
a0dc560
use yarn build -gr
Skrypt Jan 6, 2025
c77e701
Merge branch 'main' into skrypt/asset-build-tool
Skrypt Jan 6, 2025
8d5517b
Use GulpAssets.json and Assets.json
Skrypt Jan 8, 2025
119913b
Add missing dependencies in package.json files
Skrypt Jan 8, 2025
4f71a9b
Add null check on Parcel Bundles
Skrypt Jan 8, 2025
52c1b2b
Add default destination path for sass.mjs
Skrypt Jan 8, 2025
2995718
Null check on asset group name
Skrypt Jan 8, 2025
e53a7ac
Remove root package-lock.json file
Skrypt Jan 8, 2025
68c8202
Merge branch 'main' into skrypt/asset-build-tool
Skrypt Jan 8, 2025
074da60
Upgrade build tool dependencies
Skrypt Jan 8, 2025
e3d4cbf
OrchardCore.Resources move to new Assets.json
Skrypt Jan 8, 2025
10187bb
Add retry logic to Concurrently
Skrypt Jan 8, 2025
fd7c476
update yarn.lock
Skrypt Jan 8, 2025
7b19fe8
Migrate OrchardCore.Resources assets
Skrypt Jan 8, 2025
0422ac6
Revert rename assets.json files
Skrypt Jan 9, 2025
3042b25
WIP Migrate to Assets2.json
Skrypt Jan 9, 2025
2fc2e86
Default to /wwwroot/Scripts
Skrypt Jan 9, 2025
10976af
Rename folder with Uppercase
Skrypt Jan 9, 2025
2f47d39
Update tags
Skrypt Jan 9, 2025
e7c1afc
Add \r\n on map EOF
Skrypt Jan 9, 2025
9048f64
test
Skrypt Jan 9, 2025
f78da9c
use \n
Skrypt Jan 9, 2025
142db4e
Remove folder
Skrypt Jan 9, 2025
4795c60
Add back folder
Skrypt Jan 9, 2025
ce09ff9
use \n in source map files
Skrypt Jan 9, 2025
c5a0eac
replace crlf with lf
Skrypt Jan 9, 2025
8ea0719
use gitattributes for eol
Skrypt Jan 9, 2025
ef59521
Update .gitattributes
Skrypt Jan 9, 2025
79a4125
update map files
Skrypt Jan 9, 2025
5192ddb
Merge branch 'skrypt/asset-build-tool' of https://github.com/OrchardC…
Skrypt Jan 9, 2025
23792df
update gitattributes
Skrypt Jan 9, 2025
9878aea
remove
Skrypt Jan 9, 2025
e8c9414
add back
Skrypt Jan 9, 2025
da4b149
add back gitatt
Skrypt Jan 9, 2025
cfa3af3
gitatt
Skrypt Jan 9, 2025
eaf8237
gitatt
Skrypt Jan 9, 2025
23650c7
rem
Skrypt Jan 9, 2025
627c918
add
Skrypt Jan 9, 2025
6ebac66
Migrate some themes
Skrypt Jan 10, 2025
743f9ba
Merge branch 'main' into skrypt/asset-build-tool
Skrypt Jan 10, 2025
5d4a1eb
Adding PostCSS-LTR
Skrypt Jan 10, 2025
86948be
fix
Skrypt Jan 10, 2025
3999163
Fix again
Skrypt Jan 10, 2025
782a8a2
fix js map
Skrypt Jan 10, 2025
6071ac5
update from linux
Skrypt Jan 11, 2025
7b3d8ea
Refactor OC.Setup with Typescript
Skrypt Jan 11, 2025
f4adea5
More migration to Asset2
Skrypt Jan 11, 2025
dbfe1a9
Format .cshtml
Skrypt Jan 11, 2025
42f5c7a
Update workspaces
Skrypt Jan 11, 2025
bdb9cfa
Add common frontend workspace
Skrypt Jan 11, 2025
9f5d234
Rename to password-strenght.ts
Skrypt Jan 11, 2025
8d56b55
Migrate OC.Themes
Skrypt Jan 11, 2025
0021d56
WIP migration
Skrypt Jan 17, 2025
803bf7e
WIP ts migration
Skrypt Jan 21, 2025
a86a5a8
Merge branch 'main' into skrypt/asset-build-tool
Skrypt Jan 21, 2025
578d1cb
Fix Media Gallery not displaying
Skrypt Jan 21, 2025
1c25005
Remove .map files
Skrypt Jan 21, 2025
9a5c043
.map only on development
Skrypt Jan 21, 2025
2e075c6
Remove
Skrypt Jan 21, 2025
cde492c
fix build
Skrypt Jan 21, 2025
2835695
Fix Media app
Skrypt Jan 21, 2025
6aacce9
Fix File App
Skrypt Jan 21, 2025
cad3e54
Migrate OrchardCore.Workflows
Skrypt Jan 21, 2025
6d8e081
Move package.json, remove lock
Skrypt Jan 21, 2025
7b09bce
Remove package-lock.json files
Skrypt Jan 21, 2025
7c13411
remove workspaces globs
Skrypt Jan 25, 2025
35a108e
Add watcher on sass action
Skrypt Jan 25, 2025
df9c4ab
use GulpAssets.json and Assets.json
Skrypt Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
272 changes: 133 additions & 139 deletions src/OrchardCore.Modules/OrchardCore.Cors/wwwroot/Scripts/cors-admin.js
Original file line number Diff line number Diff line change
@@ -1,149 +1,143 @@
/*
** NOTE: This file is generated by Gulp and should not be edited directly!
** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.
*/

var optionsList = Vue.component('options-list', {
props: ['options', 'optionType', 'title', 'subTitle'],
template: '#options-list',
data: function data() {
return {
'newOption': ''
};
},
methods: {
addOption: function addOption(value) {
if (value !== null && value !== '') {
var noDuplicates = $.inArray(value.toLowerCase(), this.options.map(function (o) {
return o.toLowerCase();
})) < 0;
if (noDuplicates) {
this.options.push(value);
var optionsList = Vue.component('options-list',
{
props: ['options', 'optionType', 'title', 'subTitle'],
template: '#options-list',
data: function () {
return {
'newOption': ''
};
},
methods: {
addOption: function (value) {
if (value !== null && value !== '') {
var noDuplicates = ($.inArray(value.toLowerCase(), this.options.map(o => o.toLowerCase())) < 0);
if (noDuplicates) {
this.options.push(value);
}
}
},
deleteOption: function (value) {
this.options.splice($.inArray(value, this.options), 1);
}
}
}
},
deleteOption: function deleteOption(value) {
this.options.splice($.inArray(value, this.options), 1);
}
}
});
var policyDetails = Vue.component('policy-details', {
components: {
optionsList: optionsList
},
props: ['policy'],
template: '#policy-details'
});
});

var policyDetails = Vue.component('policy-details',
{
components: { optionsList: optionsList },
props: ['policy'],
template: '#policy-details'
});

var corsApp = new Vue({
el: '#corsAdmin',
components: {
policyDetails: policyDetails,
optionsList: optionsList
},
data: {
selectedPolicy: null,
policies: null,
defaultPolicyName: null
},
updated: function updated() {
this.searchBox();
},
methods: {
newPolicy: function newPolicy() {
this.selectedPolicy = {
name: 'New policy',
allowedOrigins: [],
allowAnyOrigin: true,
allowedMethods: [],
allowAnyMethod: true,
allowedHeaders: [],
allowAnyHeader: true,
allowCredentials: true,
isDefaultPolicy: false,
exposedHeaders: []
};
},
editPolicy: function editPolicy(policy) {
this.selectedPolicy = Object.assign({}, policy);
this.selectedPolicy.originalName = this.selectedPolicy.name;
},
deletePolicy: function deletePolicy(policy, event) {
this.selectedPolicy = null;
var policyToRemove = this.policies.filter(function (item) {
return item.name === policy.name;
});
if (policyToRemove.length > 0) this.policies.splice($.inArray(policyToRemove[0], this.policies), 1);
event.stopPropagation();
this.save();
},
updatePolicy: function updatePolicy(policy, event) {
if (policy.isDefaultPolicy) {
this.policies.forEach(function (p) {
return p.isDefaultPolicy = false;
});
}
if (policy.originalName) {
var policyIndex = this.policies.findIndex(function (oldPolicy) {
return oldPolicy.name === policy.originalName;
});
this.policies[policyIndex] = policy;
} else {
this.policies.push(policy);
}
this.save();
this.back();
el: '#corsAdmin',
components: { policyDetails: policyDetails, optionsList: optionsList },
data: {
selectedPolicy: null,
policies: null,
defaultPolicyName: null
},
save: function save() {
document.getElementById('corsSettings').value = JSON.stringify(this.policies);
document.getElementById('corsForm').submit();
updated: function () {
this.searchBox();
},
back: function back() {
this.selectedPolicy = null;
},
searchBox: function searchBox() {
var searchBox = $('#search-box');
methods: {
newPolicy: function () {
this.selectedPolicy = {
name: 'New policy',
allowedOrigins: [],
allowAnyOrigin: true,
allowedMethods: [],
allowAnyMethod: true,
allowedHeaders: [],
allowAnyHeader: true,
allowCredentials: true,
isDefaultPolicy: false,
exposedHeaders: []
};
},
editPolicy: function (policy) {
this.selectedPolicy = Object.assign({}, policy);
this.selectedPolicy.originalName = this.selectedPolicy.name;
},
deletePolicy: function (policy, event) {
this.selectedPolicy = null;
var policyToRemove = this.policies.filter(function (item) { return item.name === policy.name; });
if (policyToRemove.length > 0)
this.policies.splice($.inArray(policyToRemove[0], this.policies), 1);
event.stopPropagation();
this.save();
},
updatePolicy: function (policy, event) {
if (policy.isDefaultPolicy) {
this.policies.forEach(p => p.isDefaultPolicy = false);
}

// On Enter, edit the item if there is a single one
searchBox.keydown(function (e) {
if (e.key == 'Enter') {
// Edit the item if there is a single filtered element
var visible = $('#corsAdmin > ul > li:visible');
if (visible.length == 1) {
window.location = visible.find('.edit').attr('href');
}
return false;
}
});
if (policy.originalName) {
var policyIndex = this.policies.findIndex((oldPolicy) => oldPolicy.name === policy.originalName);
this.policies[policyIndex] = policy;
}
else {
this.policies.push(policy);
}

// On each keypress filter the list
searchBox.keyup(function (e) {
var search = $(this).val().toLowerCase();
var elementsToFilter = $("[data-filter-value]");
this.save();
this.back();
},
save: function () {
document.getElementById('corsSettings').value = JSON.stringify(this.policies);
document.getElementById('corsForm').submit();
},
back: function () {
this.selectedPolicy = null;
},
searchBox: function () {
var searchBox = $('#search-box');

// On ESC, clear the search box and display all
if (e.keyCode == 27 || search == '') {
searchBox.val('');
elementsToFilter.toggle(true);
$('#list-alert').addClass("d-none");
} else {
var intVisible = 0;
elementsToFilter.each(function () {
var text = $(this).data('filter-value').toLowerCase();
var found = text.indexOf(search) > -1;
$(this).toggle(found);
if (found) {
intVisible++;
}
});
// On Enter, edit the item if there is a single one
searchBox.keydown(function (e) {
if (e.key == 'Enter') {

// We display an alert if a search is not found
if (intVisible == 0) {
$('#list-alert').removeClass("d-none");
} else {
$('#list-alert').addClass("d-none");
}
// Edit the item if there is a single filtered element
var visible = $('#corsAdmin > ul > li:visible');
if (visible.length == 1) {
window.location = visible.find('.edit').attr('href');
}
return false;
}
});

// On each keypress filter the list
searchBox.keyup(function (e) {
var search = $(this).val().toLowerCase();
var elementsToFilter = $("[data-filter-value]");

// On ESC, clear the search box and display all
if (e.keyCode == 27 || search == '') {
searchBox.val('');
elementsToFilter.toggle(true);
$('#list-alert').addClass("d-none");
}
else {
var intVisible = 0;
elementsToFilter.each(function () {
var text = $(this).data('filter-value').toLowerCase();
var found = text.indexOf(search) > -1;
$(this).toggle(found);

if (found) {
intVisible++;
}
});

// We display an alert if a search is not found
if (intVisible == 0) {
$('#list-alert').removeClass("d-none");
}
else {
$('#list-alert').addClass("d-none");
}
}
});
}
});
}
}
});
});

Large diffs are not rendered by default.

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

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

namespace OrchardCore.Media;

public sealed class ResourceManagementOptionsConfiguration
: IConfigureOptions<ResourceManagementOptions>
public sealed class ResourceManagementOptionsConfiguration : IConfigureOptions<ResourceManagementOptions>
{
private static readonly ResourceManifest _manifest;

Expand All @@ -20,11 +19,9 @@ static ResourceManagementOptionsConfiguration()

_manifest
.DefineStyle("media")
.SetUrl(
"~/OrchardCore.Media/Styles/media.min.css",
"~/OrchardCore.Media/Styles/media.css"
)
.SetUrl("~/OrchardCore.Media/Styles/media.min.css", "~/OrchardCore.Media/Styles/media.css")
.SetVersion("1.0.0");

}

public void Configure(ResourceManagementOptions options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Layout = null;
}

<div id="mediaApp" style="display:none;" v-on:dragover="handleScrollWhileDrag($event)">
Skrypt marked this conversation as resolved.
Show resolved Hide resolved
<div id="mediaApp" v-on:dragover="handleScrollWhileDrag($event)">
<div id="customdropzone">
<h3>@T["Drop your media here"]</h3>
<p>@T["Your files will be uploaded to the current folder when you drop them here"]</p>
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Media/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"blueimp-file-upload": "10.32.0",
"bootstrap": "5.3.3",
"jquery": "3.7.1",
"vue": "2.6.14"
"vue": "^2.6.14"
}
}

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions yarn.lock
Skrypt marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@ __metadata:
blueimp-file-upload: "npm:10.32.0"
bootstrap: "npm:5.3.3"
jquery: "npm:3.7.1"
vue: "npm:2.6.14"
vue: "npm:^2.6.14"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -14170,13 +14170,6 @@ __metadata:
languageName: node
linkType: hard

"vue@npm:2.6.14":
version: 2.6.14
resolution: "vue@npm:2.6.14"
checksum: 10/382e261c1d995285b1834f093b53d935a537e6afd18a557131890144bcc5b61c87101db70daf8593bd1cdcfad3dcd90a2f4fea35b6ca0cee1e8c6f7f8f88c104
languageName: node
linkType: hard

"vue@npm:^2.6.14":
version: 2.7.16
resolution: "vue@npm:2.7.16"
Expand Down
Loading