Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11412

Update template implementation in cordova create --template

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-lib
    • Labels:
      None

      Description

      https://github.com/cordova/cordova-discuss/pull/49

      Sometimes we do want a `package.json` copied over. `package.json` could have build scripts that are essential for the template to work. To handle this use case, template authors are suggested to put template files in a subdirectory and point to that subdirectory in index.js. All files in the subdirectory are copied over.

      Update the current template implementation to ignore the list of files above that shouldn't be copied over when using `--template`. If a subdirectory is used, copy the entire contents of the subdirectory.

      If a `package.json` exists in the subdirectory, we should update its fields like we do to `config.xml`. https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/create.js#L378-L382. Only field to update in `package.json` should be `package.name`. `package.name` should be updated to use `config.name` lowercased (npm package names have to be lowercase). `config.name` is the optional third argument `cordova create` takes.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user carynbear opened a pull request:

          https://github.com/apache/cordova-lib/pull/456

          CB-11412 improve template implementation

          Removed symlinking.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/carynbear/cordova-lib CB-11412-remove-linking

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-lib/pull/456.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #456


          commit 5139dee43071c518b9336f69df468824be0c496f
          Author: carynbear <caryn.tran@berkeley.edu>
          Date: 2016-06-13T21:29:06Z

          CB-11412 improve template implementation


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user carynbear opened a pull request: https://github.com/apache/cordova-lib/pull/456 CB-11412 improve template implementation Removed symlinking. You can merge this pull request into a Git repository by running: $ git pull https://github.com/carynbear/cordova-lib CB-11412 -remove-linking Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/456.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #456 commit 5139dee43071c518b9336f69df468824be0c496f Author: carynbear <caryn.tran@berkeley.edu> Date: 2016-06-13T21:29:06Z CB-11412 improve template implementation
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user carynbear closed the pull request at:

          https://github.com/apache/cordova-lib/pull/456

          Show
          githubbot ASF GitHub Bot added a comment - Github user carynbear closed the pull request at: https://github.com/apache/cordova-lib/pull/456
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user carynbear reopened a pull request:

          https://github.com/apache/cordova-lib/pull/456

          CB-11412 improve template implementation

          Removed symlinking.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/carynbear/cordova-lib CB-11412-remove-linking

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-lib/pull/456.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #456


          commit 5139dee43071c518b9336f69df468824be0c496f
          Author: carynbear <caryn.tran@berkeley.edu>
          Date: 2016-06-13T21:29:06Z

          CB-11412 improve template implementation


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user carynbear reopened a pull request: https://github.com/apache/cordova-lib/pull/456 CB-11412 improve template implementation Removed symlinking. You can merge this pull request into a Git repository by running: $ git pull https://github.com/carynbear/cordova-lib CB-11412 -remove-linking Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/456.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #456 commit 5139dee43071c518b9336f69df468824be0c496f Author: carynbear <caryn.tran@berkeley.edu> Date: 2016-06-13T21:29:06Z CB-11412 improve template implementation
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on a diff in the pull request:

          https://github.com/apache/cordova-lib/pull/456#discussion_r67070160

          — Diff: cordova-lib/spec-cordova/create.spec.js —
          @@ -38,15 +37,17 @@ var configNormal =

          { version: 'testCordovaCreate' }

          }

          • };
            -var configSymlink = {
          • lib: {
          • www: { - url: path.join(__dirname, 'fixtures', 'base'), // "create" should copy or link the www child of this dir and not the dir itself. - link: true - }
          • }
          • };
            +};
            +
            +var configSubDirPkgJson = {
            + lib: {
              • End diff –

          nitpick: Look like lib obj here has an extra tab

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/456#discussion_r67070160 — Diff: cordova-lib/spec-cordova/create.spec.js — @@ -38,15 +37,17 @@ var configNormal = { version: 'testCordovaCreate' } } }; -var configSymlink = { lib: { www: { - url: path.join(__dirname, 'fixtures', 'base'), // "create" should copy or link the www child of this dir and not the dir itself. - link: true - } } }; +}; + +var configSubDirPkgJson = { + lib: { End diff – nitpick: Look like lib obj here has an extra tab
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on a diff in the pull request:

          https://github.com/apache/cordova-lib/pull/456#discussion_r67071311

          — Diff: cordova-lib/spec-cordova/create.spec.js —
          @@ -121,6 +122,36 @@ describe('create end-to-end', function()

          { // expect(configXml.name()).toEqual('TestBase'); }

          + function checkSubDir() {
          + // Check if top level dirs exist.
          + var dirs = ['hooks', 'platforms', 'plugins', 'www'];
          + dirs.forEach(function(d)

          { + expect(path.join(project, d)).toExist(); + }

          );
          + expect(path.join(project, 'hooks', 'README.md')).toExist();
          +
          + //index.js and template folder should not exist (inner files should be copied to the project folder)
          + expect(path.join(project, 'index.js')).not.toExist();
          + expect(path.join(project, 'template')).not.toExist();
          — End diff –

          Is this assuming the template folder is named `template`?

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/456#discussion_r67071311 — Diff: cordova-lib/spec-cordova/create.spec.js — @@ -121,6 +122,36 @@ describe('create end-to-end', function() { // expect(configXml.name()).toEqual('TestBase'); } + function checkSubDir() { + // Check if top level dirs exist. + var dirs = ['hooks', 'platforms', 'plugins', 'www'] ; + dirs.forEach(function(d) { + expect(path.join(project, d)).toExist(); + } ); + expect(path.join(project, 'hooks', 'README.md')).toExist(); + + //index.js and template folder should not exist (inner files should be copied to the project folder) + expect(path.join(project, 'index.js')).not.toExist(); + expect(path.join(project, 'template')).not.toExist(); — End diff – Is this assuming the template folder is named `template`?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on a diff in the pull request:

          https://github.com/apache/cordova-lib/pull/456#discussion_r67073107

          — Diff: cordova-lib/spec-cordova/fixtures/templates/withsubdirectory_package_json/template/blah.txt —
          @@ -0,0 +1 @@
          +blah
          — End diff –

          Did you mean to include this file?

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/456#discussion_r67073107 — Diff: cordova-lib/spec-cordova/fixtures/templates/withsubdirectory_package_json/template/blah.txt — @@ -0,0 +1 @@ +blah — End diff – Did you mean to include this file?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on a diff in the pull request:

          https://github.com/apache/cordova-lib/pull/456#discussion_r67077184

          — Diff: cordova-lib/src/cordova/create.js —
          @@ -252,133 +249,116 @@ function create(dir, optionalId, optionalName, cfg, fetchOpt)

          { www: import_from_path }

          ;

          • // Keep going into child "www" folder if exists in stock app package.
            + // Keep going into child "www" folder if exists in stock app package; used to find config.xml
            while (fs.existsSync(path.join(paths.www, 'www'))) { paths.root = paths.www; paths.www = path.join(paths.root, 'www'); }
          • // find config.xml
            + // find config.xml OR get stock config.xml, used if template does not contain config.xml
            if (fs.existsSync(path.join(paths.root, 'config.xml'))) { paths.configXml = path.join(paths.root, 'config.xml'); - paths.configXmlLinkable = true; }

            else {

          • try { - paths.configXml = - path.join(require('cordova-app-hello-world').dirname, - 'config.xml'); - }

            catch (e)

            { - // Falling back on npm@2 path hierarchy - // TODO: Remove fallback after cordova-app-hello-world release - paths.configXml = - path.join(__dirname, '..', '..', 'node_modules', - 'cordova-app-hello-world', 'config.xml'); - }
          • }
          • if (fs.existsSync(path.join(paths.root, 'merges'))) { - paths.merges = path.join(paths.root, 'merges'); - }

            else

            { - // No merges by default - }
          • if (fs.existsSync(path.join(paths.root, 'hooks'))) { - paths.hooks = path.join(paths.root, 'hooks'); - paths.hooksLinkable = true; - }

            else {

          • try { - paths.hooks = - path.join(require('cordova-app-hello-world').dirname, - 'hooks'); - }

            catch (e)

            { - // Falling back on npm@2 path hierarchy - // TODO: Remove fallback after cordova-app-hello-world release - paths.hooks = - path.join(__dirname, '..', '..', 'node_modules', - 'cordova-app-hello-world', 'hooks'); - }

            + paths.configXml = path.join(require('cordova-app-hello-world').dirname, 'config.xml');
            }

          + // get stock www; used if template does not contain www
          + paths.www = path.join(require('cordova-app-hello-world').dirname, 'www');
          +
          + // get stock hooks; used if template does not contain hooks
          + paths.hooks = path.join(require('cordova-app-hello-world').dirname, 'hooks');
          +
          +
          var dirAlreadyExisted = fs.existsSync(dir);
          if (!dirAlreadyExisted)

          { fs.mkdirSync(dir); }

          -

          • var tryToLink = !!cfg.lib.www.link;
          • function copyOrLink(src, dst, linkable) {
          • if (src) {
          • if (tryToLink && linkable) { - fs.symlinkSync(src, dst, 'dir'); - }

            else

            { - shell.mkdir(dst); - shell.cp('-R', path.join(src, '*'), dst); - }
          • }
          • }
            -
          • /*
          • Copies template files, and directories into a Cordova project directory.
          • Files, and directories not copied include: www, mergers,platforms,
          • plugins, hooks, and config.xml. A template directory, and platform
          • directory must be passed.
            -
          • templateDir - Template directory
          • projectDir - Project directory
          • */
          • function copyTemplateFiles(templateDir, projectDir) {
          • var templateFiles; // Current file
            -
          • templateFiles = fs.readdirSync(templateDir);
            -
          • // Remove directories, and files that are automatically copied
          • templateFiles = templateFiles.filter(
          • function (value) { - return !(value === 'www' || value === 'mergers' || - value === 'config.xml' || value === 'hooks'); - }
          • );
            -
          • // Copy each template file
          • for (var i = 0; i < templateFiles.length; i++)
          • shell.cp('-R', path.resolve(templateDir, templateFiles[i]), projectDir);
          • }
            -
            try {
          • copyOrLink(paths.www, path.join(dir, 'www'), true);
          • copyOrLink(paths.merges, path.join(dir, 'merges'), true);
          • copyOrLink(paths.hooks, path.join(dir, 'hooks'),
          • paths.hooksLinkable);
            -
            + // Copy files from template to project
            if (cfg.lib.www.template)
          • copyTemplateFiles(import_from_path, dir);
            + copyTemplateFiles(import_from_path, dir, isSubDir);
          • if (paths.configXml) {
          • if (tryToLink && paths.configXmlLinkable) { - fs.symlinkSync(paths.configXml, path.join(dir, 'config.xml')); - }

            else

            { - shell.cp(paths.configXml, path.join(dir, 'config.xml')); - }

            + // If following were not copied from template, copy from stock app hello world
            + ifNotCopied(paths.www, path.join(dir, 'www'));
            + ifNotCopied(paths.hooks, path.join(dir, 'hooks'));
            + if (!fs.existsSync(path.join(dir, 'config.xml')) && paths.configXml)

            { + shell.cp(paths.configXml, path.join(dir, 'config.xml')); }

            } catch (e) {
            if (!dirAlreadyExisted)

            { shell.rm('-rf', dir); }
          • if (process.platform.slice(0, 3) == 'win' && e.code == 'EPERM') { - throw new CordovaError('Symlinks on Windows require Administrator privileges'); - }

            throw e;
            }
            +
            + // Update package.json name and version fields.
            + if (fs.existsSync(path.join(dir, 'package.json')))

            Unknown macro: { + var pkgjson = require(path.resolve(dir, 'package.json')); + if (cfg.name) { + pkgjson.name = cfg.name.toLowerCase(); + } + pkgjson.version = '1.0.0'; + fs.writeFile(path.join(dir, 'package.json'), JSON.stringify(pkgjson), function (err) { + if (err) throw new CordovaError('Could not write package.json'); + events.emit('verbose', 'writing name to package.json'); + }); + }

            +
            // Create basic project structure.
            if (!fs.existsSync(path.join(dir, 'platforms')))
            shell.mkdir(path.join(dir, 'platforms'));

          if (!fs.existsSync(path.join(dir, 'plugins')))
          shell.mkdir(path.join(dir, 'plugins'));

          • // Write out id and name to config.xml
            + // Write out id and name to config.xml; set version to 1.0.0 (to match package.json default version)
            var configPath = cordova_util.projectConfig(dir);
            var conf = new ConfigParser(configPath);
            if (cfg.id) conf.setPackageName(cfg.id);
            if (cfg.name) conf.setName(cfg.name);
            + conf.setVersion('1.0.0');
            conf.write();
            });
            }
            +
            +/**
            + * Recursively copies folder to destination if folder is not found in destination.
            + * @param {string} src for copying
            + * @param {string}

            dst for copying
            + * @return No return value
            + */
            +function ifNotCopied(src, dst)

            Unknown macro: { + if (!fs.existsSync(dst) && src) { + shell.mkdir(dst); + shell.cp('-R', path.join(src, '*'), dst); + } +}

            +
            +/**
            + * Copies template files, and directories into a Cordova project directory.
            + * If the template exists in a subdirectory everything is copied.
            + * Otherwise package.json, RELEASENOTES.md, .git, NOTICE, LICENSE, COPYRIGHT, and .npmignore are not copied over.
            + * A template directory, and platform directory must be passed.

              • End diff –

          I think you meant project directory not platform directory in this comment

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/456#discussion_r67077184 — Diff: cordova-lib/src/cordova/create.js — @@ -252,133 +249,116 @@ function create(dir, optionalId, optionalName, cfg, fetchOpt) { www: import_from_path } ; // Keep going into child "www" folder if exists in stock app package. + // Keep going into child "www" folder if exists in stock app package; used to find config.xml while (fs.existsSync(path.join(paths.www, 'www'))) { paths.root = paths.www; paths.www = path.join(paths.root, 'www'); } // find config.xml + // find config.xml OR get stock config.xml, used if template does not contain config.xml if (fs.existsSync(path.join(paths.root, 'config.xml'))) { paths.configXml = path.join(paths.root, 'config.xml'); - paths.configXmlLinkable = true; } else { try { - paths.configXml = - path.join(require('cordova-app-hello-world').dirname, - 'config.xml'); - } catch (e) { - // Falling back on npm@2 path hierarchy - // TODO: Remove fallback after cordova-app-hello-world release - paths.configXml = - path.join(__dirname, '..', '..', 'node_modules', - 'cordova-app-hello-world', 'config.xml'); - } } if (fs.existsSync(path.join(paths.root, 'merges'))) { - paths.merges = path.join(paths.root, 'merges'); - } else { - // No merges by default - } if (fs.existsSync(path.join(paths.root, 'hooks'))) { - paths.hooks = path.join(paths.root, 'hooks'); - paths.hooksLinkable = true; - } else { try { - paths.hooks = - path.join(require('cordova-app-hello-world').dirname, - 'hooks'); - } catch (e) { - // Falling back on npm@2 path hierarchy - // TODO: Remove fallback after cordova-app-hello-world release - paths.hooks = - path.join(__dirname, '..', '..', 'node_modules', - 'cordova-app-hello-world', 'hooks'); - } + paths.configXml = path.join(require('cordova-app-hello-world').dirname, 'config.xml'); } + // get stock www; used if template does not contain www + paths.www = path.join(require('cordova-app-hello-world').dirname, 'www'); + + // get stock hooks; used if template does not contain hooks + paths.hooks = path.join(require('cordova-app-hello-world').dirname, 'hooks'); + + var dirAlreadyExisted = fs.existsSync(dir); if (!dirAlreadyExisted) { fs.mkdirSync(dir); } - var tryToLink = !!cfg.lib.www.link; function copyOrLink(src, dst, linkable) { if (src) { if (tryToLink && linkable) { - fs.symlinkSync(src, dst, 'dir'); - } else { - shell.mkdir(dst); - shell.cp('-R', path.join(src, '*'), dst); - } } } - /* Copies template files, and directories into a Cordova project directory. Files, and directories not copied include: www, mergers,platforms, plugins, hooks, and config.xml. A template directory, and platform directory must be passed. - templateDir - Template directory projectDir - Project directory */ function copyTemplateFiles(templateDir, projectDir) { var templateFiles; // Current file - templateFiles = fs.readdirSync(templateDir); - // Remove directories, and files that are automatically copied templateFiles = templateFiles.filter( function (value) { - return !(value === 'www' || value === 'mergers' || - value === 'config.xml' || value === 'hooks'); - } ); - // Copy each template file for (var i = 0; i < templateFiles.length; i++) shell.cp('-R', path.resolve(templateDir, templateFiles [i] ), projectDir); } - try { copyOrLink(paths.www, path.join(dir, 'www'), true); copyOrLink(paths.merges, path.join(dir, 'merges'), true); copyOrLink(paths.hooks, path.join(dir, 'hooks'), paths.hooksLinkable); - + // Copy files from template to project if (cfg.lib.www.template) copyTemplateFiles(import_from_path, dir); + copyTemplateFiles(import_from_path, dir, isSubDir); if (paths.configXml) { if (tryToLink && paths.configXmlLinkable) { - fs.symlinkSync(paths.configXml, path.join(dir, 'config.xml')); - } else { - shell.cp(paths.configXml, path.join(dir, 'config.xml')); - } + // If following were not copied from template, copy from stock app hello world + ifNotCopied(paths.www, path.join(dir, 'www')); + ifNotCopied(paths.hooks, path.join(dir, 'hooks')); + if (!fs.existsSync(path.join(dir, 'config.xml')) && paths.configXml) { + shell.cp(paths.configXml, path.join(dir, 'config.xml')); } } catch (e) { if (!dirAlreadyExisted) { shell.rm('-rf', dir); } if (process.platform.slice(0, 3) == 'win' && e.code == 'EPERM') { - throw new CordovaError('Symlinks on Windows require Administrator privileges'); - } throw e; } + + // Update package.json name and version fields. + if (fs.existsSync(path.join(dir, 'package.json'))) Unknown macro: { + var pkgjson = require(path.resolve(dir, 'package.json')); + if (cfg.name) { + pkgjson.name = cfg.name.toLowerCase(); + } + pkgjson.version = '1.0.0'; + fs.writeFile(path.join(dir, 'package.json'), JSON.stringify(pkgjson), function (err) { + if (err) throw new CordovaError('Could not write package.json'); + events.emit('verbose', 'writing name to package.json'); + }); + } + // Create basic project structure. if (!fs.existsSync(path.join(dir, 'platforms'))) shell.mkdir(path.join(dir, 'platforms')); if (!fs.existsSync(path.join(dir, 'plugins'))) shell.mkdir(path.join(dir, 'plugins')); // Write out id and name to config.xml + // Write out id and name to config.xml; set version to 1.0.0 (to match package.json default version) var configPath = cordova_util.projectConfig(dir); var conf = new ConfigParser(configPath); if (cfg.id) conf.setPackageName(cfg.id); if (cfg.name) conf.setName(cfg.name); + conf.setVersion('1.0.0'); conf.write(); }); } + +/** + * Recursively copies folder to destination if folder is not found in destination. + * @param {string} src for copying + * @param {string} dst for copying + * @return No return value + */ +function ifNotCopied(src, dst) Unknown macro: { + if (!fs.existsSync(dst) && src) { + shell.mkdir(dst); + shell.cp('-R', path.join(src, '*'), dst); + } +} + +/** + * Copies template files, and directories into a Cordova project directory. + * If the template exists in a subdirectory everything is copied. + * Otherwise package.json, RELEASENOTES.md, .git, NOTICE, LICENSE, COPYRIGHT, and .npmignore are not copied over. + * A template directory, and platform directory must be passed. End diff – I think you meant project directory not platform directory in this comment
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on the issue:

          https://github.com/apache/cordova-lib/pull/456

          LGTM!

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on the issue: https://github.com/apache/cordova-lib/pull/456 LGTM!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user carynbear commented on a diff in the pull request:

          https://github.com/apache/cordova-lib/pull/456#discussion_r67077366

          — Diff: cordova-lib/spec-cordova/create.spec.js —
          @@ -121,6 +122,36 @@ describe('create end-to-end', function()

          { // expect(configXml.name()).toEqual('TestBase'); }

          + function checkSubDir() {
          + // Check if top level dirs exist.
          + var dirs = ['hooks', 'platforms', 'plugins', 'www'];
          + dirs.forEach(function(d)

          { + expect(path.join(project, d)).toExist(); + }

          );
          + expect(path.join(project, 'hooks', 'README.md')).toExist();
          +
          + //index.js and template folder should not exist (inner files should be copied to the project folder)
          + expect(path.join(project, 'index.js')).not.toExist();
          + expect(path.join(project, 'template')).not.toExist();
          — End diff –

          correct

          Show
          githubbot ASF GitHub Bot added a comment - Github user carynbear commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/456#discussion_r67077366 — Diff: cordova-lib/spec-cordova/create.spec.js — @@ -121,6 +122,36 @@ describe('create end-to-end', function() { // expect(configXml.name()).toEqual('TestBase'); } + function checkSubDir() { + // Check if top level dirs exist. + var dirs = ['hooks', 'platforms', 'plugins', 'www'] ; + dirs.forEach(function(d) { + expect(path.join(project, d)).toExist(); + } ); + expect(path.join(project, 'hooks', 'README.md')).toExist(); + + //index.js and template folder should not exist (inner files should be copied to the project folder) + expect(path.join(project, 'index.js')).not.toExist(); + expect(path.join(project, 'template')).not.toExist(); — End diff – correct
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user carynbear commented on a diff in the pull request:

          https://github.com/apache/cordova-lib/pull/456#discussion_r67077463

          — Diff: cordova-lib/spec-cordova/fixtures/templates/withsubdirectory_package_json/template/blah.txt —
          @@ -0,0 +1 @@
          +blah
          — End diff –

          no

          Show
          githubbot ASF GitHub Bot added a comment - Github user carynbear commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/456#discussion_r67077463 — Diff: cordova-lib/spec-cordova/fixtures/templates/withsubdirectory_package_json/template/blah.txt — @@ -0,0 +1 @@ +blah — End diff – no
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user carynbear commented on the issue:

          https://github.com/apache/cordova-lib/pull/456

          @stevengill fixed up the little details

          Show
          githubbot ASF GitHub Bot added a comment - Github user carynbear commented on the issue: https://github.com/apache/cordova-lib/pull/456 @stevengill fixed up the little details
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on a diff in the pull request:

          https://github.com/apache/cordova-lib/pull/456#discussion_r67084182

          — Diff: cordova-lib/src/cordova/create.js —
          @@ -252,133 +249,116 @@ function create(dir, optionalId, optionalName, cfg, fetchOpt)

          { www: import_from_path }

          ;

          • // Keep going into child "www" folder if exists in stock app package.
            + // Keep going into child "www" folder if exists in stock app package; used to find config.xml
            while (fs.existsSync(path.join(paths.www, 'www'))) { paths.root = paths.www; paths.www = path.join(paths.root, 'www'); }
          • // find config.xml
            + // find config.xml OR get stock config.xml, used if template does not contain config.xml
            if (fs.existsSync(path.join(paths.root, 'config.xml'))) { paths.configXml = path.join(paths.root, 'config.xml'); - paths.configXmlLinkable = true; }

            else {

          • try { - paths.configXml = - path.join(require('cordova-app-hello-world').dirname, - 'config.xml'); - }

            catch (e)

            { - // Falling back on npm@2 path hierarchy - // TODO: Remove fallback after cordova-app-hello-world release - paths.configXml = - path.join(__dirname, '..', '..', 'node_modules', - 'cordova-app-hello-world', 'config.xml'); - }
          • }
          • if (fs.existsSync(path.join(paths.root, 'merges'))) { - paths.merges = path.join(paths.root, 'merges'); - }

            else

            { - // No merges by default - }
          • if (fs.existsSync(path.join(paths.root, 'hooks'))) { - paths.hooks = path.join(paths.root, 'hooks'); - paths.hooksLinkable = true; - }

            else {

          • try { - paths.hooks = - path.join(require('cordova-app-hello-world').dirname, - 'hooks'); - }

            catch (e)

            { - // Falling back on npm@2 path hierarchy - // TODO: Remove fallback after cordova-app-hello-world release - paths.hooks = - path.join(__dirname, '..', '..', 'node_modules', - 'cordova-app-hello-world', 'hooks'); - }

            + paths.configXml = path.join(require('cordova-app-hello-world').dirname, 'config.xml');
            }

          + // get stock www; used if template does not contain www
          + paths.www = path.join(require('cordova-app-hello-world').dirname, 'www');
          +
          + // get stock hooks; used if template does not contain hooks
          + paths.hooks = path.join(require('cordova-app-hello-world').dirname, 'hooks');
          +
          +
          var dirAlreadyExisted = fs.existsSync(dir);
          if (!dirAlreadyExisted)

          { fs.mkdirSync(dir); }

          -

          • var tryToLink = !!cfg.lib.www.link;
          • function copyOrLink(src, dst, linkable) {
          • if (src) {
          • if (tryToLink && linkable) { - fs.symlinkSync(src, dst, 'dir'); - }

            else

            { - shell.mkdir(dst); - shell.cp('-R', path.join(src, '*'), dst); - }
          • }
          • }
            -
          • /*
          • Copies template files, and directories into a Cordova project directory.
          • Files, and directories not copied include: www, mergers,platforms,
          • plugins, hooks, and config.xml. A template directory, and platform
          • directory must be passed.
            -
          • templateDir - Template directory
          • projectDir - Project directory
          • */
          • function copyTemplateFiles(templateDir, projectDir) {
          • var templateFiles; // Current file
            -
          • templateFiles = fs.readdirSync(templateDir);
            -
          • // Remove directories, and files that are automatically copied
          • templateFiles = templateFiles.filter(
          • function (value) { - return !(value === 'www' || value === 'mergers' || - value === 'config.xml' || value === 'hooks'); - }
          • );
            -
          • // Copy each template file
          • for (var i = 0; i < templateFiles.length; i++)
          • shell.cp('-R', path.resolve(templateDir, templateFiles[i]), projectDir);
          • }
            -
            try {
          • copyOrLink(paths.www, path.join(dir, 'www'), true);
          • copyOrLink(paths.merges, path.join(dir, 'merges'), true);
          • copyOrLink(paths.hooks, path.join(dir, 'hooks'),
          • paths.hooksLinkable);
            -
            + // Copy files from template to project
            if (cfg.lib.www.template)
          • copyTemplateFiles(import_from_path, dir);
            + copyTemplateFiles(import_from_path, dir, isSubDir);
          • if (paths.configXml) {
          • if (tryToLink && paths.configXmlLinkable) { - fs.symlinkSync(paths.configXml, path.join(dir, 'config.xml')); - }

            else

            { - shell.cp(paths.configXml, path.join(dir, 'config.xml')); - }

            + // If following were not copied from template, copy from stock app hello world
            + ifNotCopied(paths.www, path.join(dir, 'www'));
            + ifNotCopied(paths.hooks, path.join(dir, 'hooks'));
            + if (!fs.existsSync(path.join(dir, 'config.xml')) && paths.configXml)

            { + shell.cp(paths.configXml, path.join(dir, 'config.xml')); }

            } catch (e) {
            if (!dirAlreadyExisted)

            { shell.rm('-rf', dir); }
          • if (process.platform.slice(0, 3) == 'win' && e.code == 'EPERM') { - throw new CordovaError('Symlinks on Windows require Administrator privileges'); - }

            throw e;
            }
            +
            + // Update package.json name and version fields.
            + if (fs.existsSync(path.join(dir, 'package.json'))) {
            + var pkgjson = require(path.resolve(dir, 'package.json'));
            + if (cfg.name)

            { + pkgjson.name = cfg.name.toLowerCase(); + }

            + pkgjson.version = '1.0.0';
            + fs.writeFile(path.join(dir, 'package.json'), JSON.stringify(pkgjson), function (err) {

              • End diff –

          Lets maybe do the write operation as Sync and lets add spaces to the new package.json file. See https://github.com/apache/cordova-lib/blob/9f630271d9c02824c0031ea4cdc0e4955b53d9e2/cordova-lib/src/plugman/registry/manifest.js#L101

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/456#discussion_r67084182 — Diff: cordova-lib/src/cordova/create.js — @@ -252,133 +249,116 @@ function create(dir, optionalId, optionalName, cfg, fetchOpt) { www: import_from_path } ; // Keep going into child "www" folder if exists in stock app package. + // Keep going into child "www" folder if exists in stock app package; used to find config.xml while (fs.existsSync(path.join(paths.www, 'www'))) { paths.root = paths.www; paths.www = path.join(paths.root, 'www'); } // find config.xml + // find config.xml OR get stock config.xml, used if template does not contain config.xml if (fs.existsSync(path.join(paths.root, 'config.xml'))) { paths.configXml = path.join(paths.root, 'config.xml'); - paths.configXmlLinkable = true; } else { try { - paths.configXml = - path.join(require('cordova-app-hello-world').dirname, - 'config.xml'); - } catch (e) { - // Falling back on npm@2 path hierarchy - // TODO: Remove fallback after cordova-app-hello-world release - paths.configXml = - path.join(__dirname, '..', '..', 'node_modules', - 'cordova-app-hello-world', 'config.xml'); - } } if (fs.existsSync(path.join(paths.root, 'merges'))) { - paths.merges = path.join(paths.root, 'merges'); - } else { - // No merges by default - } if (fs.existsSync(path.join(paths.root, 'hooks'))) { - paths.hooks = path.join(paths.root, 'hooks'); - paths.hooksLinkable = true; - } else { try { - paths.hooks = - path.join(require('cordova-app-hello-world').dirname, - 'hooks'); - } catch (e) { - // Falling back on npm@2 path hierarchy - // TODO: Remove fallback after cordova-app-hello-world release - paths.hooks = - path.join(__dirname, '..', '..', 'node_modules', - 'cordova-app-hello-world', 'hooks'); - } + paths.configXml = path.join(require('cordova-app-hello-world').dirname, 'config.xml'); } + // get stock www; used if template does not contain www + paths.www = path.join(require('cordova-app-hello-world').dirname, 'www'); + + // get stock hooks; used if template does not contain hooks + paths.hooks = path.join(require('cordova-app-hello-world').dirname, 'hooks'); + + var dirAlreadyExisted = fs.existsSync(dir); if (!dirAlreadyExisted) { fs.mkdirSync(dir); } - var tryToLink = !!cfg.lib.www.link; function copyOrLink(src, dst, linkable) { if (src) { if (tryToLink && linkable) { - fs.symlinkSync(src, dst, 'dir'); - } else { - shell.mkdir(dst); - shell.cp('-R', path.join(src, '*'), dst); - } } } - /* Copies template files, and directories into a Cordova project directory. Files, and directories not copied include: www, mergers,platforms, plugins, hooks, and config.xml. A template directory, and platform directory must be passed. - templateDir - Template directory projectDir - Project directory */ function copyTemplateFiles(templateDir, projectDir) { var templateFiles; // Current file - templateFiles = fs.readdirSync(templateDir); - // Remove directories, and files that are automatically copied templateFiles = templateFiles.filter( function (value) { - return !(value === 'www' || value === 'mergers' || - value === 'config.xml' || value === 'hooks'); - } ); - // Copy each template file for (var i = 0; i < templateFiles.length; i++) shell.cp('-R', path.resolve(templateDir, templateFiles [i] ), projectDir); } - try { copyOrLink(paths.www, path.join(dir, 'www'), true); copyOrLink(paths.merges, path.join(dir, 'merges'), true); copyOrLink(paths.hooks, path.join(dir, 'hooks'), paths.hooksLinkable); - + // Copy files from template to project if (cfg.lib.www.template) copyTemplateFiles(import_from_path, dir); + copyTemplateFiles(import_from_path, dir, isSubDir); if (paths.configXml) { if (tryToLink && paths.configXmlLinkable) { - fs.symlinkSync(paths.configXml, path.join(dir, 'config.xml')); - } else { - shell.cp(paths.configXml, path.join(dir, 'config.xml')); - } + // If following were not copied from template, copy from stock app hello world + ifNotCopied(paths.www, path.join(dir, 'www')); + ifNotCopied(paths.hooks, path.join(dir, 'hooks')); + if (!fs.existsSync(path.join(dir, 'config.xml')) && paths.configXml) { + shell.cp(paths.configXml, path.join(dir, 'config.xml')); } } catch (e) { if (!dirAlreadyExisted) { shell.rm('-rf', dir); } if (process.platform.slice(0, 3) == 'win' && e.code == 'EPERM') { - throw new CordovaError('Symlinks on Windows require Administrator privileges'); - } throw e; } + + // Update package.json name and version fields. + if (fs.existsSync(path.join(dir, 'package.json'))) { + var pkgjson = require(path.resolve(dir, 'package.json')); + if (cfg.name) { + pkgjson.name = cfg.name.toLowerCase(); + } + pkgjson.version = '1.0.0'; + fs.writeFile(path.join(dir, 'package.json'), JSON.stringify(pkgjson), function (err) { End diff – Lets maybe do the write operation as Sync and lets add spaces to the new package.json file. See https://github.com/apache/cordova-lib/blob/9f630271d9c02824c0031ea4cdc0e4955b53d9e2/cordova-lib/src/plugman/registry/manifest.js#L101
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user carynbear opened a pull request:

          https://github.com/apache/cordova-app-hello-world/pull/16

          CB-11412 Update templates to designate template source dir

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/carynbear/cordova-app-hello-world master

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-app-hello-world/pull/16.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #16


          commit 513d01060ebc31d660cbae5ac21642a9e90386a1
          Author: carynbear <caryn.tran@berkeley.edu>
          Date: 2016-06-15T20:15:14Z

          CB-11412 Update templates to designate template source dir


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user carynbear opened a pull request: https://github.com/apache/cordova-app-hello-world/pull/16 CB-11412 Update templates to designate template source dir You can merge this pull request into a Git repository by running: $ git pull https://github.com/carynbear/cordova-app-hello-world master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-app-hello-world/pull/16.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16 commit 513d01060ebc31d660cbae5ac21642a9e90386a1 Author: carynbear <caryn.tran@berkeley.edu> Date: 2016-06-15T20:15:14Z CB-11412 Update templates to designate template source dir
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on the issue:

          https://github.com/apache/cordova-app-hello-world/pull/16

          Lets update version in the default config.xml to be 1.0.0 instead of 0.0.1

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on the issue: https://github.com/apache/cordova-app-hello-world/pull/16 Lets update version in the default config.xml to be 1.0.0 instead of 0.0.1
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on the issue:

          https://github.com/apache/cordova-app-hello-world/pull/16

          Lets not add a `package.json` to template_src for now

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on the issue: https://github.com/apache/cordova-app-hello-world/pull/16 Lets not add a `package.json` to template_src for now
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on the issue:

          https://github.com/apache/cordova-app-hello-world/pull/16

          LGTM otherwise

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on the issue: https://github.com/apache/cordova-app-hello-world/pull/16 LGTM otherwise
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user carynbear commented on the issue:

          https://github.com/apache/cordova-app-hello-world/pull/16

          @stevengill removed package.json from template_src, changed config.xml version to 1.0.0

          Show
          githubbot ASF GitHub Bot added a comment - Github user carynbear commented on the issue: https://github.com/apache/cordova-app-hello-world/pull/16 @stevengill removed package.json from template_src, changed config.xml version to 1.0.0
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user carynbear opened a pull request:

          https://github.com/apache/cordova-docs/pull/612

          CB-11412 Added docs for template use and create

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/carynbear/cordova-docs CB-11412

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-docs/pull/612.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #612


          commit cbf0b722b22b8e445db1f1517de279134f6436c0
          Author: carynbear <caryn.tran@berkeley.edu>
          Date: 2016-06-17T17:53:55Z

          CB-11412 Added docs for template use and create


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user carynbear opened a pull request: https://github.com/apache/cordova-docs/pull/612 CB-11412 Added docs for template use and create You can merge this pull request into a Git repository by running: $ git pull https://github.com/carynbear/cordova-docs CB-11412 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-docs/pull/612.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #612 commit cbf0b722b22b8e445db1f1517de279134f6436c0 Author: carynbear <caryn.tran@berkeley.edu> Date: 2016-06-17T17:53:55Z CB-11412 Added docs for template use and create
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1f29cba5c9b926884a9d5412f3602e9f7af99968 in cordova-lib's branch refs/heads/master from Caryn Tran
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=1f29cba ]

          CB-11412 improve template implementation

          This closes #456

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1f29cba5c9b926884a9d5412f3602e9f7af99968 in cordova-lib's branch refs/heads/master from Caryn Tran [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=1f29cba ] CB-11412 improve template implementation This closes #456
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-lib/pull/456

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-lib/pull/456
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user carynbear opened a pull request:

          https://github.com/apache/cordova-lib/pull/458

          CB-11412 template support for www folders

          @stevengill yay but also need to merge the cordova-cli!

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/carynbear/cordova-lib CB-11412-remove-linking

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-lib/pull/458.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #458


          commit 086c9913682cd82d1d364621f4dfa8322985e263
          Author: carynbear <caryn.tran@berkeley.edu>
          Date: 2016-06-24T21:22:17Z

          CB-11412 template support for www folders


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user carynbear opened a pull request: https://github.com/apache/cordova-lib/pull/458 CB-11412 template support for www folders @stevengill yay but also need to merge the cordova-cli! You can merge this pull request into a Git repository by running: $ git pull https://github.com/carynbear/cordova-lib CB-11412 -remove-linking Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/458.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #458 commit 086c9913682cd82d1d364621f4dfa8322985e263 Author: carynbear <caryn.tran@berkeley.edu> Date: 2016-06-24T21:22:17Z CB-11412 template support for www folders
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user carynbear opened a pull request:

          https://github.com/apache/cordova-cli/pull/257

          CB-11412 removed link-to, aliased copy-from to template

          @stevengill and also merge lib!

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/carynbear/cordova-cli CB-11412

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-cli/pull/257.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #257


          commit 195159aec3f3e236093f9f6b999cb16626147c25
          Author: carynbear <caryn.tran@berkeley.edu>
          Date: 2016-06-24T21:25:51Z

          CB-11412 removed link-to, aliased copy-from to template


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user carynbear opened a pull request: https://github.com/apache/cordova-cli/pull/257 CB-11412 removed link-to, aliased copy-from to template @stevengill and also merge lib! You can merge this pull request into a Git repository by running: $ git pull https://github.com/carynbear/cordova-cli CB-11412 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-cli/pull/257.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #257 commit 195159aec3f3e236093f9f6b999cb16626147c25 Author: carynbear <caryn.tran@berkeley.edu> Date: 2016-06-24T21:25:51Z CB-11412 removed link-to, aliased copy-from to template
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user codecov-io commented on the issue:

          https://github.com/apache/cordova-lib/pull/458

            1. [Current coverage][cc-pull] is *80.59%*
              > Merging 458[cc-pull] into [master][cc-base-branch] will increase coverage by *0.01%*

          ```diff
          @@ master #458 diff @@
          ==========================================
          Files 68 68
          Lines 5377 5380 +3
          Methods 851 851
          Messages 0 0
          Branches 1039 1038 -1
          ==========================================
          + Hits 4333 4336 +3
          Misses 1044 1044
          Partials 0 0
          ```

          > Powered by [Codecov](https://codecov.io?src=pr). Last updated by [0c6f88d...086c991][cc-compare]
          [cc-base-branch]: https://codecov.io/gh/apache/cordova-lib/branch/master?src=pr
          [cc-compare]: https://codecov.io/gh/apache/cordova-lib/compare/0c6f88d2b136cf78ce57f323b75600a9b284e58a...086c9913682cd82d1d364621f4dfa8322985e263
          [cc-pull]: https://codecov.io/gh/apache/cordova-lib/pull/458?src=pr

          Show
          githubbot ASF GitHub Bot added a comment - Github user codecov-io commented on the issue: https://github.com/apache/cordova-lib/pull/458 [Current coverage] [cc-pull] is * 80.59% * > Merging 458 [cc-pull] into [master] [cc-base-branch] will increase coverage by * 0.01% * ```diff @@ master #458 diff @@ ========================================== Files 68 68 Lines 5377 5380 +3 Methods 851 851 Messages 0 0 Branches 1039 1038 -1 ========================================== + Hits 4333 4336 +3 Misses 1044 1044 Partials 0 0 ``` > Powered by [Codecov] ( https://codecov.io?src=pr ). Last updated by [0c6f88d...086c991] [cc-compare] [cc-base-branch] : https://codecov.io/gh/apache/cordova-lib/branch/master?src=pr [cc-compare] : https://codecov.io/gh/apache/cordova-lib/compare/0c6f88d2b136cf78ce57f323b75600a9b284e58a...086c9913682cd82d1d364621f4dfa8322985e263 [cc-pull] : https://codecov.io/gh/apache/cordova-lib/pull/458?src=pr
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on a diff in the pull request:

          https://github.com/apache/cordova-cli/pull/257#discussion_r68633959

          — Diff: src/cli.js —
          @@ -456,10 +456,13 @@ function cli(inputArgs)

          { template: false }

          ;

          • if (args['link-to'])
          • wwwCfg.link = true;
          • else if (args.template)
            +
            + if (args.template) { + wwwCfg.template = true; + }

            else if (args['copy-from']) {
            + logger.warn('Warning: --copy-from option will be deprecated on December 25, 2016');

              • End diff –

          It would be nice to suggest using `--template` instead in the deprecation message

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/257#discussion_r68633959 — Diff: src/cli.js — @@ -456,10 +456,13 @@ function cli(inputArgs) { template: false } ; if (args ['link-to'] ) wwwCfg.link = true; else if (args.template) + + if (args.template) { + wwwCfg.template = true; + } else if (args ['copy-from'] ) { + logger.warn('Warning: --copy-from option will be deprecated on December 25, 2016'); End diff – It would be nice to suggest using `--template` instead in the deprecation message
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on the issue:

          https://github.com/apache/cordova-cli/pull/257

          LGTM

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on the issue: https://github.com/apache/cordova-cli/pull/257 LGTM
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user stevengill commented on the issue:

          https://github.com/apache/cordova-lib/pull/458

          Failures on windows?

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on the issue: https://github.com/apache/cordova-lib/pull/458 Failures on windows?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user carynbear commented on the issue:

          https://github.com/apache/cordova-cli/pull/257

          @stevengill fixed the message to suggest using --template

          Show
          githubbot ASF GitHub Bot added a comment - Github user carynbear commented on the issue: https://github.com/apache/cordova-cli/pull/257 @stevengill fixed the message to suggest using --template
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit e810685ce42a6615d62117f026316c9931ad8707 in cordova-lib's branch refs/heads/master from Caryn Tran
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=e810685 ]

          CB-11412 template support for www folders

          This closes #458

          Show
          jira-bot ASF subversion and git services added a comment - Commit e810685ce42a6615d62117f026316c9931ad8707 in cordova-lib's branch refs/heads/master from Caryn Tran [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=e810685 ] CB-11412 template support for www folders This closes #458
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-lib/pull/458

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-lib/pull/458
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 64e1152227239e44502d0e560ec967a708447f3b in cordova-cli's branch refs/heads/master from Caryn Tran
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=64e1152 ]

          CB-11412 removed link-to, aliased copy-from to template

          This closes #257

          Show
          jira-bot ASF subversion and git services added a comment - Commit 64e1152227239e44502d0e560ec967a708447f3b in cordova-cli's branch refs/heads/master from Caryn Tran [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=64e1152 ] CB-11412 removed link-to, aliased copy-from to template This closes #257
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-cli/pull/257

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-cli/pull/257
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 27919ad09e1a721c2e328c269b89def6b39dd90c in cordova-app-hello-world's branch refs/heads/master from Caryn Tran
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git;h=27919ad ]

          CB-11412 Update templates to designate template source dir

          This closes #16

          Show
          jira-bot ASF subversion and git services added a comment - Commit 27919ad09e1a721c2e328c269b89def6b39dd90c in cordova-app-hello-world's branch refs/heads/master from Caryn Tran [ https://git-wip-us.apache.org/repos/asf?p=cordova-app-hello-world.git;h=27919ad ] CB-11412 Update templates to designate template source dir This closes #16
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-app-hello-world/pull/16

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-app-hello-world/pull/16
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user dblotsky commented on a diff in the pull request:

          https://github.com/apache/cordova-docs/pull/612#discussion_r73905774

          — Diff: www/_data/redirects.yml —
          @@ -348,6 +348,7 @@ docs-global:
          "guide_appdev_privacy_index.md.html": "guide/appdev/privacy/index.html"
          "guide_appdev_whitelist_index.md.html": "guide/appdev/whitelist/index.html"
          "guide_cli_index.md.html": "guide/cli/index.html"
          + "guide_cli_template.md.html": "guide/cli/template.html"
          — End diff –

          Did this link exist in the past? If not, the redirect isn't necessary.

          Show
          githubbot ASF GitHub Bot added a comment - Github user dblotsky commented on a diff in the pull request: https://github.com/apache/cordova-docs/pull/612#discussion_r73905774 — Diff: www/_data/redirects.yml — @@ -348,6 +348,7 @@ docs-global: "guide_appdev_privacy_index.md.html": "guide/appdev/privacy/index.html" "guide_appdev_whitelist_index.md.html": "guide/appdev/whitelist/index.html" "guide_cli_index.md.html": "guide/cli/index.html" + "guide_cli_template.md.html": "guide/cli/template.html" — End diff – Did this link exist in the past? If not, the redirect isn't necessary.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit dc09bd8f10bf2316b847b1e0c04dabb269c9435d in cordova-docs's branch refs/heads/master from Caryn Tran
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-docs.git;h=dc09bd8 ]

          CB-11412 Added docs for template use and create

          This closes #612

          Show
          jira-bot ASF subversion and git services added a comment - Commit dc09bd8f10bf2316b847b1e0c04dabb269c9435d in cordova-docs's branch refs/heads/master from Caryn Tran [ https://git-wip-us.apache.org/repos/asf?p=cordova-docs.git;h=dc09bd8 ] CB-11412 Added docs for template use and create This closes #612
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-docs/pull/612

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-docs/pull/612
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 4c4521dc3fd5ca65489560cc8243e19883254070 in cordova-lib's branch refs/heads/master from Caryn Tran
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=4c4521d ]

          CB-11607 breakout cordova-create from cordova-lib

          CB-11412 aliased copy-from to template; added support for www template

          This closes #478

          Show
          jira-bot ASF subversion and git services added a comment - Commit 4c4521dc3fd5ca65489560cc8243e19883254070 in cordova-lib's branch refs/heads/master from Caryn Tran [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=4c4521d ] CB-11607 breakout cordova-create from cordova-lib CB-11412 aliased copy-from to template; added support for www template This closes #478

            People

            • Assignee:
              carynbear Caryn Tran
              Reporter:
              carynbear Caryn Tran
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development