config: enhance tsconfig.json (#44)

* config: enhance tsconfig.json (Set sourceMap and removeComments to true)
* gha: Add pull_request trigger, close #43
* config: Add waring emoji
This commit is contained in:
Shohei Ueda 2019-09-23 10:58:19 +09:00 committed by GitHub
parent 71663ea875
commit a6d33f08ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 14 additions and 9 deletions

View File

@ -1,6 +1,7 @@
name: 'Test'
on:
pull_request:
push:
paths:
- '**'

View File

@ -20,3 +20,4 @@ function getLatestVersion() {
});
}
exports.default = getLatestVersion;
//# sourceMappingURL=get-latest-version.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"get-latest-version.js","sourceRoot":"","sources":["../src/get-latest-version.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,cAAc,CAAC;AAEhE,SAAwB,gBAAgB;IACtC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QACjC,MAAM,GAAG,GAAW,gDAAgD,CAAC;QACrE,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACrB,GAAG,CAAC,IAAI,EAAE,CAAC;QACX,GAAG,CAAC,kBAAkB,GAAG;YACvB,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;gBAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gBAC5C,MAAM,aAAa,GAAW,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;gBACrD,OAAO,CAAC,aAAa,CAAC,CAAC;aACxB;iBAAM,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;gBACrD,MAAM,CAAC,qBAAqB,GAAG,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC,CAAC;aACrD;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,mCAgBC"}

View File

@ -9,10 +9,10 @@ function getOS(platform) {
}
else if (platform === 'win32') {
return 'Windows';
// throw new Error("Windows is not supported");
}
else {
throw new Error(`${platform} is not supported`);
}
}
exports.default = getOS;
//# sourceMappingURL=get-os.js.map

1
lib/get-os.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"get-os.js","sourceRoot":"","sources":["../src/get-os.ts"],"names":[],"mappings":";;AAAA,SAAwB,KAAK,CAAC,QAAgB;IAC5C,IAAI,QAAQ,KAAK,OAAO,EAAE;QACxB,OAAO,OAAO,CAAC;KAChB;SAAM,IAAI,QAAQ,KAAK,QAAQ,EAAE;QAChC,OAAO,OAAO,CAAC;KAChB;SAAM,IAAI,QAAQ,KAAK,OAAO,EAAE;QAC/B,OAAO,SAAS,CAAC;KAElB;SAAM;QACL,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,mBAAmB,CAAC,CAAC;KACjD;AACH,CAAC;AAXD,wBAWC"}

View File

@ -7,8 +7,6 @@ function getURL(os, extended, version) {
}
else {
return '';
// } else {
// throw new Error(`Invalid input (extended): ${extended}`);
}
};
const ext = (os) => {
@ -25,3 +23,4 @@ function getURL(os, extended, version) {
return url;
}
exports.default = getURL;
//# sourceMappingURL=get-url.js.map

1
lib/get-url.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"get-url.js","sourceRoot":"","sources":["../src/get-url.ts"],"names":[],"mappings":";;AAAA,SAAwB,MAAM,CAC5B,EAAU,EACV,QAAgB,EAChB,OAAe;IAEf,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,EAAE;QACvC,IAAI,QAAQ,KAAK,MAAM,EAAE;YACvB,OAAO,WAAW,CAAC;SACpB;aAAM;YACL,OAAO,EAAE,CAAC;SAGX;IACH,CAAC,CAAC;IAEF,MAAM,GAAG,GAAG,CAAC,EAAU,EAAE,EAAE;QACzB,IAAI,EAAE,KAAK,SAAS,EAAE;YACpB,OAAO,KAAK,CAAC;SACd;aAAM;YACL,OAAO,QAAQ,CAAC;SACjB;IACH,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAW,QAAQ,WAAW,CAC1C,QAAQ,CACT,GAAG,OAAO,IAAI,EAAE,QAAQ,CAAC;IAC1B,MAAM,OAAO,GAAW,oDAAoD,CAAC;IAC7E,MAAM,GAAG,GAAW,GAAG,OAAO,KAAK,OAAO,IAAI,QAAQ,IAAI,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;IAEpE,OAAO,GAAG,CAAC;AACb,CAAC;AA9BD,yBA8BC"}

View File

@ -23,11 +23,9 @@ const core = __importStar(require("@actions/core"));
const exec = __importStar(require("@actions/exec"));
const get_latest_version_1 = __importDefault(require("./get-latest-version"));
const installer_1 = __importDefault(require("./installer"));
// most @actions toolkit packages have async methods
function run() {
return __awaiter(this, void 0, void 0, function* () {
const dump = () => __awaiter(this, void 0, void 0, function* () {
// Show version
yield exec.exec('hugo version');
});
try {
@ -55,3 +53,4 @@ function run() {
});
}
run();
//# sourceMappingURL=index.js.map

1
lib/index.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AACtC,oDAAsC;AACtC,8EAAoD;AACpD,4DAAoC;AAGpC,SAAe,GAAG;;QAChB,MAAM,IAAI,GAAG,GAAS,EAAE;YAEtB,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC,CAAA,CAAC;QAEF,IAAI;YACF,MAAM,WAAW,GAAW,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;YAE1D,IAAI,WAAW,KAAK,EAAE,IAAI,WAAW,KAAK,QAAQ,EAAE;gBAClD,4BAAgB,EAAE,CAAC,IAAI,CACrB,UAAe,aAAa;;wBAC1B,OAAO,CAAC,GAAG,CAAC,iBAAiB,aAAa,KAAK,WAAW,GAAG,CAAC,CAAC;wBAC/D,MAAM,mBAAS,CAAC,aAAa,CAAC,CAAC;wBAC/B,MAAM,IAAI,EAAE,CAAC;oBACf,CAAC;iBAAA,EACD,UAAS,KAAK;oBACZ,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;gBACxB,CAAC,CACF,CAAC;aACH;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,iBAAiB,WAAW,EAAE,CAAC,CAAC;gBAC5C,MAAM,mBAAS,CAAC,WAAW,CAAC,CAAC;gBAC7B,MAAM,IAAI,EAAE,CAAC;aACd;SACF;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAC/B;IACH,CAAC;CAAA;AAED,GAAG,EAAE,CAAC"}

View File

@ -36,7 +36,6 @@ function installer(version) {
const hugoPath = `${process.env.HOME}/bin`;
yield io.mkdirP(hugoPath);
core.addPath(hugoPath);
// Download and extract Hugo binary
const hugoAssets = yield tc.downloadTool(hugoURL);
let hugoBin = '';
if (osName === 'Windows') {
@ -55,3 +54,4 @@ function installer(version) {
});
}
exports.default = installer;
//# sourceMappingURL=installer.js.map

1
lib/installer.js.map Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"installer.js","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AACtC,wDAA0C;AAC1C,gDAAkC;AAClC,sDAA6B;AAC7B,wDAA+B;AAE/B,SAA8B,SAAS,CAAC,OAAe;;QACrD,IAAI;YACF,MAAM,QAAQ,GAAW,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,kBAAkB,QAAQ,EAAE,CAAC,CAAC;YAE1C,MAAM,MAAM,GAAW,gBAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,qBAAqB,MAAM,EAAE,CAAC,CAAC;YAE3C,MAAM,OAAO,GAAW,iBAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC1D,IAAI,CAAC,KAAK,CAAC,YAAY,OAAO,EAAE,CAAC,CAAC;YAElC,MAAM,QAAQ,GAAW,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC;YACnD,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1B,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAGvB,MAAM,UAAU,GAAW,MAAM,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YAC1D,IAAI,OAAO,GAAW,EAAE,CAAC;YACzB,IAAI,MAAM,KAAK,SAAS,EAAE;gBACxB,MAAM,mBAAmB,GAAW,MAAM,EAAE,CAAC,UAAU,CACrD,UAAU,EACV,MAAM,CACP,CAAC;gBACF,OAAO,GAAG,GAAG,mBAAmB,WAAW,CAAC;aAC7C;iBAAM;gBACL,MAAM,mBAAmB,GAAW,MAAM,EAAE,CAAC,UAAU,CACrD,UAAU,EACV,MAAM,CACP,CAAC;gBACF,OAAO,GAAG,GAAG,mBAAmB,OAAO,CAAC;aACzC;YACD,MAAM,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;SAChC;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAC/B;IACH,CAAC;CAAA;AAnCD,4BAmCC"}

View File

@ -16,7 +16,7 @@
"skipCI": true,
"hooks": {
"pre-commit": "lint-staged",
"post-commit": "npm run tsc && npm run build && echo 'Do not forget to Commit and Push ./lib and ./node_modules'"
"post-commit": "npm run tsc && npm run build && echo '⚠️ Do not forget to Commit and Push ./lib and ./node_modules'"
}
},
"lint-staged": {

View File

@ -9,13 +9,13 @@
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
"sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */
"removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */