You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ra...@apache.org on 2019/11/11 12:41:38 UTC

[cordova-lib] branch master updated: refactor: remove stub interface to `cordova-create` (#820)

This is an automated email from the ASF dual-hosted git repository.

raphinesse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-lib.git


The following commit(s) were added to refs/heads/master by this push:
     new 144314c  refactor: remove stub interface to `cordova-create` (#820)
144314c is described below

commit 144314c568258539a787f0427bab943e52a45ad1
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Mon Nov 11 13:41:31 2019 +0100

    refactor: remove stub interface to `cordova-create` (#820)
    
    Instead, `cordova-create` should be depended on directly by its users.
    
    Follow-up to apache/cordova-cli#489
    
    BREAKING CHANGE: removes export `cordova.create`
---
 spec/cordova/create.spec.js | 53 ---------------------------------------------
 src/cordova/cordova.js      |  1 -
 src/cordova/create.js       | 35 ------------------------------
 3 files changed, 89 deletions(-)

diff --git a/spec/cordova/create.spec.js b/spec/cordova/create.spec.js
deleted file mode 100644
index 08720ae..0000000
--- a/spec/cordova/create.spec.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-*/
-
-var fs = require('fs-extra');
-var helpers = require('../helpers');
-var path = require('path');
-var events = require('cordova-common').events;
-var cordova = require('../../src/cordova/cordova');
-
-var tmpDir = helpers.tmpDir('create_test');
-var appName = 'TestBase';
-var appId = 'org.testing';
-var project = path.join(tmpDir, appName);
-
-var configBasic = {
-    lib: {
-        www: {
-            template: false
-        }
-    }
-};
-
-describe('create basic test (see more in cordova-create)', function () {
-    beforeEach(function () {
-        fs.emptyDirSync(tmpDir);
-    });
-
-    afterEach(function () {
-        process.chdir(path.join(__dirname, '..')); // Needed to rm the dir on Windows.
-        fs.removeSync(tmpDir);
-    });
-
-    it('Test 003 : should successfully run', function () {
-        return cordova.create(project, appId, appName, configBasic, events);
-    });
-
-});
diff --git a/src/cordova/cordova.js b/src/cordova/cordova.js
index 0f42f6c..2cec60d 100644
--- a/src/cordova/cordova.js
+++ b/src/cordova/cordova.js
@@ -46,7 +46,6 @@ exports = module.exports = {
     },
     prepare: require('./prepare'),
     build: require('./build'),
-    create: require('./create'),
     emulate: require('./emulate'),
     plugin: require('./plugin'),
     plugins: require('./plugin'),
diff --git a/src/cordova/create.js b/src/cordova/create.js
deleted file mode 100644
index af1f044..0000000
--- a/src/cordova/create.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-*/
-
-var create = require('cordova-create');
-var events = require('cordova-common').events;
-
-module.exports = function (dir, optionalId, optionalName, cfg, extEvents) {
-    if (extEvents) {
-        return create(dir, optionalId, optionalName, cfg, extEvents);
-    } else {
-        return create(dir, optionalId, optionalName, cfg, events);
-    }
-};
-
-/* If we do not pass in extEvents, then CordovaLogger will set up the listeners
-inside of cordova-create. That means we'll log everything always.  By passing in
-a dummy cordova-common.events EventEmitter with no listeners, then cordova-lib
-won't log in the create tests. When cordova-cli uses cordova-lib, it will setup
-the listeners for events using CordovaLogger.  */


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org