datagrok-tools 4.5.7 → 4.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/commands/create.js
CHANGED
|
@@ -193,7 +193,8 @@ function create(args) {
|
|
|
193
193
|
if (nOptions && !Object.keys(args).slice(1).every(function (op) {
|
|
194
194
|
return options.includes(op);
|
|
195
195
|
})) return false;
|
|
196
|
-
if (args.js && args.ts) return color.error('Incompatible options: --js and --ts');
|
|
196
|
+
if (args.js && args.ts) return color.error('Incompatible options: --js and --ts');
|
|
197
|
+
var ts = !args.js && args.ts !== false; // Create `config.yaml` if it doesn't exist yet
|
|
197
198
|
|
|
198
199
|
if (!_fs["default"].existsSync(grokDir)) _fs["default"].mkdirSync(grokDir);
|
|
199
200
|
if (!_fs["default"].existsSync(confPath)) _fs["default"].writeFileSync(confPath, _jsYaml["default"].dump(confTemplate));
|
|
@@ -264,9 +265,9 @@ function create(args) {
|
|
|
264
265
|
|
|
265
266
|
process.exit();
|
|
266
267
|
});
|
|
267
|
-
createDirectoryContents(name, config, templateDir, packageDir, args.ide,
|
|
268
|
+
createDirectoryContents(name, config, templateDir, packageDir, args.ide, ts, !!args.eslint, !!args.jest);
|
|
268
269
|
color.success('Successfully created package ' + name);
|
|
269
|
-
console.log(_entHelpers.help["package"](
|
|
270
|
+
console.log(_entHelpers.help["package"](ts));
|
|
270
271
|
console.log("\nThe package has the following dependencies:\n".concat(dependencies.join(' '), "\n"));
|
|
271
272
|
console.log('Running `npm install` to get the required dependencies...\n');
|
|
272
273
|
(0, _child_process.exec)('npm install', {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as DG from "datagrok-api/dg";
|
|
2
|
-
import * as grok from "datagrok-api/grok";
|
|
3
2
|
import {runTests} from "@datagrok-libraries/utils/src/test";
|
|
4
3
|
|
|
5
4
|
export let _package = new DG.Package();
|
|
@@ -9,4 +8,4 @@ export let _package = new DG.Package();
|
|
|
9
8
|
export async function test() {
|
|
10
9
|
let data = await runTests();
|
|
11
10
|
return DG.DataFrame.fromObjects(data);
|
|
12
|
-
}
|
|
11
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as DG from "datagrok-api/dg";
|
|
2
|
-
import * as grok from "datagrok-api/grok";
|
|
3
2
|
import {runTests, tests} from '@datagrok-libraries/utils/src/test';
|
|
4
3
|
|
|
5
4
|
export let _package = new DG.Package();
|
|
6
|
-
export {tests}
|
|
5
|
+
export {tests};
|
|
7
6
|
|
|
8
7
|
//name: test
|
|
9
8
|
//output: dataframe result
|
|
10
9
|
export async function test(): Promise<DG.DataFrame> {
|
|
11
10
|
let data = await runTests();
|
|
12
11
|
return DG.DataFrame.fromObjects(data)!;
|
|
13
|
-
}
|
|
12
|
+
}
|
package/package.json
CHANGED