Skip to content

Commit

Permalink
Merge pull request #392 from sasjs/compile
Browse files Browse the repository at this point in the history
feat: CompileBuildDeploy command
  • Loading branch information
allanbowe authored Feb 24, 2023
2 parents 5d5d059 + 4dbe2e6 commit c72e164
Show file tree
Hide file tree
Showing 16 changed files with 4,778 additions and 2,956 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist
node_modules
.vscode-test/
*.vsix
.DS_Store
7 changes: 5 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
"typescript.tsc.autoDetect": "off",
"cSpell.words": [
"sasjsconfig"
]
}
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ If you have questions or would like support on the extension, visit our support
* [Code Execution](#code-execution)
* [Directory Synchronisation](#directory-synchronisation)
* [SAS Lint and Format](#sas-lint-and-format)
* [Compile, Build and Deploy](#compile-build-deploy)

## Code Documentation

Expand Down Expand Up @@ -47,7 +48,7 @@ The target 🎯 describes the server on which you intend to run the code. The a
The following attributes are needed for all server types:

- Name. An alias to represent the target.
- Server Url. The full URL (including port if needed) of your SAS server.
- Server Url. The full URL (including port if needed) of your SAS server.
- Server Type. Can be SASVIYA, SAS9 or SASJS.

Below are the setup steps specific to each server type
Expand Down Expand Up @@ -83,7 +84,7 @@ The [`syncDirectories`](https://cli.sasjs.io/sasjsconfig.html#syncDirectories) f

It works by hashing the remote files, comparing the hashes with the local files, and deploying only the changed files. No SSH access needed, all files are deployed using 100% SAS Code.

More information is in the [cli docs](https://cli.sasjs.io/fs) and this [explanatory video](https://vid.4gl.io/w/jKf6T8FxRTAdqQXWxUt36u).
More information is in the [cli docs](https://cli.sasjs.io/fs) and this [explanatory video](https://vid.4gl.io/w/jKf6T8FxRTAdqQXWxUt36u).

To configure, just add the `syncDirectories` [object](https://cli.sasjs.io/sasjsconfig.html#syncDirectories) to your local `sasjs/sasjsconfig.json` file. If this file does not exist, just click the Documentation icon to create one.

Expand Down Expand Up @@ -125,6 +126,18 @@ You can use this feature in two ways:
2. By enabling automatic formatting of files on save/paste from the Settings menu.
![image](https://user-images.githubusercontent.com/2980428/117259572-15b41800-ae46-11eb-9c7f-b9700b77405b.png)

## Compile, Build and Deploy

### Single File

If a `*.sas` file is selected and a `Compile, Build, Deploy` icon is clicked, then a single file will be compiled, built and deployed. Compiled and built files will be located in `sasjsbuild` folder at the root of the project. If an error appeared during the process, `log` file should be created in `sasjsresults` folder.
![image](./assets/screenshots/cbd-single-file.png)

### Project

if a `sasjsconfig.json` file is selected and a `Compile, Build, Deploy` icon is clicked, then an entire project will be compiled, built and deployed. Compiled and built files will be located in `sasjsbuild` folder at the root of the project. If an error appeared during the process, `log` file should be created in `sasjsresults` folder.
![image](./assets/screenshots/cbd-project.png)

## Contributions

SASjs is an open source project, and contributions are warmly welcomed!
Expand Down
Binary file added assets/images/cbd.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 removed assets/images/docs-dark.png
Binary file not shown.
Binary file removed assets/images/docs-light.png
Binary file not shown.
Binary file added assets/images/docs.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 assets/screenshots/cbd-project.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 assets/screenshots/cbd-single-file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { build } from 'esbuild'
const res = await build({
entryPoints: ['./src/extension.ts'],
outfile: 'out/extension.js',
external: ['vscode', '@sasjs/utils/fs', 'node-graphviz'],
external: ['vscode', '@sasjs/utils/fs', 'node-graphviz', '@sasjs/cli'],
format: 'cjs',
platform: 'node',
bundle: true,
Expand Down
Loading

0 comments on commit c72e164

Please sign in to comment.