Skip to content

Commit

Permalink
Moving Jade for Pug Qualy-org#20
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeiroevandro committed Oct 31, 2016
1 parent 52df63b commit a158cdb
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<img src="https://raw.githubusercontent.com/willianjusten/qualy/master/src/img/qualy.png" alt="Qualy">

This projects uses ES6, Jade, Stylus, Gulp and Browsersync. The main objective of this boilerplate is to ensure Quality to our code with Code Standards and Hooks to prevent messy codes to be committed or pushed.
This projects uses ES6, Pug, Stylus, Gulp and Browsersync. The main objective of this boilerplate is to ensure Quality to our code with Code Standards and Hooks to prevent messy codes to be committed or pushed.

Maybe you want to read about them:
- [GulpJS](http://gulpjs.com/)
- [Jade](http://jade-lang.com/)
- [Pug](https://pugjs.org/)
- [Stylus](http://learnboost.github.io/stylus/)
- [Browsersync](https://www.browsersync.io/)

Expand All @@ -22,8 +22,8 @@ First of all, install the dependencies to run this boilerplate.

```sh
# Clone this repository
$ git clone [email protected]:Qualy-org/qualy.git
$ cd qualy
$ git clone [email protected]:Qualy-org/qualy-front.git
$ cd qualy-front

# install dependencies
$ npm install
Expand All @@ -39,15 +39,17 @@ With the commands above, you have everything to start.
│   ├── css
│   │   └── main.css
│   ├── img
│   │   └── eventos.jpg
│   │   └── qualy.png
│ │   └── favicon.png
│   ├── index.html
│   └── js
│   └── main.js
├── gulpfile.babel.js
├── package.json
└── src
├── img
│   └── eventos.jpg
│   └── qualy.png
│   └── favicon.png
├── js
│   ├── main.js
├── styl
Expand All @@ -67,7 +69,7 @@ With the commands above, you have everything to start.
│   | └── _trumps.styl
│   └── main.styl
└── templates
└── index.jade
└── index.pug
```

Those folders and file will change during the project.
Expand All @@ -84,7 +86,7 @@ To help you, this project has a `npm run fix` command to fix all jscs errors.

- `gulp`: run all tasks and initialize watch for changes and a server
- `gulp js`: execute js files
- `gulp jade`: compile jade files
- `gulp pug`: compile pug files
- `gulp css`: compile stylus files
- `gulp images`: compress image files
- `gulp browser-sync`: inicialize a server
Expand Down
28 changes: 14 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const koutoSwiss = require('kouto-swiss');
const prefixer = require('autoprefixer-stylus');
const rollup = require('gulp-rollup');
const uglify = require('gulp-uglify');
const jade = require('gulp-jade');
const pug = require('gulp-pug');
const imagemin = require('gulp-imagemin');
const browserSync = require('browser-sync');
const ghPages = require('gulp-gh-pages');
Expand All @@ -25,17 +25,17 @@ const srcPaths = {
js: 'src/js/main.js',
css: 'src/styl/**/*.styl',
mainStyl: 'src/styl/main.styl',
jade: 'src/templates/**/!(_)*.jade',
pug: 'src/templates/**/!(_)*.pug',
img: 'src/img/**/*'
};

const buildPaths = {
build: 'build/**/*',
js: 'build/js/',
css: 'build/css/',
jade: 'build/',
pug: 'build/',
img: 'build/img',
tests: {
tests: {
perf: 'tests/perf',
complexity: 'tests/complexity'
}
Expand Down Expand Up @@ -63,11 +63,11 @@ gulp.task('js', () => {
.pipe(gulp.dest(buildPaths.js));
});

gulp.task('jade', () => {
gulp.src(srcPaths.jade)
gulp.task('pug', () => {
gulp.src(srcPaths.pug)
.pipe(plumber())
.pipe(jade())
.pipe(gulp.dest(buildPaths.jade));
.pipe(pug())
.pipe(gulp.dest(buildPaths.pug));
});

gulp.task('images', () => {
Expand All @@ -82,7 +82,7 @@ gulp.task('images', () => {
});

gulp.task('watch', () => {
gulp.watch(srcPaths.jade, ['jade']);
gulp.watch(srcPaths.pug, ['pug']);
gulp.watch(srcPaths.css, ['css']);
gulp.watch(srcPaths.js, ['js']);
gulp.watch(srcPaths.img, ['images']);
Expand All @@ -106,9 +106,9 @@ gulp.task('pages', () => {
});

gulp.task('test:perf', sitespeedio({
url: 'http://localhost:3000',
resultBaseDir: buildPaths.tests.perf,
suppressDomainFolder: true,
url: 'http://localhost:3000',
resultBaseDir: buildPaths.tests.perf,
suppressDomainFolder: true,
html: true
}));

Expand All @@ -124,6 +124,6 @@ gulp.task('test:complexity', () => gulp.src(srcPaths.js)
}
})));

gulp.task('default', ['css', 'jade', 'js', 'images', 'watch', 'browser-sync']);
gulp.task('default', ['css', 'pug', 'js', 'images', 'watch', 'browser-sync']);
gulp.task('test', ['browser-sync', 'test:perf', 'test:complexity']);
gulp.task('deploy', ['css', 'jade', 'js', 'images', 'pages']);
gulp.task('deploy', ['css', 'pug', 'js', 'images', 'pages']);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"gulp-gh-pages": "^0.5.4",
"gulp-group-css-media-queries": "^1.1.0",
"gulp-imagemin": "^2.4.0",
"gulp-jade": "^1.1.0",
"gulp-plato": "^1.0.2",
"gulp-plumber": "^1.1.0",
"gulp-pug": "^3.1.0",
"gulp-rollup": "^1.8.0",
"gulp-sitespeedio": "0.0.8",
"gulp-sourcemaps": "^1.6.0",
Expand Down
Binary file added src/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/templates/index.jade → src/templates/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ html
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(name='description' content="meta desc")
meta(name='viewport' content='width=device-width, initial-scale=1.0')
link(rel="icon", type="image/png", href="img/favicon.png")
link(rel="stylesheet", type="text/css", href="css/main.css")

body
Expand All @@ -14,7 +15,7 @@ html
h1 Qualy Boilerplate
img(src="img/qualy.png", alt="Qualy Boilerplate")

- var tech = ['ES6', 'Gulp', 'Stylus', 'Jade', 'Browsersync', 'Husky Hooks', 'JSCS']
- var tech = ['ES6', 'Gulp', 'Stylus', 'Pug', 'Browsersync', 'Husky Hooks', 'JSCS']

h2 Technologies:

Expand Down

0 comments on commit a158cdb

Please sign in to comment.