This commit is contained in:
Andre Beging
2020-02-11 14:58:31 +01:00
commit 9cd2447616
12 changed files with 5693 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
node_modules
public
resources

9
config.toml Normal file
View File

@@ -0,0 +1,9 @@
baseURL = "http://localhost:1313"
languageCode = "de-DE"
title = "<DD>-Wochenende"
disableKinds = ["taxonomy", "taxonomyTerm"]
relativeURLs = true
enableInlineShortcodes = true
[markup.goldmark.renderer]
unsafe= true

View File

@@ -0,0 +1,7 @@
{
"folders": [
{
"path": "."
}
]
}

87
gulpfile.js Normal file
View File

@@ -0,0 +1,87 @@
// Sass configuration
const gulp = require('gulp');
const sass = require('gulp-sass');
const autoprefixer = require('gulp-autoprefixer');
const prettier = require('gulp-prettier');
const cleanCSS = require('gulp-clean-css');
const rename = require('gulp-rename');
const browserSync = require('browser-sync').create();
const ts = require('gulp-typescript');
const tsProject = ts.createProject('tsconfig.json');
var run = require('gulp-run-command').default;
const open = require('open');
gulp.task('typescript', function () {
return tsProject.src()
.pipe(tsProject())
.js.pipe(gulp.dest('static/js'));
});
gulp.task('sass', function(cb) {
gulp
// Process CSS File
.src('src/style/combined.scss')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
cascade: false
}))
.pipe(prettier({ singleQuote: true }))
.pipe(rename({ basename: 'ndws' }))
// Create full CSS file
.pipe(
gulp.dest("static/css")
)
// Process and create minified css file
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('static/css'));
browserSync.reload();
cb();
});
/* Run Hugo, call async! */
function runHugo(cb) {
cb();
}
/* Start Hugo and launch browser*/
gulp.task('hugo', function(cb) {
console.log("hugoTask");
run('hugo server -D')();
(async () => {
await open('http://localhost:1313');
})();
});
/* Start watch tasks */
function startWatchTasks(cb) {
gulp.watch('src/style/*.scss', gulp.series('sass'));
gulp.watch('src/typescript/*.ts', gulp.series('typescript'));
cb();
}
function runHugo(cb) {
console.log("runHugo");
gulp.series('hugo');
cb();
}
gulp.task(
'default',
gulp.series('sass', 'typescript', gulp.parallel('hugo', startWatchTasks))
// gulp.series('sass', 'hugo', function(cb) {
// // browserSync.init({
// // server: {
// // baseDir: "./dist"
// // },
// // open: "external"
// // });
// })
);

5550
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

26
package.json Normal file
View File

@@ -0,0 +1,26 @@
{
"name": "dd-weekend",
"version": "1.0.0",
"description": "",
"main": "gulpfile.js",
"dependencies": {
"browser-sync": "^2.26.7",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^7.0.1",
"gulp-clean-css": "^4.2.0",
"gulp-prettier": "^2.3.0",
"gulp-postcss": "^8.0.0",
"gulp-rename": "^2.0.0",
"gulp-run-command": "^0.0.10",
"gulp-typescript": "^6.0.0-alpha.1",
"gulp-sass": "^4.0.2",
"open": "^7.0.2",
"typescript": "^3.7.5"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Andre Beging",
"license": "ISC"
}

0
src/style/combined.scss Normal file
View File

1
src/typescript/script.ts Normal file
View File

@@ -0,0 +1 @@
console.log(1);

0
static/css/ndws.css Normal file
View File

0
static/css/ndws.min.css vendored Normal file
View File

1
static/js/script.js Normal file
View File

@@ -0,0 +1 @@
console.log(1);

9
tsconfig.json Normal file
View File

@@ -0,0 +1,9 @@
{
"include": [
"src/typescript/**/*"
],
"compilerOptions": {
"noImplicitAny": true,
"target": "es5"
}
}