Skip to content

Commit

Permalink
chore(gen): replace all instances of jade with pug (#2128)
Browse files Browse the repository at this point in the history
closes #1802
  • Loading branch information
Awk34 authored Aug 8, 2016
1 parent 3abd039 commit 65c7655
Show file tree
Hide file tree
Showing 20 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ etc | etc
Item | Answer
----- | -----
Transpiler | Babel / TypeScript
Markup | HTML / Jade
Markup | HTML / Pug
CSS | CSS / LESS / SCSS / Stylus
Router | ngRoute / ui-router
Client Tests | Jasmine / Mocha
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ yo angular-fullstack
```

You'll then be asked a series of questions regarding options for the generated app. Such things include using JavaScript or TypeScript,
HTML or Jade, Bootstrap, SQL, and so on. If you don't know what to answer for a question, just hitting `ENTER` will use the default options
HTML or Pug, Bootstrap, SQL, and so on. If you don't know what to answer for a question, just hitting `ENTER` will use the default options
for that question, and move on to the next one.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ yo angular-fullstack

* Scripts: `JavaScript (Babel)`, `TypeScript`
* Module Systems: `Webpack`, `SystemJS + JSPM` (maybe)
* Markup: `HTML`, `Jade`
* Markup: `HTML`, `Pug`
* Stylesheets: `CSS`, `Stylus`, `Sass`, `Less`
* Angular Routers: `ngRoute`, `ui-router`
* CSS Frameworks: `Bootstrap`
Expand Down
6 changes: 3 additions & 3 deletions src/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class Generator extends Base {
this.filters = existingFilters;

this.scriptExt = this.filters.ts ? 'ts' : 'js';
this.templateExt = this.filters.jade ? 'jade' : 'html';
this.templateExt = this.filters.pug ? 'pug' : 'html';
this.styleExt = this.filters.sass ? 'scss' :
this.filters.less ? 'less' :
this.filters.stylus ? 'styl' :
Expand Down Expand Up @@ -169,7 +169,7 @@ export class Generator extends Base {
type: 'list',
name: 'markup',
message: 'What would you like to write markup with?',
choices: ['HTML', 'Jade'],
choices: ['HTML', 'Pug'],
filter: val => val.toLowerCase()
}, {
type: 'list',
Expand Down Expand Up @@ -408,7 +408,7 @@ export class Generator extends Base {
if(this.filters.ts) extensions.push('ts');
if(this.filters.js) extensions.push('js');
if(this.filters.html) extensions.push('html');
if(this.filters.jade) extensions.push('jade');
if(this.filters.pug) extensions.push('pug');
if(this.filters.css) extensions.push('css');
if(this.filters.stylus) extensions.push('styl');
if(this.filters.sass) extensions.push('scss');
Expand Down
2 changes: 1 addition & 1 deletion src/test/get-expected-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function app(options) {
css: 'css'
},
markup: {
jade: 'jade',
pug: 'pug',
html: 'html'
},
script: {
Expand Down
8 changes: 4 additions & 4 deletions src/test/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ describe('angular-fullstack:app', function() {
});
});

describe('with TypeScript, Jade, Jasmine, LESS, & OAuth', function() {
describe('with TypeScript, Pug, Jasmine, LESS, & OAuth', function() {
var dir;
var lintResult;
var clientTestResult;
var serverTestResult;
var testOptions = {
buildtool: 'gulp',
transpiler: 'ts',
markup: 'jade',
markup: 'pug',
stylesheet: 'less',
router: 'uirouter',
testing: 'jasmine',
Expand Down Expand Up @@ -263,7 +263,7 @@ describe('angular-fullstack:app', function() {
var testOptions = {
buildtool: 'gulp',
transpiler: 'babel',
markup: 'jade',
markup: 'pug',
stylesheet: 'css',
router: 'uirouter',
testing: 'jasmine',
Expand Down Expand Up @@ -335,7 +335,7 @@ describe('angular-fullstack:app', function() {
var testOptions = {
buildtool: 'gulp',
transpiler: 'ts',
markup: 'jade',
markup: 'pug',
stylesheet: 'stylus',
router: 'uirouter',
testing: 'mocha',
Expand Down
6 changes: 3 additions & 3 deletions templates/app/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"lodash": "^4.6.1",
"lusca": "^1.3.0",
"babel-runtime": "^6.6.1",
"babel-polyfill": "^6.7.2",<% if(filters.jade) { %>
"jade": "^1.11.0",<% } %><% if(filters.html) { %>
"babel-polyfill": "^6.7.2",<% if(filters.pug) { %>
"pug": "2.0.0-beta4",<% } %><% if(filters.html) { %>
"ejs": "^2.3.3",<% } %><% if(filters.mongoose) { %>
"mongoose": "^4.1.2",
"bluebird": "^3.3.3",
Expand Down Expand Up @@ -115,7 +115,7 @@
"extract-text-webpack-plugin": "^1.0.1",
"html-webpack-plugin": "^2.16.0",
"html-webpack-harddisk-plugin": "~0.0.2",
<%_ if(filters.jade) { _%>
<%_ if(filters.pug) { _%>
"pug-html-loader": "^1.0.8",<% } %>
"awesome-typescript-loader": "0.17.0",
"ng-annotate-loader": "~0.1.0",
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions templates/app/server/config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export default function(app) {

app.set('views', config.root + '/server/views');<% if (filters.html) { %>
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');<% } %><% if (filters.jade) { %>
app.set('view engine', 'jade');<% } %>
app.set('view engine', 'html');<% } %><% if (filters.pug) { %>
app.set('view engine', 'pug');<% } %>
app.use(shrinkRay());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion templates/app/webpack.make.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ module.exports = function makeWebpackConfig(options) {
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)([\?]?.*)$/,
loader: 'file'
}, {
<%_ if(filters.jade) { _%>
<%_ if(filters.pug) { _%>
// Pug HTML LOADER
// Reference: https://github.com/willyelm/pug-html-loader
// Allow loading Pug throw js
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/.yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"expect",
"should",
"uirouter",
"es6"
"es6",
"webpack"
],
"extensions": [
"babel",
Expand Down

0 comments on commit 65c7655

Please sign in to comment.