git-publish 0.0.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,27 +1,53 @@
1
1
  {
2
- "name": "git-publish",
3
- "version": "0.0.2",
4
- "description": "Publish your git repo to GitHub, BitBucket or GitLab with a single command",
5
- "main": "git-publish.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "keywords": [
10
- "git",
11
- "github",
12
- "bitbucket",
13
- "gitlab",
14
- "publish"
15
- ],
16
- "repository": "TheKnarf/git-publish",
17
- "author": "Frank Lyder Bredland <fl@nyggen.com>",
18
- "license": "MIT",
19
- "dependencies": {
20
- "commander": "^2.9.0",
21
- "github": "^0.2.4"
22
- },
23
- "bin": {
24
- "git-publish": "git-publish.js",
25
- "git-publish-provider-github": "git-publish-provider-github.js"
26
- }
2
+ "name": "git-publish",
3
+ "version": "1.0.0",
4
+ "description": "Publish your npm package to a GitHub repository branch",
5
+ "keywords": [
6
+ "npm",
7
+ "publish",
8
+ "git",
9
+ "github",
10
+ "branch",
11
+ "branches"
12
+ ],
13
+ "license": "MIT",
14
+ "repository": "privatenumber/git-publish",
15
+ "funding": "https://github.com/privatenumber/git-publish?sponsor=1",
16
+ "author": {
17
+ "name": "Hiroki Osame",
18
+ "email": "hiroki.osame@gmail.com"
19
+ },
20
+ "files": [
21
+ "bin",
22
+ "dist"
23
+ ],
24
+ "bin": "dist/index.js",
25
+ "scripts": {
26
+ "build": "pkgroll --minify --target=node12.19",
27
+ "lint": "eslint .",
28
+ "prepack": "npm run build",
29
+ "pretest": "npm run build",
30
+ "test": "tsx tests"
31
+ },
32
+ "dependencies": {
33
+ "yoga-layout-prebuilt": "^1.10.0"
34
+ },
35
+ "devDependencies": {
36
+ "@pvtnbr/eslint-config": "^0.27.0",
37
+ "@types/node": "^18.6.4",
38
+ "@types/npm-packlist": "^3.0.0",
39
+ "cleye": "^1.2.1",
40
+ "eslint": "^8.21.0",
41
+ "execa": "^6.1.0",
42
+ "fs-fixture": "^1.1.0",
43
+ "manten": "^0.2.1",
44
+ "npm-packlist": "^5.1.1",
45
+ "pkgroll": "^1.4.0",
46
+ "tasuku": "^2.0.0",
47
+ "tsx": "^3.8.0",
48
+ "typescript": "^4.7.4"
49
+ },
50
+ "eslintConfig": {
51
+ "extends": "@pvtnbr"
52
+ }
27
53
  }
package/.npmignore DELETED
@@ -1,184 +0,0 @@
1
- # Created by https://www.gitignore.io/api/osx,windows,linux,vim,emacs,node,intellij
2
-
3
- ### OSX ###
4
- .DS_Store
5
- .AppleDouble
6
- .LSOverride
7
-
8
- # Icon must end with two \r
9
- Icon
10
-
11
-
12
- # Thumbnails
13
- ._*
14
-
15
- # Files that might appear in the root of a volume
16
- .DocumentRevisions-V100
17
- .fseventsd
18
- .Spotlight-V100
19
- .TemporaryItems
20
- .Trashes
21
- .VolumeIcon.icns
22
-
23
- # Directories potentially created on remote AFP share
24
- .AppleDB
25
- .AppleDesktop
26
- Network Trash Folder
27
- Temporary Items
28
- .apdisk
29
-
30
-
31
- ### Windows ###
32
- # Windows image file caches
33
- Thumbs.db
34
- ehthumbs.db
35
-
36
- # Folder config file
37
- Desktop.ini
38
-
39
- # Recycle Bin used on file shares
40
- $RECYCLE.BIN/
41
-
42
- # Windows Installer files
43
- *.cab
44
- *.msi
45
- *.msm
46
- *.msp
47
-
48
- # Windows shortcuts
49
- *.lnk
50
-
51
-
52
- ### Linux ###
53
- *~
54
-
55
- # KDE directory preferences
56
- .directory
57
-
58
- # Linux trash folder which might appear on any partition or disk
59
- .Trash-*
60
-
61
-
62
- ### Vim ###
63
- [._]*.s[a-w][a-z]
64
- [._]s[a-w][a-z]
65
- *.un~
66
- Session.vim
67
- .netrwhist
68
- *~
69
-
70
-
71
- ### Emacs ###
72
- # -*- mode: gitignore; -*-
73
- *~
74
- \#*\#
75
- /.emacs.desktop
76
- /.emacs.desktop.lock
77
- *.elc
78
- auto-save-list
79
- tramp
80
- .\#*
81
-
82
- # Org-mode
83
- .org-id-locations
84
- *_archive
85
-
86
- # flymake-mode
87
- *_flymake.*
88
-
89
- # eshell files
90
- /eshell/history
91
- /eshell/lastdir
92
-
93
- # elpa packages
94
- /elpa/
95
-
96
- # reftex files
97
- *.rel
98
-
99
- # AUCTeX auto folder
100
- /auto/
101
-
102
- # cask packages
103
- .cask/
104
-
105
-
106
- ### Node ###
107
- # Logs
108
- logs
109
- *.log
110
- npm-debug.log*
111
-
112
- # Runtime data
113
- pids
114
- *.pid
115
- *.seed
116
-
117
- # Directory for instrumented libs generated by jscoverage/JSCover
118
- lib-cov
119
-
120
- # Coverage directory used by tools like istanbul
121
- coverage
122
-
123
- # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
124
- .grunt
125
-
126
- # node-waf configuration
127
- .lock-wscript
128
-
129
- # Compiled binary addons (http://nodejs.org/api/addons.html)
130
- build/Release
131
-
132
- # Dependency directory
133
- # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
134
- node_modules
135
-
136
-
137
- ### Intellij ###
138
- # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
139
-
140
- *.iml
141
-
142
- ## Directory-based project format:
143
- .idea/
144
- # if you remove the above rule, at least ignore the following:
145
-
146
- # User-specific stuff:
147
- # .idea/workspace.xml
148
- # .idea/tasks.xml
149
- # .idea/dictionaries
150
-
151
- # Sensitive or high-churn files:
152
- # .idea/dataSources.ids
153
- # .idea/dataSources.xml
154
- # .idea/sqlDataSources.xml
155
- # .idea/dynamic.xml
156
- # .idea/uiDesigner.xml
157
-
158
- # Gradle:
159
- # .idea/gradle.xml
160
- # .idea/libraries
161
-
162
- # Mongo Explorer plugin:
163
- # .idea/mongoSettings.xml
164
-
165
- ## File-based project format:
166
- *.ipr
167
- *.iws
168
-
169
- ## Plugin-specific files:
170
-
171
- # IntelliJ
172
- /out/
173
-
174
- # mpeltonen/sbt-idea plugin
175
- .idea_modules/
176
-
177
- # JIRA plugin
178
- atlassian-ide-plugin.xml
179
-
180
- # Crashlytics plugin (for Android Studio and IntelliJ)
181
- com_crashlytics_export_strings.xml
182
- crashlytics.properties
183
- crashlytics-build.properties
184
-
package/Readme.md DELETED
@@ -1,16 +0,0 @@
1
- #Git publish
2
-
3
- Git publish lets you push your git repo to GitHub, BitBucket or GitLab with a single command, `git publish`.
4
- It uses the corresponding sites API to create a new repo with the name of the current folder your in,
5
- then it adds it as a remote to the current repo and pushes the current branch.
6
-
7
- ## Installation
8
-
9
- ~~`Npm install -g git-publish`~~
10
- - clone the repo
11
-
12
- - `npm install -g`
13
-
14
- ## Usage
15
-
16
- `username=YourUserName password=YourPassword git publish`
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- var GitHubApi = require("github");
4
- var name = process.argv[2];
5
-
6
- if(typeof name == 'undefined') {
7
- console.error('Missing argument name');
8
- process.exit(1);
9
- }
10
-
11
-
12
- var github = new GitHubApi({
13
- version: '3.0.0'
14
- });
15
-
16
- github.authenticate({
17
- type: 'basic',
18
- username: process.env.username,
19
- password: process.env.password
20
- });
21
-
22
- github.repos.create({
23
- name: name
24
- }, function(error, result) {
25
- if(error != null)
26
- process.exit(1);
27
-
28
- console.log(result['clone_url']);
29
- });
package/git-publish.js DELETED
@@ -1,54 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- var program = require('commander'),
4
- exec = require('child_process').exec;
5
-
6
- var currentFolderName = require('path').basename(process.cwd());
7
-
8
- program
9
- .version('0.0.2')
10
- .description('Create a repo on providers like GitHub, Bitbucket or Gitlab and push to it with a single command')
11
- .option('-P, --provider [GitHub, Bitbucket, GitLab]', 'Change witch provider to use, defaults to GitHub', 'github')
12
- .option('-N, --name <name>', 'Name for the newly created repo, defaults to directory name', currentFolderName)
13
- // .option('-D, --description <desc>', 'Discription for the new repo')
14
- // .option('-U, --user <username>', 'Username for login on the selected provider')
15
- // .option('--private', 'Publish it as a private repo')
16
- // .option('--public', 'Publish it as a public repo')
17
- // .option('--wiki', 'Publish it with a wiki if the provider supports wikis')
18
- // .option('--issues', 'Publish it with a issue tracker if the provider supports issue trackers')
19
- // .option('--protocol [https, ssh], 'Decide if you want https or ssh for your git remote if the provider supports it, default is ssh', 'ssh')
20
- // .option('-I, --interactive', 'Ask for properties like provider and name interactivly', false)
21
- // .option('--all', 'Publish all local branches', false)
22
-
23
- program.parse(process.argv);
24
-
25
- var cmd = 'git-publish-provider-' + program.provider.toLowerCase() + ' ' + program.name;
26
-
27
- exec(cmd, function(error, stdout, stderr) {
28
- if(error != null) {
29
- console.log("Error: ", stderr);
30
- process.exit(error);
31
- }
32
-
33
- var git_remote = stdout,
34
- cmd_add_remote = 'git remote add origin ' + git_remote,
35
- cmd_git_push = 'git push -u origin $(git symbolic-ref HEAD)';
36
-
37
- console.log(cmd_add_remote);
38
- exec(cmd_add_remote, function(error, stdout, stderr) {
39
- if(error != null) {
40
- console.log("Error: ", stderr);
41
- process.exit(error);
42
- }
43
-
44
- console.log(cmd_git_push);
45
- exec(cmd_git_push, function(error, stdout, stderr) {
46
- if(error != null) {
47
- console.log("Error: ", stderr);
48
- process.exit(error);
49
- }
50
-
51
- console.log(stdout);
52
- });
53
- });
54
- });