{"id":16485144,"url":"https://github.com/single9/gt-pack","last_synced_at":"2026-05-11T13:04:47.393Z","repository":{"id":57256440,"uuid":"101951872","full_name":"single9/gt-pack","owner":"single9","description":"啊就一個 webpack 的通用使用整合包。","archived":false,"fork":false,"pushed_at":"2017-11-14T08:37:51.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-27T23:45:48.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gt-pack","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/single9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-31T02:49:49.000Z","updated_at":"2019-04-13T03:12:15.000Z","dependencies_parsed_at":"2022-08-25T02:30:54.800Z","dependency_job_id":null,"html_url":"https://github.com/single9/gt-pack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/single9/gt-pack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/single9%2Fgt-pack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/single9%2Fgt-pack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/single9%2Fgt-pack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/single9%2Fgt-pack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/single9","download_url":"https://codeload.github.com/single9/gt-pack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/single9%2Fgt-pack/sbom","scorecard":{"id":827105,"data":{"date":"2025-08-11","repo":{"name":"github.com/single9/gt-pack","commit":"e7eae6224937dc03ee0297f1a53d204b6284dd67"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 3/22 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T16:49:33.291Z","repository_id":57256440,"created_at":"2025-08-23T16:49:33.292Z","updated_at":"2025-08-23T16:49:33.292Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32895978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T13:24:19.986Z","updated_at":"2026-05-11T13:04:47.369Z","avatar_url":"https://github.com/single9.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"GT Pack\n======\n\n簡介\n-----\n\n啊就一個 webpack 的通用使用整合包。\n\n使用 Webpack 2.x，理論上可相容 3.x 版本。\n\n安裝\n-----\n\n    npm install gt-pack\n\n使用\n-----\n\n在 `webpack.config.js` 加入：\n\n    const gtPack = require('gt-pack');\n\n### 分別設定範例 ###\n\n#### JS #### \n\n    module.exports = new gtPack.js({\n        entry: {\n            index: '__dirname + ' / js / index.js ',\n        },\n        output: {\n            filename: 'public/js/[name].js',\n            path: __dirname + '/',\n        }\n    });\n\n#### TS ####\n\n    module.exports = new gtPack.ts({\n        entry: {\n            index: '__dirname + ' / js / index.ts ',\n        },\n        output: {\n            filename: 'public/js/[name].js',\n            path: __dirname + '/',\n        }\n    });\n\n在專案根目錄新增：`tsconfig.webpack.json`\n\n    {\n        \"compilerOptions\": {\n            \"removeComments\": true,\n            \"sourceMap\": true\n        }\n    }\n\n    // 可以自由增加自己的設定\n\n#### CSS #### \n\n    module.exports = new gtPack.css({\n        entry: {\n            index: '__dirname + ' / less / index.less '\n        },\n        output: {\n            filename: 'public/style/[name].css',\n            path: __dirname + '/',\n        }\n    }, {\n        filename: 'public/style/[name].css',\n    });\n\n#### JS + CSS #### \n\n    // JS\n    let js = new gtPack.js({\n        entry: {\n            index: __dirname + '/js/index.js',\n        },\n        output: {\n            filename: 'public/js/[name].js',\n            path: __dirname,\n        }\n    });\n\n    // CSS\n    let css = new gtPack.css({\n        entry: {\n            index: __dirname + '/less/index.less'\n        },\n        output: {\n            filename: 'public/style/[name].css',\n            path: __dirname,\n        }\n    }, {\n        filename: 'public/style/[name].css',\n    });\n\n    module.exports = [js, css];\n    \n    \n### 整合設定 ### \n\n#### 第一種設定方式 ####\n\n    let x = gtPack.GuanTing({\n        dirName: __dirname + '/views/output', // 輸出位置\n        html: {\n            index: __dirname + '/dev/index.ejs',\n            register: __dirname + '/dev/register.ejs'\n        },\n        css: {\n            index: __dirname + '/dev/css/index.less',\n            register: __dirname + '/dev/css/register.less',\n        },\n        js: {\n            index: __dirname + '/dev/js/index.js',\n            register: __dirname + '/dev/js/register.js',\n        }\n    });\n\n    module.exports = x;\n\n#### 第二種設定方式 ####\n\n    let x = gtPack.GuanTing({\n        dirName: __dirname + '/views/output', // 輸出位置\n        html: gtPack.readEntries(__dirname + '/views/', process.cwd() + '/build/views/'),\n        css: gtPack.readEntries(__dirname + '/views/less/', process.cwd() + '/build/views/', 'less')\n        js: gtPack.readEntries(__dirname + '/views/js/', process.cwd() + '/build/views/', 'js')\n    });\n\n    module.exports = x;\n    \n### 樹狀結構 ### \n\n這是一個樹狀節點版本的結構，讓`webpack`可以在不同的資料夾中有不同的設定。\n\n    let noder = require('gt-pack').noder;\n    let List = [\n        require('./dirA/webpack.config.js'),    // 其他設定\n        require('./dirB/webpack.config.js'),    // 其他設定\n    ];\n    \n    module.exports = noder(List);\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingle9%2Fgt-pack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingle9%2Fgt-pack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingle9%2Fgt-pack/lists"}