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

Update from the Github on 11-04-2021 #1

Merged
merged 20 commits into from
Apr 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -2307,6 +2307,15 @@
"contributions": [
"code"
]
},
{
"login": "kdubious",
"name": "Kevin Welsh",
"avatar_url": "https://avatars.githubusercontent.com/u/9756166?v=4",
"profile": "https://welshtechnologies.com/",
"contributions": [
"code"
]
}
],
"skipCi": true
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/functional_all_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Functional Tests - MVC
runs-on: ubuntu-latest
container:
image: cypress/included:6.8.0
image: cypress/included:7.0.0
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
name: Functional Tests - CMS Sqlite
runs-on: ubuntu-latest
container:
image: cypress/included:6.8.0
image: cypress/included:7.0.0
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core 3.1
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
name: Functional Tests - CMS Postgres
runs-on: ubuntu-latest
container:
image: cypress/included:6.8.0
image: cypress/included:7.0.0
services:
postgres:
image: postgres:11
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
name: Functional Tests - CMS MySql
runs-on: ubuntu-latest
container:
image: cypress/included:6.8.0
image: cypress/included:7.0.0
services:
mariadb:
image: mariadb:latest
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
name: Functional Tests - CMS SqlServer 2019
runs-on: ubuntu-latest
container:
image: cypress/included:6.8.0
image: cypress/included:7.0.0
services:
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Our team members also monitor other discussion forums:

We accept fixes and features! Here are some resources to help you get started on how to contribute code or new content.

* Look at the [documentation](/docs/).
* Look at the [documentation](/src/docs/).
* ["Help wanted" issues](https://github.com/orchardcms/orchardcore/labels/help%20wanted) - these issues are up for grabs. Comment on an issue if you want to create a fix.
* ["Good first issue" issues](https://github.com/orchardcms/orchardcore/labels/good%20first%20issue) - we think these are a good for newcomers.

Expand Down
3 changes: 2 additions & 1 deletion Contributors.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributors ✨

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-247-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-248-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down Expand Up @@ -340,6 +340,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center"><a href="https://github.com/ropstah"><img src="https://avatars.githubusercontent.com/u/5072557?v=4" width="100px;" alt=""/><br /><sub><b>ropstah</b></sub></a><br /><a href="https://github.com/OrchardCMS/OrchardCore/commits?author=ropstah" title="Code">💻</a></td>
<td align="center"><a href="https://welshtechnologies.com/"><img src="https://avatars.githubusercontent.com/u/9756166?v=4" width="100px;" alt=""/><br /><sub><b>Kevin Welsh</b></sub></a><br /><a href="https://github.com/OrchardCMS/OrchardCore/commits?author=kdubious" title="Code">💻</a></td>
</tr>
</table>

Expand Down
131 changes: 45 additions & 86 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ var fs = require("graceful-fs"),
postcss = require('gulp-postcss'),
rtl = require('postcss-rtl'),
babel = require('gulp-babel');
// The startbootstrap theme gulpfiles do not yet support node 15 so need to be installed and built seperately.
// blogtheme = require('./src/OrchardCore.Themes/TheBlogTheme/wwwroot/gulpfile');
// comingsoontheme = require('./src/OrchardCore.Themes/TheComingSoonTheme/wwwroot/gulpfile');

// For compat with older versions of Node.js.
require("es6-promise").polyfill();
Expand Down Expand Up @@ -62,7 +59,7 @@ gulp.task("watch", function () {
var inputWatcher;
function createWatcher() {
inputWatcher = gulp.watch(watchPaths);
inputWatcher.on('change', function (watchedPath) {
inputWatcher.on('change', function (watchedPath) {
var isConcat = path.basename(assetGroup.outputFileName, path.extname(assetGroup.outputFileName)) !== "@";
if (isConcat)
console.log("Asset file '" + watchedPath + "' was changed, rebuilding asset group with output '" + assetGroup.outputPath + "'.");
Expand All @@ -72,68 +69,30 @@ gulp.task("watch", function () {
var task = createAssetGroupTask(assetGroup, doRebuild);
});
}

createWatcher();

gulp.watch(assetGroup.manifestPath).on('change', function (watchedPath) {
console.log("Asset manifest file '" + watchedPath + "' was changed, restarting watcher.");
console.log("Asset manifest file '" + watchedPath + "' was changed, restarting watcher.");
inputWatcher.close();
createWatcher();
});
});
});

gulp.task('help', function() {
gulp.task('help', function () {
util.log(`
Usage: gulp [TASK]
Tasks:
build Incremental build (each asset group is built only if one or more inputs are newer than the output).
rebuild Full rebuild (all assets groups are built regardless of timestamps).
watch Continuous watch (each asset group is built whenever one of its inputs changes).
`);
});

gulp.task("build-blogtheme", function(done){
return buildBlogTheme(done);
});

gulp.task("build-comingsoontheme", function(done){
return buildComingSoonTheme(done);
});

gulp.task("build-themes", function(done){
buildBlogTheme (() => buildComingSoonTheme(done));
});


// gulp.task( 'build', gulp.series([ 'build-assets', 'build-themes' ]) );
// gulp.task( 'rebuild', gulp.series([ 'rebuild-assets', 'build-themes' ]) );

gulp.task( 'build', gulp.series([ 'build-assets' ]) );
gulp.task( 'rebuild', gulp.series([ 'rebuild-assets' ]) );
gulp.task( 'default', gulp.series([ 'build' ]) );

/*
** Build Themes
*/

function buildBlogTheme(done){
var cwd = process.cwd();
process.chdir('./src/OrchardCore.Themes/TheBlogTheme/wwwroot');
blogtheme.build( ()=> {
process.chdir(cwd);
done();
});
}

function buildComingSoonTheme(done){
var cwd = process.cwd();
process.chdir('./src/OrchardCore.Themes/TheComingSoonTheme/wwwroot');
comingsoontheme.build( ()=> {
process.chdir(cwd);
done();
});
}
gulp.task('build', gulp.series(['build-assets']));
gulp.task('rebuild', gulp.series(['rebuild-assets']));
gulp.task('default', gulp.series(['build']));

/*
** ASSET GROUPS
Expand Down Expand Up @@ -181,10 +140,10 @@ function createAssetGroupTask(assetGroup, doRebuild) {
doRebuild = !outputStats || assetManifestStats.mtime > outputStats.mtime;
}

if(assetGroup.copy === true){
if (assetGroup.copy === true) {
return buildCopyPipeline(assetGroup, doRebuild);
}
else{
else {
switch (outputExt) {
case ".css":
return buildCssPipeline(assetGroup, doConcat, doRebuild);
Expand Down Expand Up @@ -231,23 +190,23 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(gulpif(generateRTL, postcss([rtl()])))
.pipe(minify({
minify: true,
minifyHTML: {
collapseWhitespace: true,
conservativeCollapse: true,
},
minifyJS: {
sourceMap: true
},
minifyCSS: true
}))
.pipe(rename({
suffix: ".min"
}))
minify: true,
minifyHTML: {
collapseWhitespace: true,
conservativeCollapse: true,
},
minifyJS: {
sourceMap: true
},
minifyCSS: true
}))
.pipe(rename({
suffix: ".min"
}))
.pipe(eol())
.pipe(gulp.dest(assetGroup.outputDir));
// Uncomment to copy assets to wwwroot
//.pipe(gulp.dest(assetGroup.webroot));
// Uncomment to copy assets to wwwroot
//.pipe(gulp.dest(assetGroup.webroot));
var devStream = gulp.src(assetGroup.inputPaths) // Non-minified output, with source mapping
.pipe(gulpif(!doRebuild,
gulpif(doConcat,
Expand All @@ -272,8 +231,8 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
.pipe(gulpif(generateSourceMaps, sourcemaps.write()))
.pipe(eol())
.pipe(gulp.dest(assetGroup.outputDir));
// Uncomment to copy assets to wwwroot
//.pipe(gulp.dest(assetGroup.webroot));
// Uncomment to copy assets to wwwroot
//.pipe(gulp.dest(assetGroup.webroot));
return merge([minifiedStream, devStream]);
}

Expand All @@ -298,7 +257,7 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
ext: ".js"
}))))
.pipe(plumber())
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
.pipe(gulpif("*.ts", typescript({
declaration: false,
noImplicitAny: true,
Expand All @@ -310,18 +269,18 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
"es2015.iterable"
],
target: "es5",
})))
})))
.pipe(babel({
"presets": [
[
"@babel/preset-env",
{
"modules": false
},
"@babel/preset-flow"
]
]
}))
"presets": [
[
"@babel/preset-env",
{
"modules": false
},
"@babel/preset-flow"
]
]
}))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(header(
"/*\n" +
Expand All @@ -338,22 +297,22 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
}))
.pipe(eol())
.pipe(gulp.dest(assetGroup.outputDir))
// Uncomment to copy assets to wwwroot
//.pipe(gulp.dest(assetGroup.webroot));
// Uncomment to copy assets to wwwroot
//.pipe(gulp.dest(assetGroup.webroot));
}

function buildCopyPipeline(assetGroup, doRebuild) {
var stream = gulp.src(assetGroup.inputPaths);

if(!doRebuild) {
if (!doRebuild) {
stream = stream.pipe(newer(assetGroup.outputDir))
}

var renameFile = assetGroup.outputFileName != "@";

stream = stream
.pipe(gulpif(renameFile, rename(assetGroup.outputFileName)))
.pipe(gulp.dest(assetGroup.outputDir));
.pipe(gulpif(renameFile, rename(assetGroup.outputFileName)))
.pipe(gulp.dest(assetGroup.outputDir));
// Uncomment to copy assets to wwwroot
//.pipe(gulp.dest(assetGroup.webroot));

Expand Down
Loading