mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
feature: client: dom: operations: rename-current: migrate to ESM
This commit is contained in:
parent
2e486f8bed
commit
c1014c9cc0
3 changed files with 10 additions and 16 deletions
|
|
@ -7,7 +7,7 @@ import {getExt} from '#common/util';
|
|||
import * as Storage from '#dom/storage';
|
||||
import * as RESTful from '#dom/rest';
|
||||
import * as Images from './images.mjs';
|
||||
import renameCurrent from './operations/rename-current.js';
|
||||
import renameCurrent from './operations/rename-current.mjs';
|
||||
import * as CurrentFile from './current-file.mjs';
|
||||
import * as DOMTree from './dom-tree.mjs';
|
||||
import * as Cmd from './cmd.mjs';
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
/* global CloudCmd */
|
||||
const capitalize = require('just-capitalize');
|
||||
import capitalize from 'just-capitalize';
|
||||
import * as _Dialog from '#dom/dialog';
|
||||
import * as Storage from '#dom/storage';
|
||||
import * as RESTful from '#dom/rest';
|
||||
import * as _currentFile from '../current-file.mjs';
|
||||
|
||||
const _Dialog = require('#dom/dialog');
|
||||
const Storage = require('#dom/storage');
|
||||
const RESTful = require('#dom/rest');
|
||||
|
||||
const _currentFile = require('../current-file.mjs');
|
||||
|
||||
module.exports = async (current, overrides = {}) => {
|
||||
export default async (current, overrides = {}) => {
|
||||
const {
|
||||
refresh = CloudCmd.refresh,
|
||||
Dialog = _Dialog,
|
||||
|
|
@ -1,8 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
const {test, stub} = require('supertape');
|
||||
|
||||
const renameCurrent = require('./rename-current');
|
||||
import {test, stub} from 'supertape';
|
||||
import renameCurrent from './rename-current.mjs';
|
||||
|
||||
test('cloudcmd: client: dom: renameCurrent: isCurrentFile', async (t) => {
|
||||
const current = {};
|
||||
|
|
@ -87,3 +84,4 @@ const stubCurrentFile = (fns = {}) => {
|
|||
setCurrentName,
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue