Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Feed
feed
.DS_Store
build
*.log

# Logs
logs
Expand Down
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Fairpost cli handler
*/

import Logger from './src/Logger';
import Feed from './src/Feed';
import { PostStatus } from './src/Post';
import { PlatformSlug } from './src/platforms';
Expand All @@ -11,8 +12,8 @@ import { PlatformSlug } from './src/platforms';
const COMMAND = process.argv[2] ?? 'help'

// options
const DRY_RUN = !!getOption('dry-run') ?? false;
const CONFIG = (getOption('config') as string ) ?? '.env';
const DRY_RUN = !!getOption('dry-run') ?? false;
const REPORT = (getOption('report') as string ) ?? 'text';
const PLATFORMS = (getOption('platforms') as string)?.split(',') as PlatformSlug[] ?? undefined;
const FOLDERS = (getOption('folders') as string)?.split(',') ?? undefined;
Expand All @@ -37,8 +38,7 @@ async function main() {
let report = '';

const feed = new Feed(CONFIG);
report += 'Fairpost '+feed.path+' starting .. ',DRY_RUN?'dry-run':'';
report += '\n';
Logger.trace('Fairpost '+feed.path+' '+COMMAND,DRY_RUN?' dry-run':'');


try {
Expand Down
180 changes: 180 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"license": "ISC",
"dependencies": {
"dotenv": "^16.0.3",
"log4js": "^6.9.1",
"node-fetch": "^2.6.7",
"sharp": "0.31.1"
},
Expand Down
Loading