cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dase...@apache.org
Subject cordova-coho git commit: CB-9836 Add .gitattributes to prevent CRLF line endings in repos
Date Thu, 12 Nov 2015 15:23:46 GMT
Repository: cordova-coho
Updated Branches:
  refs/heads/master 94760ec58 -> 49caee430


CB-9836 Add .gitattributes to prevent CRLF line endings in repos

Normalizes src/npm-link.js line endings to be LF

github: close #98


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/49caee43
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/49caee43
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/49caee43

Branch: refs/heads/master
Commit: 49caee430992edd36575416cbd3fa9e6615b664a
Parents: 94760ec
Author: daserge <v-seshak@microsoft.com>
Authored: Thu Nov 5 11:22:21 2015 +0300
Committer: daserge <v-seshak@microsoft.com>
Committed: Thu Nov 12 18:14:34 2015 +0300

----------------------------------------------------------------------
 .gitattributes  |  94 ++++++++++++++++++++++++
 src/npm-link.js | 204 +++++++++++++++++++++++++--------------------------
 2 files changed, 196 insertions(+), 102 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/49caee43/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..f63e59a
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,94 @@
+* text eol=lf
+
+# source code
+*.php text
+*.css text
+*.sass text
+*.scss text
+*.less text
+*.styl text
+*.js text
+*.coffee text
+*.json text
+*.htm text
+*.html text
+*.xml text
+*.svg text
+*.txt text
+*.ini text
+*.inc text
+*.pl text
+*.rb text
+*.py text
+*.scm text
+*.sql text
+*.sh text
+*.bat text
+
+# templates
+*.ejs text
+*.hbt text
+*.jade text
+*.haml text
+*.hbs text
+*.dot text
+*.tmpl text
+*.phtml text
+
+# server config
+.htaccess text
+
+# git config
+.gitattributes text
+.gitignore text
+.gitconfig text
+
+# code analysis config
+.jshintrc text
+.jscsrc text
+.jshintignore text
+.csslintrc text
+
+# misc config
+*.yaml text
+*.yml text
+.editorconfig text
+
+# build config
+*.npmignore text
+*.bowerrc text
+
+# Heroku
+Procfile text
+.slugignore text
+
+# Documentation
+*.md text
+LICENSE text
+AUTHORS text
+
+
+#
+## These files are binary and should be left untouched
+#
+
+# (binary is a macro for -text -diff)
+*.png binary
+*.jpg binary
+*.jpeg binary
+*.gif binary
+*.ico binary
+*.mov binary
+*.mp4 binary
+*.mp3 binary
+*.flv binary
+*.fla binary
+*.swf binary
+*.gz binary
+*.zip binary
+*.7z binary
+*.ttf binary
+*.eot binary
+*.woff binary
+*.pyc binary
+*.pdf binary

http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/49caee43/src/npm-link.js
----------------------------------------------------------------------
diff --git a/src/npm-link.js b/src/npm-link.js
index d55bd08..e6e98c2 100644
--- a/src/npm-link.js
+++ b/src/npm-link.js
@@ -1,102 +1,102 @@
-/*
-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');
-var path = require('path');
-var optimist = require('optimist');
-var shelljs = require('shelljs');
-var flagutil = require('./flagutil');
-
-function *createLink(argv) {
-    var opt = flagutil.registerHelpFlag(optimist);
-    argv = opt
-        .usage('Does an npm-link of the modules that we publish. Ensures we are testing live
versions of our own dependencies instead of the last published version.\n' +
-               '\n' +
-               'Usage: $0 npm-link')
-        .argv;
-
-    if (argv.h) {
-        optimist.showHelp();
-        process.exit(1);
-    }
-
-    function npmLinkIn(linkedModule, installingModule) {
-       cdInto(installingModule);
-       // 'npm link' will automatically unbuild a non-linked module if it is present,
-       // so don't need to explicitly 'rm -r' it first.
-       shelljs.exec("npm link " + linkedModule);
-       cdOutOf();
-    }
-
-    function npmLinkOut(moduleName) {
-        cdInto(moduleName);
-        shelljs.exec("npm link");
-        cdOutOf();
-    }
-
-    console.log("npm-linking dependent modules");
-
-    npmLinkOut("cordova-js");
-    npmLinkIn("cordova-js", "cordova-lib");
-
-    npmLinkOut("cordova-common");
-    npmLinkIn("cordova-common", "cordova-lib");
-    npmLinkIn("cordova-common", "cordova-android");
-
-    npmLinkOut("cordova-lib");
-    npmLinkIn("cordova-lib", "cordova-plugman");
-    npmLinkIn("cordova-lib", "cordova-cli");
-}
-
-module.exports = createLink;
-
-function getPathFromModuleName(moduleName) {
-    if (moduleName == "cordova-lib" || moduleName == "cordova-common") {
-        return("cordova-lib" + path.sep + moduleName);
-    }
-
-    return(moduleName);
-}
-
-function cdInto(moduleName) {
-    var myPath = getPathFromModuleName(moduleName);
-    shelljs.pushd(myPath);
-}
-
-function cdOutOf() {
-    shelljs.popd();
-}
-
-function verifyLink (linkedModule, installedModule) {
-    cdInto(installedModule);
-    var linkedPath = path.join(shelljs.pwd(), "node_modules", linkedModule);
-    if (!fs.existsSync(linkedPath)) {
-        return false;
-    }
-
-    var myStat = fs.lstatSync(linkedPath);
-    if (!myStat.isSymbolicLink()) {
-        return false;
-    }
-
-    cdOutOf();
-    return true;
-}
-
-module.exports.verifyLink = verifyLink;
+/*
+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');
+var path = require('path');
+var optimist = require('optimist');
+var shelljs = require('shelljs');
+var flagutil = require('./flagutil');
+
+function *createLink(argv) {
+    var opt = flagutil.registerHelpFlag(optimist);
+    argv = opt
+        .usage('Does an npm-link of the modules that we publish. Ensures we are testing live
versions of our own dependencies instead of the last published version.\n' +
+               '\n' +
+               'Usage: $0 npm-link')
+        .argv;
+
+    if (argv.h) {
+        optimist.showHelp();
+        process.exit(1);
+    }
+
+    function npmLinkIn(linkedModule, installingModule) {
+       cdInto(installingModule);
+       // 'npm link' will automatically unbuild a non-linked module if it is present,
+       // so don't need to explicitly 'rm -r' it first.
+       shelljs.exec("npm link " + linkedModule);
+       cdOutOf();
+    }
+
+    function npmLinkOut(moduleName) {
+        cdInto(moduleName);
+        shelljs.exec("npm link");
+        cdOutOf();
+    }
+
+    console.log("npm-linking dependent modules");
+
+    npmLinkOut("cordova-js");
+    npmLinkIn("cordova-js", "cordova-lib");
+
+    npmLinkOut("cordova-common");
+    npmLinkIn("cordova-common", "cordova-lib");
+    npmLinkIn("cordova-common", "cordova-android");
+
+    npmLinkOut("cordova-lib");
+    npmLinkIn("cordova-lib", "cordova-plugman");
+    npmLinkIn("cordova-lib", "cordova-cli");
+}
+
+module.exports = createLink;
+
+function getPathFromModuleName(moduleName) {
+    if (moduleName == "cordova-lib" || moduleName == "cordova-common") {
+        return("cordova-lib" + path.sep + moduleName);
+    }
+
+    return(moduleName);
+}
+
+function cdInto(moduleName) {
+    var myPath = getPathFromModuleName(moduleName);
+    shelljs.pushd(myPath);
+}
+
+function cdOutOf() {
+    shelljs.popd();
+}
+
+function verifyLink (linkedModule, installedModule) {
+    cdInto(installedModule);
+    var linkedPath = path.join(shelljs.pwd(), "node_modules", linkedModule);
+    if (!fs.existsSync(linkedPath)) {
+        return false;
+    }
+
+    var myStat = fs.lstatSync(linkedPath);
+    if (!myStat.isSymbolicLink()) {
+        return false;
+    }
+
+    cdOutOf();
+    return true;
+}
+
+module.exports.verifyLink = verifyLink;


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


Mime
View raw message