You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jo...@apache.org on 2016/08/17 19:55:23 UTC
git commit: [flex-utilities] [refs/heads/develop] - npm-flexjs: fixes
line endings on all files in js/bin that don't have an extension
Repository: flex-utilities
Updated Branches:
refs/heads/develop 59664053c -> 1bd906072
npm-flexjs: fixes line endings on all files in js/bin that don't have an extension
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/1bd90607
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/1bd90607
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/1bd90607
Branch: refs/heads/develop
Commit: 1bd90607272908b8364e20a99524485a9bde3e2a
Parents: 5966405
Author: Josh Tynjala <jo...@apache.org>
Authored: Wed Aug 17 12:54:22 2016 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Wed Aug 17 12:54:22 2016 -0700
----------------------------------------------------------------------
.../dependencies/download_dependencies.js | 21 +++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/1bd90607/npm-flexjs/dependencies/download_dependencies.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/download_dependencies.js b/npm-flexjs/dependencies/download_dependencies.js
index 3858049..851e041 100644
--- a/npm-flexjs/dependencies/download_dependencies.js
+++ b/npm-flexjs/dependencies/download_dependencies.js
@@ -20,6 +20,7 @@
'use strict';
var fs = require('fs');
+var path = require('path');
var mkdirp = require('mkdirp');
var eol = require('eol');
var constants = require('./Constants');
@@ -51,18 +52,20 @@ function updateScriptEOL()
{
try
{
- var files =
- [
- 'js/bin/asjscnpm',
- 'js/bin/asjscompcnpm',
- 'js/bin/mxmlcnpm'
- ];
+ var dirPath = path.join('js', 'bin');
+ var files = fs.readdirSync(dirPath);
do
{
- var file = files.shift();
- var data = fs.readFileSync(file, {encoding: 'utf8'});
+ var filePath = files.shift();
+ if(path.extname(filePath) !== '')
+ {
+ //skip windows batch files
+ continue;
+ }
+ filePath = path.resolve(dirPath, filePath);
+ var data = fs.readFileSync(filePath, {encoding: 'utf8'});
data = eol.lf(data);
- fs.writeFileSync(file, data, {encoding: 'utf8', mode: 0o755});
+ fs.writeFileSync(filePath, data, {encoding: 'utf8', mode: 0o755});
}
while(files.length > 0)
}