Skip to content

Commit 79cbb67

Browse files
committed
Merge pull request #14 from pugjs/pug
Rename project to pug
2 parents 2f187f2 + 416f28a commit 79cbb67

File tree

10 files changed

+122
-122
lines changed

10 files changed

+122
-122
lines changed

HISTORY.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ As with most npm modules, this project adheres to
1515

1616
## [0.1.0] - 2015-07-24
1717
### Added
18-
- Silent mode (`-s`, `--silent`) which disables printing unimportant messages (#3, jadejs/jade#1905).
18+
- Silent mode (`-s`, `--silent`) which disables printing unimportant messages (#3, pugjs/jade#1905).
1919

2020
### Changed
2121
- Hierarchy mode (`-H`, `--hierarchy`) is made the default.
2222
- Both versions of Jade and the CLI are printed with `-V` or `--version`.
23-
- Unescaped Unicode line and paragraph separators (`U+2028` and `U+2029`) is now allowed in the `-O` option only when the input is considered to be JSON (#5, jadejs/jade#1949).
23+
- Unescaped Unicode line and paragraph separators (`U+2028` and `U+2029`) is now allowed in the `-O` option only when the input is considered to be JSON (#5, pugjs/jade#1949).
2424
- Non-JSON object files are allowed for the `-O` option as long as it can be parsed with the `eval()` function.
2525

2626
### Deprecated
@@ -30,12 +30,12 @@ As with most npm modules, this project adheres to
3030
### Fixed
3131
- Capitalization in help message is kept consistent.
3232
- Fix grammar error in the help message (by @didoarellano).
33-
- Fix watch mode in more than one level of dependency hierarchy (jadejs/jade#1888).
33+
- Fix watch mode in more than one level of dependency hierarchy (pugjs/jade#1888).
3434

3535
## 0.0.1 - 2015-06-02
3636
### Added
3737
- Initial release.
3838

39-
[unreleased]: https://github.com/jadejs/jade-cli/compare/0.1.1...master
40-
[0.1.1]: https://github.com/jadejs/jade-cli/compare/0.1.0...0.1.1
41-
[0.1.0]: https://github.com/jadejs/jade-cli/compare/0.0.1...0.1.0
39+
[unreleased]: https://github.com/pugjs/pug-cli/compare/0.1.1...master
40+
[0.1.1]: https://github.com/pugjs/pug-cli/compare/0.1.0...0.1.1
41+
[0.1.0]: https://github.com/pugjs/pug-cli/compare/0.0.1...0.1.0

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# jade-cli
1+
# pug-cli
22

3-
Jade's CLI interface
3+
Pug's CLI interface
44

5-
[![Build Status](https://img.shields.io/travis/jadejs/jade-cli/master.svg)](https://travis-ci.org/jadejs/jade-cli)
6-
[![Dependency Status](https://img.shields.io/gemnasium/jadejs/jade-cli.svg)](https://gemnasium.com/jadejs/jade-cli)
7-
[![NPM version](https://img.shields.io/npm/v/jade-cli.svg)](https://www.npmjs.org/package/jade-cli)
5+
[![Build Status](https://img.shields.io/travis/pugjs/pug-cli/master.svg)](https://travis-ci.org/pugjs/pug-cli)
6+
[![Dependency Status](https://img.shields.io/david/pugjs/pug-cli.svg)](https://david-dm.org/pugjs/pug-cli)
7+
[![NPM version](https://img.shields.io/npm/v/pug-cli.svg)](https://www.npmjs.org/package/pug-cli)
88

99
## Usage
1010

1111
```
12-
$ jade [options] [dir|file ...]
12+
$ pug [options] [dir|file ...]
1313
```
1414

1515
Render `<file>`s and all files in `<dir>`s. If no files are specified,
@@ -42,31 +42,31 @@ input is taken from standard input and output to standard output.
4242
Render all files in the `templates` directory:
4343

4444
```
45-
$ jade templates
45+
$ pug templates
4646
```
4747

4848
Create `{foo,bar}.html`:
4949

5050
```
51-
$ jade {foo,bar}.jade
51+
$ pug {foo,bar}.pug
5252
```
5353

54-
Using `jade` over standard input and output streams:
54+
Using `pug` over standard input and output streams:
5555

5656
```
57-
$ jade < my.jade > my.html
58-
$ echo "h1 Jade!" | jade
57+
$ pug < my.pug > my.html
58+
$ echo "h1 Pug!" | pug
5959
```
6060

6161
Render all files in `foo` and `bar` directories to `/tmp`:
6262

6363
```
64-
$ jade foo bar --out /tmp
64+
$ pug foo bar --out /tmp
6565
```
6666

6767
## Installation
6868

69-
npm install jade-cli -g
69+
npm install pug-cli -g
7070

7171
## License
7272

index.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var path = require('path');
77
var program = require('commander');
88
var mkdirp = require('mkdirp');
99
var chalk = require('chalk');
10-
var jade = require('jade');
10+
var pug = require('jade');
1111
var escapeRegex = require('escape-string-regexp');
1212

1313
var basename = path.basename;
@@ -17,16 +17,16 @@ var normalize = path.normalize;
1717
var join = path.join;
1818
var relative = path.relative;
1919

20-
// jade options
20+
// Pug options
2121

2222
var options = {};
2323

2424
// options
2525

2626
program
2727
.version(
28-
'jade version: ' + require('jade/package.json').version + '\n' +
29-
'jade-cli version: ' + require( './package.json').version
28+
'pug version: ' + require('jade/package.json').version + '\n' +
29+
'pug-cli version: ' + require( './package.json').version
3030
)
3131
.usage('[options] [dir|file ...]')
3232
.option('-O, --obj <str|path>', 'JSON/JavaScript options object or file')
@@ -47,17 +47,17 @@ program.on('--help', function(){
4747
console.log(' Examples:');
4848
console.log('');
4949
console.log(' # Render all files in the `templates` directory:');
50-
console.log(' $ jade templates');
50+
console.log(' $ pug templates');
5151
console.log('');
5252
console.log(' # Create {foo,bar}.html:');
53-
console.log(' $ jade {foo,bar}.jade');
53+
console.log(' $ pug {foo,bar}.pug');
5454
console.log('');
55-
console.log(' # Using `jade` over standard input and output streams');
56-
console.log(' $ jade < my.jade > my.html');
57-
console.log(' $ echo \'h1 Jade!\' | jade');
55+
console.log(' # Using `pug` over standard input and output streams');
56+
console.log(' $ pug < my.pug > my.html');
57+
console.log(' $ echo \'h1 Pug!\' | pug');
5858
console.log('');
5959
console.log(' # Render all files in `foo` and `bar` directories to `/tmp`:');
60-
console.log(' $ jade foo bar --out /tmp');
60+
console.log(' $ pug foo bar --out /tmp');
6161
console.log('');
6262
});
6363

@@ -221,36 +221,36 @@ function stdin() {
221221
process.stdin.on('end', function(){
222222
var output;
223223
if (options.client) {
224-
output = jade.compileClient(buf, options);
224+
output = pug.compileClient(buf, options);
225225
} else {
226-
var fn = jade.compile(buf, options);
226+
var fn = pug.compile(buf, options);
227227
var output = fn(options);
228228
}
229229
process.stdout.write(output);
230230
}).resume();
231231
}
232232

233233
/**
234-
* Process the given path, compiling the jade files found.
234+
* Process the given path, compiling the pug files found.
235235
* Always walk the subdirectories.
236236
*
237237
* @param path path of the file, might be relative
238238
* @param rootPath path relative to the directory specified in the command
239239
*/
240240

241241
function renderFile(path, rootPath) {
242-
var re = /\.jade$/;
242+
var re = /\.pug$/;
243243
var stat = fs.lstatSync(path);
244-
// Found jade file/\.jade$/
244+
// Found pug file/\.pug$/
245245
if (stat.isFile() && re.test(path)) {
246246
// Try to watch the file if needed. watchFile takes care of duplicates.
247247
if (options.watch) watchFile(path, null, rootPath);
248248
if (program.nameAfterFile) {
249249
options.name = getNameFromFileName(path);
250250
}
251251
var fn = options.client
252-
? jade.compileFileClient(path, options)
253-
: jade.compileFile(path, options);
252+
? pug.compileFileClient(path, options)
253+
: pug.compileFile(path, options);
254254
if (options.watch && fn.dependencies) {
255255
// watch dependencies, and recompile the base
256256
fn.dependencies.forEach(function (dep) {
@@ -264,7 +264,7 @@ function renderFile(path, rootPath) {
264264
else if (options.client) extname = '.js';
265265
else extname = '.html';
266266

267-
// path: foo.jade -> foo.<ext>
267+
// path: foo.pug -> foo.<ext>
268268
path = path.replace(re, extname);
269269
if (program.out) {
270270
// prepend output directory
@@ -300,7 +300,7 @@ function renderFile(path, rootPath) {
300300
* @returns {String}
301301
*/
302302
function getNameFromFileName(filename) {
303-
var file = basename(filename, '.jade');
303+
var file = basename(filename, '.pug');
304304
return file.toLowerCase().replace(/[^a-z0-9]+([a-z])/g, function (_, character) {
305305
return character.toUpperCase();
306306
}) + 'Template';

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "jade-cli",
2+
"name": "pug-cli",
33
"version": "0.1.1",
4-
"description": "Jade's CLI interface",
4+
"description": "Pug's CLI interface",
55
"bin": {
6-
"jade": "./index.js"
6+
"pug": "./index.js"
77
},
88
"preferGlobal": true,
99
"keywords": [],
@@ -27,7 +27,7 @@
2727
},
2828
"repository": {
2929
"type": "git",
30-
"url": "https://github.com/jadejs/jade-cli.git"
30+
"url": "https://github.com/pugjs/pug-cli.git"
3131
},
3232
"author": "TJ Holowaychuk <tj@vision-media.ca>",
3333
"maintainers": [

test/dependencies/dependency2.jade

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/dependencies/dependency2.pug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include dependency3.pug

test/dependencies/include2.jade

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/dependencies/include2.pug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include dependency2.pug

0 commit comments

Comments
 (0)