diff --git a/bin/lib/create.js b/bin/lib/create.js index 3f234f9f..3f86947f 100755 --- a/bin/lib/create.js +++ b/bin/lib/create.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/bin/templates/cordova/Api.js b/bin/templates/cordova/Api.js index e6402fe3..3d80ddc3 100644 --- a/bin/templates/cordova/Api.js +++ b/bin/templates/cordova/Api.js @@ -17,6 +17,15 @@ under the License. */ +/** + * @todo update coho to update this line. + * @todo use `package.json` instead but first + * figure out how this fit in with the platform-centered workflow structure. + * This workflow would not have the `package.json` file. + */ +// Coho updates this line +const VERSION = '9.0.0-dev'; + var path = require('path'); var AndroidProject = require('./lib/AndroidProject'); @@ -88,7 +97,7 @@ class Api { result.locations = this.locations; result.root = this.root; result.name = this.platform; - result.version = require('./version'); + result.version = Api.version(); result.projectConfig = this._config; return result; @@ -365,6 +374,10 @@ class Api { } return result; } + + static version () { + return VERSION; + } } module.exports = Api; diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js index 15258f84..36aee6c0 100644 --- a/bin/templates/cordova/lib/build.js +++ b/bin/templates/cordova/lib/build.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/bin/templates/cordova/lib/check_reqs.js b/bin/templates/cordova/lib/check_reqs.js index 519db895..e2305a71 100644 --- a/bin/templates/cordova/lib/check_reqs.js +++ b/bin/templates/cordova/lib/check_reqs.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/bin/templates/cordova/lib/device.js b/bin/templates/cordova/lib/device.js index f0ea6d4d..3bb95c90 100644 --- a/bin/templates/cordova/lib/device.js +++ b/bin/templates/cordova/lib/device.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/bin/templates/cordova/lib/emulator.js b/bin/templates/cordova/lib/emulator.js index 81525bae..eeab9d65 100644 --- a/bin/templates/cordova/lib/emulator.js +++ b/bin/templates/cordova/lib/emulator.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/bin/templates/cordova/lib/log.js b/bin/templates/cordova/lib/log.js index db0ba410..4e087651 100644 --- a/bin/templates/cordova/lib/log.js +++ b/bin/templates/cordova/lib/log.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/bin/templates/cordova/lib/retry.js b/bin/templates/cordova/lib/retry.js index e619b3d8..6ce8e818 100644 --- a/bin/templates/cordova/lib/retry.js +++ b/bin/templates/cordova/lib/retry.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/bin/templates/cordova/lib/run.js b/bin/templates/cordova/lib/run.js index 774dddd5..892e9b0c 100644 --- a/bin/templates/cordova/lib/run.js +++ b/bin/templates/cordova/lib/run.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file diff --git a/bin/templates/cordova/version b/bin/templates/cordova/version index 51fb968e..00f44bbb 100755 --- a/bin/templates/cordova/version +++ b/bin/templates/cordova/version @@ -19,11 +19,6 @@ under the License. */ -// Coho updates this line: -var VERSION = '9.0.0-dev'; +const Api = require('./Api'); -module.exports.version = VERSION; - -if (!module.parent) { - console.log(VERSION); -} +console.log(Api.version());