Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 756c062

Browse files
committedFeb 7, 2021
Changing import statements to require.
For use without babel.
1 parent 1d86cbf commit 756c062

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed
 

‎src/job-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const axios = require('axios').default;
22
const logger = require('log4js').getLogger("modzy.job-client");
33

4-
import ApiError from './api-error.js';
4+
const ApiError = require('./api-error.js');
55

66
/**
77
* Utility class that mask the interaction with the job api

‎src/main.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
require('dotenv').config();
22
//
3-
import ModelClient from './model-client.js';
4-
import TagClient from './tag-client.js';
5-
import JobClient from './job-client.js';
6-
import ResultClient from './result-client.js';
7-
import ModzyClient from './modzy-client.js';
8-
import ApiError from './api-error.js';
3+
const ModelClient = require('./model-client.js');
4+
const TagClient = require( './tag-client.js');
5+
const JobClient = require('./job-client.js');
6+
const ResultClient = require('./result-client.js');
7+
const ModzyClient = require('./modzy-client.js');
8+
const ApiError = require('./api-error.js');
99

1010
/**
1111
* @type {{TagClient: TagClient, ResultClient: ResultClient, ModelClient: ModelClient, ModzyClient: ModzyClient, ApiError: ApiError, JobClient: JobClient}}

‎src/model-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const axios = require('axios').default;
22
const logger = require('log4js').getLogger("modzy.model-client");
33

4-
import ApiError from './api-error.js';
4+
const ApiError = require('./api-error.js');
55

66
/**
77
* Utility class that mask the interaction with the model api

‎src/modzy-client.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const logger = require('log4js').getLogger("modzy");
22

33

4-
import ModelClient from './model-client.js';
5-
import TagClient from './tag-client.js';
6-
import JobClient from './job-client.js';
7-
import ResultClient from './result-client.js';
4+
const ModelClient = require('./model-client.js');
5+
const TagClient = require('./tag-client.js');
6+
const JobClient = require('./job-client.js');
7+
const ResultClient = require('./result-client.js');
88

99
/**
1010
* Facade class that mask all the interactions with Modzy API

‎src/result-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const axios = require('axios').default;
22
const logger = require('log4js').getLogger("modzy.result-client");
33

4-
import ApiError from './api-error.js';
4+
const ApiError = require('./api-error.js');
55

66
/**
77
* Utility class that mask the interaction with the result api

‎src/tag-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const axios = require('axios').default;
22
const logger = require('log4js').getLogger("modzy.tag-client");
33

4-
import ApiError from './api-error.js';
4+
const ApiError = require('./api-error.js');
55

66
/**
77
* Utility class that mask the interaction with the model tags api

0 commit comments

Comments
 (0)
Please sign in to comment.