Skip to content

Commit

Permalink
[changed] transpile straight to bin/release
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKVal committed Jul 10, 2015
1 parent e171a8d commit 2fded01
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.DS_Store
npm-debug.log*
node_modules
lib
bin
3 changes: 0 additions & 3 deletions bin/release.js

This file was deleted.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
23 changes: 12 additions & 11 deletions src/release.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
/* globals cat, config, cp, ls, popd, pushd, pwd, rm, exec, exit */
/* eslint curly: 0 */
import 'colors';
Expand All @@ -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 = `[email protected]:${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 = `[email protected]:${gitUrlBase}-bower.git`;
// }
const bowerRepo = npmjson.bowerRepo; // if it is not set, then there is no bower repo

//------------------------------------------------------------------------------
// command line options
Expand Down

0 comments on commit 2fded01

Please sign in to comment.