-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.hbs] | ||
insert_final_newline = false | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yaml,yml}] | ||
indent_size = 2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
b-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
|
||
pids | ||
logs | ||
results | ||
|
||
npm-debug.log | ||
node_modules | ||
package-lock.json | ||
|
||
.idea/* | ||
*.iml | ||
projectFilesBackup | ||
|
||
.DS_Store | ||
|
||
dist/ | ||
|
||
config.json | ||
changelog.md | ||
changelog.md.bk |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"private": true, | ||
"name": "root", | ||
"workspaces": [ | ||
"packages/*" | ||
], | ||
"scripts": { | ||
"alpha": "ln -sfn ~/Developer/monorepo-test/packages/alpha ~/Developer/ghost-monorepo-test/content/themes && yarn workspace alpha dev", | ||
"beta": "ln -sfn ~/Developer/monorepo-test/packages/beta ~/Developer/ghost-monorepo-test/content/themes && yarn workspace beta dev", | ||
"build": "concurrently --kill-others \"yarn workspace alpha build\" \"yarn workspace beta build\"", | ||
"test": "concurrently --kill-others \"yarn workspace alpha test\" \"yarn workspace beta test\"" | ||
}, | ||
"devDependencies": { | ||
"autoprefixer": "10.2.5", | ||
"beeper": "2.1.0", | ||
"concurrently": "6.0.0", | ||
"cssnano": "4.1.10", | ||
"gscan": "4.0.1", | ||
"gulp": "4.0.2", | ||
"gulp-concat": "2.6.1", | ||
"gulp-livereload": "4.0.2", | ||
"gulp-postcss": "9.0.0", | ||
"gulp-stylelint": "13.0.0", | ||
"gulp-uglify": "3.0.2", | ||
"gulp-zip": "5.1.0", | ||
"postcss": "8.2.8", | ||
"postcss-easy-import": "3.0.0", | ||
"pump": "3.0.0", | ||
"stylelint": "13.12.0", | ||
"stylelint-config-standard": "21.0.0", | ||
"stylelint-order": "4.1.0" | ||
}, | ||
"browserslist": [ | ||
"defaults" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@import "shared/reset.css"; | ||
@import "shared/kg.css"; | ||
|
||
body { | ||
background-color: cornflowerblue; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{@site.locale}}"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>{{meta_title}}</title> | ||
<link rel="stylesheet" href="{{asset "built/screen.css"}}"> | ||
|
||
{{ghost_head}} | ||
</head> | ||
|
||
<body class="{{body_class}}"> | ||
{{{body}}} | ||
|
||
{{ghost_foot}} | ||
</body> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
const {series, parallel, watch, src, dest} = require('gulp'); | ||
const pump = require('pump'); | ||
|
||
// gulp plugins and utils | ||
const livereload = require('gulp-livereload'); | ||
const gulpStylelint = require('gulp-stylelint'); | ||
const postcss = require('gulp-postcss'); | ||
const concat = require('gulp-concat'); | ||
const uglify = require('gulp-uglify'); | ||
const beeper = require('beeper'); | ||
const zip = require('gulp-zip'); | ||
|
||
// postcss plugins | ||
const easyimport = require('postcss-easy-import'); | ||
const autoprefixer = require('autoprefixer'); | ||
const cssnano = require('cssnano'); | ||
|
||
function serve(done) { | ||
livereload.listen(); | ||
done(); | ||
} | ||
|
||
function handleError(done) { | ||
return function (err) { | ||
if (err) { | ||
beeper(); | ||
} | ||
return done(err); | ||
}; | ||
}; | ||
|
||
function hbs(done) { | ||
pump([ | ||
src(['*.hbs', 'partials/**/*.hbs', 'members/**/*.hbs']), | ||
livereload() | ||
], handleError(done)); | ||
} | ||
|
||
function css(done) { | ||
pump([ | ||
src('assets/css/screen.css', {sourcemaps: true}), | ||
postcss([ | ||
easyimport, | ||
autoprefixer(), | ||
cssnano() | ||
]), | ||
dest('assets/built/', {sourcemaps: '.'}), | ||
livereload() | ||
], handleError(done)); | ||
} | ||
|
||
function js(done) { | ||
pump([ | ||
src([ | ||
'assets/js/lib/*.js', | ||
'assets/js/main.js' | ||
], {sourcemaps: true}), | ||
concat('main.min.js'), | ||
uglify(), | ||
dest('assets/built/', {sourcemaps: '.'}), | ||
livereload() | ||
], handleError(done)); | ||
} | ||
|
||
function lint(done) { | ||
pump([ | ||
src(['assets/css/**/*.css', '!assets/css/vendor/*']), | ||
gulpStylelint({ | ||
fix: true, | ||
reporters: [ | ||
{formatter: 'string', console: true} | ||
] | ||
}), | ||
dest('assets/css/') | ||
], handleError(done)); | ||
} | ||
|
||
function zipper(done) { | ||
const filename = require('./package.json').name + '.zip'; | ||
|
||
pump([ | ||
src([ | ||
'**', | ||
'!node_modules', '!node_modules/**', | ||
'!dist', '!dist/**', | ||
'!yarn-error.log' | ||
]), | ||
zip(filename), | ||
dest('dist/') | ||
], handleError(done)); | ||
} | ||
|
||
const hbsWatcher = () => watch(['*.hbs', 'partials/**/*.hbs', 'members/**/*.hbs'], hbs); | ||
const cssWatcher = () => watch('assets/css/**/*.css', css); | ||
const jsWatcher = () => watch('assets/js/**/*.js', js); | ||
const watcher = parallel(hbsWatcher, cssWatcher, jsWatcher); | ||
const build = series(css, js); | ||
|
||
exports.build = build; | ||
exports.lint = lint; | ||
exports.zip = series(build, zipper); | ||
exports.default = series(build, serve, watcher); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{!< default}} | ||
|
||
<h1>Alpha</h1> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "alpha", | ||
"description": "A Ghost theme", | ||
"version": "1.0.0", | ||
"engines": { | ||
"ghost": ">=4.0.0", | ||
"ghost-api": "v4" | ||
}, | ||
"license": "MIT", | ||
"author": { | ||
"name": "Ghost Foundation", | ||
"email": "[email protected]", | ||
"url": "https://ghost.org" | ||
}, | ||
"keywords": [ | ||
"ghost", | ||
"theme", | ||
"ghost-theme" | ||
], | ||
"config": { | ||
"posts_per_page": 5, | ||
"image_sizes": { | ||
"xs": { | ||
"width": 150 | ||
}, | ||
"s": { | ||
"width": 400 | ||
}, | ||
"m": { | ||
"width": 750 | ||
}, | ||
"l": { | ||
"width": 960 | ||
}, | ||
"xl": { | ||
"width": 1140 | ||
}, | ||
"xxl": { | ||
"width": 1920 | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
"dev": "gulp", | ||
"test": "gscan .", | ||
"test:ci": "gscan --fatal --verbose .", | ||
"build": "gulp build", | ||
"lint": "gulp lint", | ||
"zip": "gulp zip" | ||
}, | ||
"dependencies": { | ||
"shared": "1.0.0" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@import "shared/reset.css"; | ||
@import "shared/kg.css"; | ||
|
||
body { | ||
background-color: tomato; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{@site.locale}}"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>{{meta_title}}</title> | ||
<link rel="stylesheet" href="{{asset "built/screen.css"}}"> | ||
|
||
{{ghost_head}} | ||
</head> | ||
|
||
<body class="{{body_class}}"> | ||
{{{body}}} | ||
|
||
{{ghost_foot}} | ||
</body> | ||
|
||
</html> |