moved app/ to public/ (works with http-server)
This commit is contained in:
parent
b30c76f26b
commit
74d9f9c9b4
|
@ -44,16 +44,16 @@ A production pipe-line should *NOT* be in your way while **developing**. You sho
|
|||
|
||||
1. Run `npm install`, this will install all vendor dependencies
|
||||
|
||||
2. Start coding in `app`
|
||||
2. Start coding in `public`
|
||||
|
||||
3. run the `app/index.html` from your favorite web server\*
|
||||
3. run the `public/index.html` from your favorite web server\*
|
||||
|
||||
> \* try `live-server` from `npm` or via [Visual Studio Code]() plug-in it's awesome!
|
||||
|
||||
### Project Structure
|
||||
|
||||
```
|
||||
app/ <-- develop here
|
||||
public/ <-- develop here
|
||||
css/ <-- your css files
|
||||
js/ <-- your javascript files
|
||||
app.js <-- basic routing/utils bootstrap
|
||||
|
|
16
gulpfile.js
16
gulpfile.js
|
@ -9,7 +9,7 @@ const gulp = require('gulp'),
|
|||
|
||||
// build riotjs tags (components)
|
||||
gulp.task('tags', () => {
|
||||
return gulp.src('./app/tags/**/*.tag.html')
|
||||
return gulp.src('./public/tags/**/*.tag.html')
|
||||
.pipe(concat('tags.js'))
|
||||
.pipe(riot({compact: true, whitespace: false}))
|
||||
.pipe(minify({ext: {min: '.min.js'}}))
|
||||
|
@ -18,7 +18,7 @@ gulp.task('tags', () => {
|
|||
|
||||
// combine javascript files
|
||||
gulp.task('javascript', () => {
|
||||
return gulp.src('./app/js/**/*.js')
|
||||
return gulp.src('./public/js/**/*.js')
|
||||
.pipe(concat('combined.js'))
|
||||
.pipe(minify({ext: {min: '.min.js'}}))
|
||||
.pipe(gulp.dest('./dist/js'));
|
||||
|
@ -26,20 +26,20 @@ gulp.task('javascript', () => {
|
|||
|
||||
// move fonts
|
||||
gulp.task('fonts', () => {
|
||||
return gulp.src('./app/fonts/**/*.ttf')
|
||||
return gulp.src('./public/fonts/**/*.ttf')
|
||||
.pipe(gulp.dest('./dist/fonts'));
|
||||
});
|
||||
|
||||
// move images
|
||||
// TODO: minimize
|
||||
gulp.task('images', () => {
|
||||
return gulp.src('./app/images/**/*')
|
||||
return gulp.src('./public/images/**/*')
|
||||
.pipe(gulp.dest('./dist/images'));
|
||||
});
|
||||
|
||||
// combine css
|
||||
gulp.task('css', () => {
|
||||
return gulp.src('./app/css/*.css')
|
||||
return gulp.src('./public/css/*.css')
|
||||
.pipe(concat('styles.css'))
|
||||
.pipe(cssmin())
|
||||
.pipe(gulp.dest('./dist/css'));
|
||||
|
@ -47,19 +47,19 @@ gulp.task('css', () => {
|
|||
|
||||
// move vendor deps
|
||||
gulp.task('vendor', () => {
|
||||
return gulp.src('./app/vendor/**/*.min.*')
|
||||
return gulp.src('./public/vendor/**/*.min.*')
|
||||
.pipe(gulp.dest('./dist/vendor'));
|
||||
});
|
||||
|
||||
// move public files
|
||||
gulp.task('public', () => {
|
||||
return gulp.src('./app/*.*')
|
||||
return gulp.src('./public/*.*')
|
||||
.pipe(gulp.dest('./dist'));
|
||||
});
|
||||
|
||||
// build index
|
||||
gulp.task('index', () => {
|
||||
return gulp.src(['./app/*.html'])
|
||||
return gulp.src(['./public/*.html'])
|
||||
.pipe(ref())
|
||||
.pipe(gulp.dest('./dist'));
|
||||
});
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"gulp-useref": "^3.1.6"
|
||||
},
|
||||
"frontendDependencies": {
|
||||
"target": "app/vendor/",
|
||||
"target": "public/vendor/",
|
||||
"packages": {
|
||||
"riot": {
|
||||
"version": "3.13.2",
|
||||
|
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Loading…
Reference in New Issue