Skip to content

Commit

Permalink
Made the questions more personable
Browse files Browse the repository at this point in the history
  • Loading branch information
TheColorRed committed Dec 19, 2016
1 parent d52a93c commit 1db5f28
Show file tree
Hide file tree
Showing 17 changed files with 97 additions and 28 deletions.
Binary file added images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added laravel-artisan-0.0.1.vsix
Binary file not shown.
71 changes: 71 additions & 0 deletions npm-debug.log.2569815094
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'show', 'vsce', 'version' ]
2 info using [email protected]
3 info using [email protected]
4 silly mapToRegistry name vsce
5 silly mapToRegistry using default registry
6 silly mapToRegistry registry https://registry.npmjs.org/
7 silly mapToRegistry data Result {
7 silly mapToRegistry raw: 'vsce',
7 silly mapToRegistry scope: null,
7 silly mapToRegistry escapedName: 'vsce',
7 silly mapToRegistry name: 'vsce',
7 silly mapToRegistry rawSpec: '',
7 silly mapToRegistry spec: 'latest',
7 silly mapToRegistry type: 'tag' }
8 silly mapToRegistry uri https://registry.npmjs.org/vsce
9 verbose request uri https://registry.npmjs.org/vsce
10 verbose request no auth needed
11 info attempt registry request try #1 at 11:23:10 AM
12 verbose request using bearer token for auth
13 verbose request id 5df8f0243b558bf8
14 verbose etag W/"58491be1-1211c"
15 verbose lastModified Thu, 08 Dec 2016 08:37:53 GMT
16 http request GET https://registry.npmjs.org/vsce
17 http 304 https://registry.npmjs.org/vsce
18 verbose headers { server: 'nginx/1.10.1',
18 verbose headers 'last-modified': 'Thu, 08 Dec 2016 08:37:53 GMT',
18 verbose headers etag: '"58491be1-1211c"',
18 verbose headers 'cache-control': 'max-age=300',
18 verbose headers 'accept-ranges': 'bytes',
18 verbose headers date: 'Sun, 18 Dec 2016 17:23:10 GMT',
18 verbose headers via: '1.1 varnish',
18 verbose headers connection: 'keep-alive',
18 verbose headers 'x-served-by': 'cache-ord1731-ORD',
18 verbose headers 'x-cache': 'MISS',
18 verbose headers 'x-cache-hits': '0',
18 verbose headers 'x-timer': 'S1482081790.714912,VS0,VE19',
18 verbose headers vary: 'Accept-Encoding' }
19 silly get cb [ 304,
19 silly get { server: 'nginx/1.10.1',
19 silly get 'last-modified': 'Thu, 08 Dec 2016 08:37:53 GMT',
19 silly get etag: '"58491be1-1211c"',
19 silly get 'cache-control': 'max-age=300',
19 silly get 'accept-ranges': 'bytes',
19 silly get date: 'Sun, 18 Dec 2016 17:23:10 GMT',
19 silly get via: '1.1 varnish',
19 silly get connection: 'keep-alive',
19 silly get 'x-served-by': 'cache-ord1731-ORD',
19 silly get 'x-cache': 'MISS',
19 silly get 'x-cache-hits': '0',
19 silly get 'x-timer': 'S1482081790.714912,VS0,VE19',
19 silly get vary: 'Accept-Encoding' } ]
20 verbose etag https://registry.npmjs.org/vsce from cache
21 verbose get saving vsce to /home/ryan/.npm/registry.npmjs.org/vsce/.cache.json
22 verbose correctMkdir /home/ryan/.npm correctMkdir not in flight; initializing
23 verbose exit [ 0, true ]
24 verbose stack Error: write EPIPE
24 verbose stack at exports._errnoException (util.js:1022:11)
24 verbose stack at WriteWrap.afterWrite (net.js:801:14)
25 verbose cwd /home/ryan/Documents/vscode/projects/laravel-artisan
26 error Linux 4.8.0-30-generic
27 error argv "/usr/bin/nodejs" "/usr/bin/npm" "show" "vsce" "version"
28 error node v6.9.2
29 error npm v3.10.9
30 error code EPIPE
31 error errno EPIPE
32 error syscall write
33 error write EPIPE
34 error If you need help, you may report this error at:
34 error <https://github.com/npm/npm/issues>
35 verbose exit [ 1, true ]
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"name": "laravel-artisan",
"displayName": "laravel-artisan",
"displayName": "Laravel Artisan",
"description": "Laravel Artisan commands within Visual Studio Code",
"icon": "images/icon.png",
"version": "0.0.1",
"publisher": "ryannaddy",
"author": {
"name": "Ryan Naddy",
"url": "http://ryannaddy.com"
},
"repository": {
"type": "git",
"url": "https://github.com/TheColorRed/vscode-laravel-artisan"
Expand All @@ -21,8 +18,12 @@
"categories": [
"Other"
],
"keywords": [
"Laravel",
"Artisan"
],
"activationEvents": [
"*"
"workspaceContains:artisan"
],
"main": "./out/src/extension",
"contributes": {
Expand Down
2 changes: 1 addition & 1 deletion src/base/Migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class Migrate extends Common {

public static async run() {

let seed = await this.getYesNo('Should the database be seeded?');
let seed = await this.getYesNo('Should I seed the database for you?');

cp.exec(`php ${this.artisan} migrate ${seed ? '--seed' : ''}`, async (err) => {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/key/Generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class KeyGenerate extends Common {

public static async run() {

let update = await this.getYesNo('Should the env file get update also?');
let update = await this.getYesNo('Should I update the env file?');

cp.exec(`php ${this.artisan} key:generate ${!update ? '--show' : ''}`, async (err, stdout) => {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/make/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class MakeController extends Common {
return;
}

let consoleName = await this.getInput('The terminal command name (Default is "command:name")');
let consoleName = await this.getInput('What is the terminal command name? (Default is "command:name")');

cp.exec(`php ${this.artisan} make:command ${cmdName} ${consoleName.length > 0 ? '--command=' + consoleName : ''}`, async (err) => {
if (err) {
Expand Down
3 changes: 1 addition & 2 deletions src/make/Controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export default class MakeController extends Common {
}

// Determine if this is a resource controller or not
let resource = await window.showQuickPick(['Yes', 'No'], { placeHolder: 'Generate as a resource controller?' });
let isResource = resource.toLowerCase() == 'yes' ? true : false;
let isResource = await this.getYesNo('Should I make this a resource controller?');

// Generate the controller
cp.exec(`php ${this.artisan} make:controller ${ctrlName} ${isResource ? '-r' : ''}`, async (err) => {
Expand Down
2 changes: 1 addition & 1 deletion src/make/Job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class MakeJob extends Common {
return;
}

let sync = await this.getYesNo('Should this job be synchronous?');
let sync = await this.getYesNo('Should I make this job synchronous?');

cp.exec(`php ${this.artisan} make:job ${jobName} ${sync ? '--sync' : ''}`, async (err) => {
if (err) {
Expand Down
4 changes: 2 additions & 2 deletions src/make/Listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export default class MakeListener extends Common {
return;
}

let event = await this.getInput('The event class to listen for');
let event = await this.getInput('What event class should I listen for?');

let queued = await this.getYesNo('Should the listener be queued?');
let queued = await this.getYesNo('Should I make the listener queued?');

cp.exec(`php ${this.artisan} make:listener ${listenerName} ${event.length > 0 ? '--event=' + event : ''} ${queued ? '--queued' : ''}`, async (err) => {
if (err) {
Expand Down
4 changes: 2 additions & 2 deletions src/make/Migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export default class MakeMigration extends Common {
let tableName = '';

// Determine if this is a resource controller or not
createTable = await this.getYesNo('Will this create a table?');
createTable = await this.getYesNo('Will this migration create a table?');
if (!createTable) {
modifyTable = await this.getYesNo('Will this modify an existing table?');
modifyTable = await this.getYesNo('Will this migration modify an existing table?');
}

if (createTable || modifyTable) {
Expand Down
10 changes: 4 additions & 6 deletions src/make/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,19 @@ export default class MakeModel extends Common {
return;
}
let isController = false;
let isMigration = false;
let isResource = false;

// Determine if this is a resource controller or not
let migration = await window.showQuickPick(['Yes', 'No'], { placeHolder: 'Generate a migration for the model?' });
let isMigration = migration.toLowerCase() == 'yes' ? true : false;
isMigration = await this.getYesNo('Should I create a migration for the model?');

// Should a controller be generated?
let controller = await window.showQuickPick(['Yes', 'No'], { placeHolder: 'Generate a controller for the model?' });
isController = controller.toLowerCase() == 'yes' ? true : false;
isController = await this.getYesNo('Should I create a controller for the model?');

// Ask if the controller is a resource if the previous answer was 'yes'
if (isController) {
// Determine if this is a resource controller or not
let resource = await window.showQuickPick(['Yes', 'No'], { placeHolder: 'Generate as a resource controller?' });
isResource = resource.toLowerCase() == 'yes' ? true : false;
isResource = await this.getYesNo('Should I create the controller as a resource?');
}

// Generate the model
Expand Down
2 changes: 1 addition & 1 deletion src/make/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class MakePolicy extends Common {
return;
}

let model = await this.getInput('The model to apply this policy to');
let model = await this.getInput('What model should I apply this policy to?');

cp.exec(`php ${this.artisan} make:policy ${noteName} ${model.length > 0 ? '--model=' + model : ''}`, async (err) => {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/migrate/Install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class MigrateInstall extends Common {

public static async run() {

let database = await this.getInput('Database to use (Leave blank to use the default database)');
let database = await this.getInput('What database should I use?');

cp.exec(`php ${this.artisan} migrate:install ${database.length > 0 ? '--database=' + database : ''}`, async (err) => {
if (err) {
Expand Down
4 changes: 2 additions & 2 deletions src/migrate/Refresh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export default class MigrateRefresh extends Common {

public static async run() {

let database = await this.getInput('Database to use (Leave blank to use the default database)');
let database = await this.getInput('What database should I use?');

let seed = await this.getYesNo('Should the database be seeded?');
let seed = await this.getYesNo('Should I seed the database for you?');

cp.exec(`php ${this.artisan} migrate:refresh ${database.length > 0 ? '--database=' + database : ''} ${seed ? '--seed' : ''}`, async (err) => {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/migrate/Reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class MigrateReset extends Common {

public static async run() {

let database = await this.getInput('Database to use (Leave blank to use the default database)');
let database = await this.getInput('What database should I use?');

cp.exec(`php ${this.artisan} migrate:reset ${database.length > 0 ? '--database=' + database : ''}`, async (err) => {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/migrate/Rollback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class MigrateRollback extends Common {

public static async run() {

let database = await this.getInput('Database to use (Leave blank to use the default database)');
let database = await this.getInput('What database should I use?');

cp.exec(`php ${this.artisan} migrate:rollback ${database.length > 0 ? '--database=' + database : ''}`, async (err) => {
if (err) {
Expand Down

0 comments on commit 1db5f28

Please sign in to comment.