Skip to content

Commit

Permalink
add sissi commands
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKott committed Apr 17, 2019
1 parent 41c2180 commit 13b2bd7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sissi-cli",
"version": "1.0.0",
"version": "0.1.0",
"description": "Command line interface for sissi (simple static sites)",
"license": "GPL-3.0-or-later",
"author": "A square",
Expand All @@ -16,6 +16,9 @@
"static-site-generator",
"cli"
],
"bin": {
"sissi": "./bin/run"
},
"main": "lib/index.js",
"devDependencies": {
"@babel/cli": "^7.2.3",
Expand Down
17 changes: 17 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const exec = require('child_process').exec;
const yeoman = require('yeoman-environment');
const packageJson = require('../package.json');

Expand All @@ -16,6 +17,22 @@ module.exports = function run(args, flags) {
env.run('sissi:new');
return;

case 'start':
try {
exec('sissi-core start');
} catch (error) {
console.log('I have trouble running this command. Are you sure you\'re in a sissi project folder?');
}
return;

case 'dev':
try {
exec('sissi-core dev');
} catch (error) {
console.log('I have trouble running this command. Are you sure you\'re in a sissi project folder?');
}
return;

default:
console.log('Sorry, I don\'t understand.');
}
Expand Down
1 change: 0 additions & 1 deletion src/templates/_.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ node_modules
/public/images
/public/_tmp
/public/sissi-styles.css
/public/_tmp/sissi-script.js

/config.json
/content.json
Expand Down

0 comments on commit 13b2bd7

Please sign in to comment.