Add assets task

This commit is contained in:
Tom Raithel
2017-02-10 19:54:26 +01:00
parent 0673da6867
commit d331e97ba8
4 changed files with 19 additions and 0 deletions

12
tasks/assets.js Normal file
View File

@@ -0,0 +1,12 @@
import { copy } from 'fs-extra';
import {
assetsPath,
distPath,
} from './file';
copy(assetsPath(), distPath('assets'), (err) => {
if (err) {
return console.error(err);
}
console.log("copied assets");
});

View File

@@ -21,6 +21,10 @@ export const stylesPath = (...pathInSrc) => (
relativePath('styles', ...pathInSrc)
);
export const assetsPath = (...pathInSrc) => (
relativePath('assets', ...pathInSrc)
);
export const jsPath = (...pathInSrc) => (
relativePath('js', ...pathInSrc)
);

View File

@@ -3,6 +3,7 @@ import { exec } from 'child_process';
import {
stylesPath,
assetsPath,
jsPath,
radarPath,
staticPath,
@@ -26,6 +27,7 @@ const options = {
watch(stylesPath(), options, watchBuild('css'));
watch(jsPath(), options, watchBuild('js'));
watch(assetsPath(), options, watchBuild('assets'));
watch(radarPath(), options, watchBuild('pages'));
watch(staticPath(), options, watchBuild('pages'));
watch(templatesPath(), options, watchBuild('pages'));