Skip to content

Commit

Permalink
Init struct
Browse files Browse the repository at this point in the history
  • Loading branch information
GongT committed Sep 14, 2020
0 parents commit 64ec413
Show file tree
Hide file tree
Showing 15 changed files with 757 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
tab_width = 4

[{*.yml, *.yaml}]
indent_style = space
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pnpm-lock.yaml merge=binary
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary

*.json linguist-language=JSON-with-Comments
package.json linguist-language=JSON
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.rpt2_cache/
node_modules/
jspm_packages/
*.log
dist/
*.tgz
lib
test*
26 changes: 26 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### PackageManager
*.tgz
yarn.lock
node_modules
jspm_modules

### tests
test
tests

### hidden files
.*

### temp files
package-deps.json
*.log

### build source
src
build-script.json
Gulpfile.js
*.tsbuildinfo

### docs
docs/*
!docs/*.d.ts
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docs/
/common/scripts/
/common/project-scripts/output/
jspm_packages
1 change: 1 addition & 0 deletions .prettierrc.js
583 changes: 583 additions & 0 deletions .rush/temp/shrinkwrap-deps.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const gulp = require('gulp');
const { loadToGulp } = require('@build-script/builder');
loadToGulp(gulp, __dirname);
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 GongT <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# tools.gongt.me
5 changes: 5 additions & 0 deletions bin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node

// TODO: support dual stack
require('source-map-support/register');
require('./lib/bin.js');
48 changes: 48 additions & 0 deletions build-script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"alias": {
"build-ts": "tsc -p src",
"watch-ts": "tsc -w -p src",
"cleanup-lib": "rimraf lib",
"yarn-publish": "yarn publish --ignore-scripts --registry https://registry.npmjs.org --access=public",
"upgrade-node-modules": "npm-check-updates --update --packageFile ./package.json",
"run-test": "",
"git-clean": "git clean -f -d -X -e !node_modules -e !node_modules/** -e !.idea -e !.idea/** -e !.vscode -e !.vscode/**"
},
"command": {
"build": {
"title": "Build project",
"run": ["build-ts"]
},
"distclean": {
"title": "Delete git ignore files (without node_modules)",
"run": ["git-clean"]
},
"clean": {
"title": "Delete lib folder",
"run": ["cleanup-lib"]
},
"rebuild": {
"title": "Prepare for publish package",
"run": ["@build"],
"after": ["distclean"]
},
"publish": {
"title": "Publish package (do same thing with npm publish)",
"run": ["yarn-publish"],
"after": ["rebuild"]
},
"test": {
"title": "Run test",
"run": ["run-test"],
"after": ["build"]
},
"upgrade": {
"title": "Do project dependency upgrade",
"run": ["upgrade-node-modules"]
},
"watch": {
"title": "Watch mode build project",
"run": ["watch-ts"]
}
}
}
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "tools.gongt.me",
"version": "0.0.0",
"license": "MIT",
"author": "GongT <[email protected]> https://github.com/gongt/",
"scripts": {
"build": "build-script build",
"clean": "rimraf lib",
"distclean": "build-script distclean",
"prepack": "build-script rebuild",
"test": "build-script test",
"upgrade": "build-script upgrade",
"watch": "build-script watch"
},
"bin": {
"tools.gongt.me": "./bin.js"
},
"monorepo": "rush",
"dependencies": {
"source-map-support": "^0.5.19"
},
"devDependencies": {
"@build-script/builder": "^2.0.17",
"@build-script/single-dog-asset": "^1.0.3",
"typescript": "^4.0.2",
"ttypescript": "^1.5.12",
"gulp": "^4.0.2"
}
}
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

export function test(): string {
return "hello world";
}
8 changes: 8 additions & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../node_modules/@build-script/single-dog-asset/package/tsconfig.no-lib.json",
"compilerOptions": {
"outDir": "../lib",
"rootDir": ".",
"typeRoots": ["../node_modules/@types", "../node_modules"]
}
}

0 comments on commit 64ec413

Please sign in to comment.