Skip to content

Commit

Permalink
refactor: small formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
erisu committed Apr 16, 2020
1 parent e33c8dc commit 950abb5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,16 @@
*/

const fs = require('fs-extra');

const path = require('path');

const tmp = require('tmp');
const npa = require('npm-package-arg');
const globby = require('globby');
const isObject = require('isobject');
const pathIsInside = require('path-is-inside');
const requireFresh = require('import-fresh');
const validateIdentifier = require('valid-identifier');

const fetch = require('cordova-fetch');
const CordovaError = require('cordova-common').CordovaError;
const ConfigParser = require('cordova-common').ConfigParser;
const { CordovaError, ConfigParser } = require('cordova-common');

module.exports = cordovaCreate;

Expand Down
6 changes: 1 addition & 5 deletions spec/create.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@

const fs = require('fs-extra');
const rewire = require('rewire');

const path = require('path');

const requireFresh = require('import-fresh');

const create = require('..');
const CordovaError = require('cordova-common').CordovaError;
const ConfigParser = require('cordova-common').ConfigParser;
const { CordovaError, ConfigParser } = require('cordova-common');
const { tmpDir, createWith, createWithMockFetch, expectRejection } = require('./helpers');

const appName = 'TestBase';
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
const fs = require('fs-extra');
const os = require('os');
const path = require('path');

const rewire = require('rewire');

// Temporary directory to use for all tests
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cordova-create-tests-'));

// Returns a version of create with its local scope rewired
const create = rewire('..');

function createWith (rewiring) {
return (...args) => create.__with__(rewiring)(() => create(...args));
}
Expand Down
1 change: 1 addition & 0 deletions spec/templates/withsubdirectory/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path');

module.exports = {
'dirname': path.join(__dirname, 'template')
};
1 change: 1 addition & 0 deletions spec/templates/withsubdirectory_package_json/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path');

module.exports = {
'dirname': path.join(__dirname, 'template')
};

0 comments on commit 950abb5

Please sign in to comment.