Add basic component functionality

This commit is contained in:
gconsidine
2017-04-20 18:07:28 -04:00
parent cba4237859
commit 637fb8fe27
22 changed files with 172 additions and 73 deletions

View File

@@ -18,6 +18,7 @@ module.exports = {
},
keepalive: false,
watchTask: true,
reloadDebounce: 1000,
// The browser-sync-client lib will write your current scroll position to window.name
// https://github.com/BrowserSync/browser-sync-client/blob/a2718faa91e11553feca7a3962313bf1ec6ba3e5/dist/index.js#L500
// This strategy is enabled in the core browser-sync lib, and not externally documented as an option. Yay!

View File

@@ -1,16 +1,16 @@
module.exports = {
dev: {
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:languages', 'copy:config', 'less:dev'],
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:views', 'copy:languages', 'copy:config', 'less:dev'],
},
// This concurrent target is intended for development ui builds that do not require raising browser-sync or filesystem polling
devNoSync: {
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:languages', 'copy:config', 'less:dev', 'webpack:dev'],
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:views', 'copy:languages', 'copy:config', 'less:dev', 'webpack:dev'],
},
prod: {
tasks: ['newer:copy:vendor', 'newer:copy:assets', 'newer:copy:partials', 'newer:copy:languages', 'newer:copy:config', 'newer:less:prod']
tasks: ['newer:copy:vendor', 'newer:copy:assets', 'newer:copy:partials', 'newer:copy:views', 'newer:copy:languages', 'newer:copy:config', 'newer:less:prod']
},
watch: {
tasks: ['watch:css', 'watch:partials', 'watch:assets', ['webpack:dev', 'watch:config']],
tasks: ['watch:css', 'watch:partials', 'watch:views', 'watch:assets', ['webpack:dev', 'watch:config']],
options: {
logConcurrentOutput: true
}

View File

@@ -30,6 +30,14 @@ module.exports = {
dest: 'static/lib/'
}]
},
views: {
files: [{
cwd: 'client/src',
expand: true,
src: ['**/*.view.html'],
dest: 'static/views/'
}]
},
partials: {
files: [{
cwd: 'client/src',
@@ -41,6 +49,11 @@ module.exports = {
expand: true,
src: ['*.html'],
dest: 'static/partials/'
}, {
cwd: 'client/components',
expand: true,
src: ['*.partial.html'],
dest: 'static/partials/components/'
}]
},
languages: {

View File

@@ -10,18 +10,19 @@ module.exports = {
src: [
'client/legacy-styles/*.less',
'client/src/**/*.less',
'client/theme/index.less'
]
}],
options: {
sourceMap: true
}
},
prod: {
files: {
'static/tower.min.css': [
'client/legacy-styles/*.less',
'client/src/**/*.less',
'client/theme/index.less'
]
},
options: {

View File

@@ -1,12 +1,19 @@
module.exports = {
css: {
files: 'client/**/*.less',
tasks: ['newer:less:dev']
tasks: ['less:dev']
},
partials: {
files: 'client/src/**/*.html',
files: [
'client/components/*.partial.html',
'client/src/**/*.partial.html'
],
tasks: ['newer:copy:partials']
},
views: {
files: 'client/src/**/*.view.html',
tasks: ['newer:copy:views']
},
assets: {
files: 'client/assets',
tasks: ['newer:copy:assets']