From 2fded01d14a3b686b9523fe58f5e067903bf9b81 Mon Sep 17 00:00:00 2001 From: AlexKVal Date: Fri, 10 Jul 2015 19:54:04 +0300 Subject: [PATCH] [changed] transpile straight to bin/release --- .gitignore | 2 +- bin/release.js | 3 --- package.json | 5 ++--- src/release.js | 23 ++++++++++++----------- 4 files changed, 15 insertions(+), 18 deletions(-) delete mode 100755 bin/release.js diff --git a/.gitignore b/.gitignore index e19e556..06b48bf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ .DS_Store npm-debug.log* node_modules -lib +bin diff --git a/bin/release.js b/bin/release.js deleted file mode 100755 index ff26284..0000000 --- a/bin/release.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require('../lib/release'); diff --git a/package.json b/package.json index 50767f8..f8033a8 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,10 @@ "files": [ "LICENSE", "README.md", - "bin", - "lib" + "bin" ], "scripts": { - "build": "babel src --out-dir lib", + "build": "babel src --out-dir bin && chmod +x ./bin/release.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { diff --git a/src/release.js b/src/release.js index 452ec6b..c316f36 100644 --- a/src/release.js +++ b/src/release.js @@ -1,3 +1,4 @@ +#!/usr/bin/env node /* globals cat, config, cp, ls, popd, pushd, pwd, rm, exec, exit */ /* eslint curly: 0 */ import 'colors'; @@ -20,17 +21,17 @@ const npmjson = JSON.parse(cat(packagePath)); const bowerRoot = path.join(repoRoot, (npmjson.bowerRoot || 'amd/')); const tmpBowerRepo = path.join(repoRoot, (npmjson.tmpBowerRepo || 'tmp-bower-repo')); -let bowerRepo; -if (npmjson.bowerRepo) { - bowerRepo = npmjson.bowerRepo; -} else { - let match = npmjson.repository.url.match(/^git@github\.com:(.*)\.git$/); - match = match || npmjson.repository.url.match(/^git\+https:\/\/github\.com\/(.*)\.git$/); - let gitUrlBase = match && match[1]; - gitUrlBase = gitUrlBase || npmjson.repository.url; - bowerRepo = `git@github.com:${gitUrlBase}-bower.git`; -} - +// let bowerRepo; +// if (npmjson.bowerRepo) { +// bowerRepo = npmjson.bowerRepo; +// } else { +// let match = npmjson.repository.url.match(/^git@github\.com:(.*)\.git$/); +// match = match || npmjson.repository.url.match(/^git\+https:\/\/github\.com\/(.*)\.git$/); +// let gitUrlBase = match && match[1]; +// gitUrlBase = gitUrlBase || npmjson.repository.url; +// bowerRepo = `git@github.com:${gitUrlBase}-bower.git`; +// } +const bowerRepo = npmjson.bowerRepo; // if it is not set, then there is no bower repo //------------------------------------------------------------------------------ // command line options