Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/6 #7

Merged
merged 2 commits into from
Apr 24, 2024
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
4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "idea-with-node",
"version": "0.1.3",
"version": "0.1.4",
"private": true,
"scripts": {
"transform": "idea",
"build": "tsc"
},
"devDependencies": {
"@types/node": "20.2.5",
"@ossph/idea": "0.1.3",
"@ossph/idea": "0.1.4",
"ts-morph": "22.0.0",
"ts-node": "10.9.1",
"typescript": "5.0.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/idea-language/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Implementation of idea language server in node.",
"author": "Chris <[email protected]>",
"license": "MIT",
"version": "0.1.3",
"version": "0.1.4",
"publisher": "ossph",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/idea-language/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "idea-langugage",
"displayName": "Idea",
"description": "Adds syntax highlighting, formatting, auto-completion, jump-to-definition and linting for .idea files.",
"version": "0.1.3",
"version": "0.1.4",
"license": "MIT",
"icon": "idea.png",
"repository": {
Expand Down Expand Up @@ -74,7 +74,7 @@
"test": "sh ./scripts/e2e.sh"
},
"dependencies": {
"@ossph/idea-parser": "0.1.3"
"@ossph/idea-parser": "0.1.4"
},
"devDependencies": {
"@types/mocha": "^9.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/idea-language/server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "idea-language-server",
"description": "Implementation of idea language server in node.",
"version": "0.1.3",
"version": "0.1.4",
"author": "Chris <[email protected]>",
"license": "MIT",
"engines": {
Expand All @@ -12,7 +12,7 @@
"url": "https://github.com/OSSPhilippines/idea"
},
"dependencies": {
"@ossph/idea-parser": "0.1.3",
"@ossph/idea-parser": "0.1.4",
"vscode-languageserver": "8.1.0",
"vscode-languageserver-textdocument": "1.0.8"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/idea-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ossph/idea-parser",
"version": "0.1.3",
"version": "0.1.4",
"license": "MIT",
"description": "Parses ideas to AST and readable JSON.",
"author": "Chris <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions packages/idea-transformer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ossph/idea-transformer",
"version": "0.1.3",
"version": "0.1.4",
"license": "MIT",
"description": "A programmatical command line interface used by projects and that calls on external transformers to make relevant code",
"author": "Chris <[email protected]>",
Expand All @@ -16,7 +16,7 @@
"test": "ts-mocha tests/*.test.ts"
},
"dependencies": {
"@ossph/idea-parser": "0.1.3"
"@ossph/idea-parser": "0.1.4"
},
"devDependencies": {
"@types/chai": "4.3.5",
Expand Down
17 changes: 14 additions & 3 deletions packages/idea-transformer/src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,26 @@ export default class Terminal {

//access to static methods from the instance
protected _terminal: typeof Terminal;
//current working directory
protected _cwd: string;
//cached cli args
protected _args: string[];
//cached terminal params (parsed argv)
protected _params: Record<string, any>|null = null;
//transformer
protected _transformer: TerminalTransformer;

/**
* Returns current working directory
*/
public get cwd() {
return this._cwd;
}

/**
* Creates the loader instance
*/
get params() {
public get params() {
if (!this._params) {
this._params = this.terminal.params(...this._args);
}
Expand All @@ -217,15 +226,17 @@ export default class Terminal {
/**
* Returns the static terminal interface
*/
get terminal() {
public get terminal() {
return this._terminal;
}

/**
* Preloads the input and output settings
*/
constructor(args: string[], cwd = Loader.cwd()) {
//get params
//set current working directory
this._cwd = cwd;
//set cli args
this._args = args;
this._terminal = this.constructor as typeof Terminal;
//get io from commandline
Expand Down
6 changes: 3 additions & 3 deletions packages/idea/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ossph/idea",
"version": "0.1.3",
"version": "0.1.4",
"license": "MIT",
"description": "An open source schema file standard and generator",
"author": "Chris <[email protected]>",
Expand All @@ -16,8 +16,8 @@
"build:files": "cp ./README.md ./dist/ && cp ./package.json ./dist/ && cp ./LICENSE ./dist/"
},
"dependencies": {
"@ossph/idea-parser": "0.1.3",
"@ossph/idea-transformer": "0.1.3"
"@ossph/idea-parser": "0.1.4",
"@ossph/idea-transformer": "0.1.4"
},
"devDependencies": {
"@types/node": "20.2.5",
Expand Down
Loading