Skip to content

Commit

Permalink
style: renamed script filenames and added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Mar 8, 2017
1 parent 060e2ab commit 942809e
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ gulp prerelease;
> **[optional]** Update [iOS SDK](https://github.com/BranchMetrics/ios-branch-deep-linking/tags) (will need to update `plugin.xml` dependencies if new iOS files)
```sh
./src/ios/dependencies/update.sh 0.12.20;
./src/scripts/npm/updateIosSdk/update.sh 0.13.5;
./src/scripts/npm/updateAndroidSdk/update.sh 2.5.9;
```

### Test
Expand Down
5 changes: 4 additions & 1 deletion src/branch.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// properties
'use strict'

var exec = require('cordova/exec')
var deviceVendor = window.clientInformation.vendor
var _API_CLASS = 'BranchSDK' // SDK Class

// javscript to sdk
function execute (method, params) {
params = !params ? [] : params

Expand All @@ -24,6 +25,7 @@ function executeCallback (method, callback, params) {
}, _API_CLASS, method, params)
}

// Branch prototype
var Branch = function Branch () {
this.debugMode = false
}
Expand Down Expand Up @@ -190,4 +192,5 @@ Branch.prototype.creditHistory = function () {
return execute('getCreditHistory')
}

// export
module.exports = new Branch()
File renamed without changes.
14 changes: 7 additions & 7 deletions src/scripts/hooks/afterPrepare.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(function () {
// properties
'use strict'
var configPrefrences = require('../sdk/configXml.js')
var iosPlist = require('../ios/plist.js')
var iosCapabilities = require('../ios/capabilities.js')
var iosAssociatedDomains = require('../ios/associatedDomains.js')
var iosDevelopmentTeam = require('../ios/developmentTeam.js')
var androidManifest = require('../android/androidManifest.js')
var configPreferences = require('../npm/processConfigXml.js')
var iosPlist = require('../ios/updatePlist.js')
var iosCapabilities = require('../ios/enableEntitlements.js')
var iosAssociatedDomains = require('../ios/updateAssociatedDomains.js')
var iosDevelopmentTeam = require('../ios/updateDevelopmentTeam.js')
var androidManifest = require('../android/updateAndroidManifest.js')
var IOS = 'ios'
var ANDROID = 'android'

Expand All @@ -15,7 +15,7 @@

// after prepare hooks based on platform
function run (context) {
var preferences = configPrefrences.read(context)
var preferences = configPreferences.read(context)
var platforms = context.opts.platforms

platforms.forEach(function (platform) {
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/hooks/beforePluginInstall.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function () {
// properties
'use strict'
var nodeDependencies = require('../npm/nodeDependencies.js')
var nodeDependencies = require('../npm/downloadNpmDependencies.js')

// entry
module.exports = run
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// TODO: does not work. Automatic Signing of Provisioning Profile is not updating (https://pewpewthespells.com/blog/migrating_code_signing.html#automatic-signing-xcode-7)
// TODO: users will have to bypass by always opening up Xcode
(function () {
// properties
'use strict'
var fs = require('fs')
var path = require('path')

var fileName = 'build.json'
var FILENAME = 'build.json'

// entry
module.exports = {
Expand All @@ -17,7 +14,7 @@
function addDevelopmentTeam (preferences) {
console.log('BRANCH SDK: Updating iOS development team')

var file = path.join(preferences.projectRoot, fileName)
var file = path.join(preferences.projectRoot, FILENAME)
var content = getBuildJson(file)
content = convertStringToJson(content)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
(function () {
// properties
'use strict'
var path = require('path')
var exec = require('child_process').exec
var fileHelper = require('../lib/fileHelper.js')
var FILES = ['package.json', 'plugin.xml', 'plugin.template.xml']

// entry
module.exports = updateNpmVersion

// updates the npm version in semantic-release pre
Expand Down

0 comments on commit 942809e

Please sign in to comment.