Category pages
This commit is contained in:
parent
a350cc280d
commit
b952d70d92
114 changed files with 1205 additions and 177 deletions
10
gulp/sass.js
10
gulp/sass.js
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue