Skip to content

Commit

Permalink
getConfigureFolders
Browse files Browse the repository at this point in the history
  • Loading branch information
cancerberoSgx committed Nov 18, 2018
1 parent 9e59e7a commit a93a01e
Show file tree
Hide file tree
Showing 15 changed files with 464 additions and 15 deletions.
1 change: 0 additions & 1 deletion info.txt

This file was deleted.

8 changes: 2 additions & 6 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"bundle": "npx tsc --project tsconfig-esm5.json && npx tsc --project tsconfig-esm6.json && npx tsc --project tsconfig-esm2018.json && mkdir -p dist/bundles && npx rollup -c rollup.config.js && npx rollup -c rollup.config.js --environment NODE_ENV:production",
"build": "npm run build-wasm && npm run build-ts",
"prepare": "npm run build && npm run copy && npm run magickApiJs",
"copy": "cp magick.js magick.wasm dist && cp magick.js magick.wasm spec/assets && cp -r spec/assets dist",
"copy": "npm run magickJs && mkdir -p dist && cp magick.js magick.wasm dist && cp magick.js magick.wasm spec/assets && cp -r spec/assets dist",
"magickApiJs": "cp dist/bundles/wasm-imagemagick.esm-es6.js magickApi.js",
"magickJs": "rm -rf magick.js && cp webworker.js magick.js && cat ImageMagick/utilities/magick.js >> magick.js",
"clean": "sh clean.sh",
"lint": "tslint \"src/**/*.ts\" \"spec/**/*.ts\"",
"lint-and-fix": "tslint \"src/**/*.ts\" \"spec/**/*.ts\" --fix",
Expand All @@ -26,7 +27,6 @@
"test-browser-watch-all": "concurrently 'npm run test-browser-watch-build' 'npm run test-browser-watch-server' ",
"test-browser-watch-build": "onchange -i -v 'src/**/*' 'spec/**/*' -- npm run test-browser-build",
"test-browser-watch-server": "onchange -k -v 'dist/bundle.js' -- gulp --gulpfile spec/gulpfile.js jasmine-server",

"apidocs": "typedoc --options typedoc.js --theme markdown"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion samples/interactive-execute-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"all": "npm run clean && npm run build && npm run copy",
"build": "tsc && npm run bundle",
"bundle": "browserify dist/index.js -o static/bundle.js",
"copy": "cp -r ../../spec/assets/fn.png ../../spec/assets/magick.* src/static/* static",
"copy": "here=`pwd` && cd ../.. && npm run copy && cd $here && cp -r ../../spec/assets/fn.png ../../spec/assets/magick.* src/static/* static",
"clean": "rm -rf dist static",
"start": "npm run all && npm run watch-all",
"server": "http-server static",
Expand Down
10 changes: 9 additions & 1 deletion samples/interactive-execute-context/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,15 @@ export class App extends React.Component<AppProps, AppState> {
}

protected async execute() {
const result = await this.props.context.execute(this.state.commandString)
// replace the $$IMAGE_N with the n-image in this.state.files
const cmd = (JSON.parse(this.state.commandArray) as string[][])
.map(c=>c.map(arg=>arg.startsWith('$$IMAGE_') ?
(this.state.files[parseInt(arg.substring('$$IMAGE_'.length, arg.length), 10)]||{name: 'rose:'}).name :
arg))

const result = await this.props.context.execute(cmd)

console.log(cmd, result);
this.state.outputFiles = result.outputFiles
this.state.stderr = result.stderr.join('\n')
this.state.stdout = result.stdout.join('\n')
Expand Down
14 changes: 14 additions & 0 deletions samples/interactive-execute-context/src/commandExamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ export const commandExamples: Example[] = [
description: `runs identify program to print to stdout image info`,
command: `identify rose:`.trim(),
},


{
name: '-print all image info',
description: `prints all properties artifacts and options of the image using -print and formatting the output`,
command: `
convert $$IMAGE_0 \\
-print '\\n__Properties__\\n\\n%[*]\\nsesba\\n\\nsa\\n' \\
-print '\\n__Artifacts__\\n\\n%[artifact:*]' \\
-print '\\n__Options__\\n\\n%[option:*]\\n' \\
info:
`.trim(),
},



{
Expand Down
Loading

0 comments on commit a93a01e

Please sign in to comment.