Skip to content

Commit fe61a14

Browse files
Organize templates in templates path
1 parent 00d2f52 commit fe61a14

14 files changed

Lines changed: 49 additions & 4 deletions

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var request = require('request'),
33
myHost = 'http://cssinliner.dev/',
44
myBody = null,
55
myPath = null,
6+
myTemplatesPath = 'templates/',
67
myOutput = 'output',
78
myPrefix = '- ';
89

@@ -15,18 +16,18 @@ process.argv.forEach(
1516

1617
if(myPath != null){
1718
try {
18-
stats = fs.lstatSync(myPath);
19+
stats = fs.lstatSync(myTemplatesPath + myPath);
1920
if (stats.isDirectory()) {
2021

21-
request(myHost + myPath + '/' + myPath + '.php',
22+
request(myHost + myTemplatesPath + myPath + '/' + myPath + '.php',
2223
function(err, response, body) {
2324

2425
if(err) console.log(err);
2526

2627
myBody = body;
2728
console.log(myPrefix + 'Its works');
2829

29-
fs.writeFile(myPath + '/' + myOutput + '.html', myBody,
30+
fs.writeFile(myTemplatesPath + myPath + '/' + myOutput + '.html', myBody,
3031
function(err) {
3132
if(err) {
3233
return console.log(err);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
require __DIR__ . '/../vendor/autoload.php';
3+
require __DIR__ . '/../../vendor/autoload.php';
44

55
use Northys\CSSInliner\CSSInliner;
66

File renamed without changes.

examples/images/newsletter_03_2014_profi_dj_02.jpg renamed to templates/example/images/newsletter_03_2014_profi_dj_02.jpg

File renamed without changes.

examples/images/newsletter_03_2014_profi_dj_03.jpg renamed to templates/example/images/newsletter_03_2014_profi_dj_03.jpg

File renamed without changes.

examples/images/newsletter_03_2014_profi_dj_04.jpg renamed to templates/example/images/newsletter_03_2014_profi_dj_04.jpg

File renamed without changes.

examples/images/newsletter_03_2014_profi_dj_05.jpg renamed to templates/example/images/newsletter_03_2014_profi_dj_05.jpg

File renamed without changes.

examples/images/newsletter_03_2014_profi_dj_06.jpg renamed to templates/example/images/newsletter_03_2014_profi_dj_06.jpg

File renamed without changes.

examples/images/newsletter_03_2014_profi_dj_07.jpg renamed to templates/example/images/newsletter_03_2014_profi_dj_07.jpg

File renamed without changes.

examples/images/newsletter_03_2014_profi_dj_08.jpg renamed to templates/example/images/newsletter_03_2014_profi_dj_08.jpg

File renamed without changes.

0 commit comments

Comments
 (0)