Skip to content

Commit

Permalink
Merge pull request #257 from petarvujovic98/develop
Browse files Browse the repository at this point in the history
Add Babel config programmatically
  • Loading branch information
volovyks authored Oct 11, 2022
2 parents 24628dc + 7e0e909 commit 0d9023c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
6 changes: 6 additions & 0 deletions cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ async function createJsFileWithRullup(sourceFileWithPath, rollupTarget) {
babel({
babelHelpers: "bundled",
extensions: [".ts", ".js", ".jsx", ".es6", ".es", ".mjs"],
presets: ["@babel/preset-typescript"],
plugins: [
"near-sdk-js/lib/build-tools/include-bytes.js",
"near-sdk-js/lib/build-tools/near-bindgen-exporter.js",
["@babel/plugin-proposal-decorators", { version: "legacy" }],
],
}),
],
});
Expand Down
8 changes: 0 additions & 8 deletions examples/babel.config.json

This file was deleted.

3 changes: 1 addition & 2 deletions examples/src/nested-collections.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { NearBindgen, near, call, view, UnorderedMap } from "near-sdk-js";
import { log } from "./log";

@NearBindgen({})
class Contract {
export class Contract {
outerMap: UnorderedMap<UnorderedMap<string>>;
groups: UnorderedMap<UnorderedMap<UnorderedMap<string>>>;

Expand Down
1 change: 1 addition & 0 deletions src/near-bindgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export function NearBindgen(options: {
requireInit?: boolean;
serializer?(value: unknown): string;
deserializer?(value: string): unknown;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}): any;
export function NearBindgen({
requireInit = false,
Expand Down
8 changes: 0 additions & 8 deletions tests/babel.config.json

This file was deleted.

0 comments on commit 0d9023c

Please sign in to comment.