Category pages

This commit is contained in:
Sonny 2019-11-19 12:21:34 +01:00
parent a350cc280d
commit b952d70d92
114 changed files with 1205 additions and 177 deletions

View file

@ -14,19 +14,19 @@ export const CORE_DIR = path.join(PROJECT_DIR, 'news', 'core', 'static', 'core')
const taskMappings = [
{ name: 'login', destDir: `${ACCOUNTS_DIR}/${STATIC_SUFFIX}` },
{ name: 'homepage', destDir: `${CORE_DIR}/${STATIC_SUFFIX}` },
{ name: 'categories', destDir: `${CORE_DIR}/${STATIC_SUFFIX}` },
{ name: 'category', destDir: `${CORE_DIR}/${STATIC_SUFFIX}` },
];
export const sassTask = done => {
const tasks = taskMappings.map(taskMapping => {
const name = taskMapping.name;
const destDir = taskMapping.destDir;
const { name, destDir } = taskMapping;
return () => {
return src(`${SRC_DIR}/pages/${name}/index.scss`)
return () =>
src(`${SRC_DIR}/pages/${name}/index.scss`)
.pipe(sass().on('error', sass.logError))
.pipe(concat(`${name}.css`))
.pipe(dest(destDir));
};
});
series(...tasks)(done);