Gathering detailed insights and metrics for @kebab-case/npm-simple-publisher
Gathering detailed insights and metrics for @kebab-case/npm-simple-publisher
Gathering detailed insights and metrics for @kebab-case/npm-simple-publisher
Gathering detailed insights and metrics for @kebab-case/npm-simple-publisher
An easy-to-use npm publisher. For ES6 source to ES6 modules and node JS exports.
npm install @kebab-case/npm-simple-publisher
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1 Stars
75 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Dec 07, 2020
Latest Version
2.1.4
Package Id
@kebab-case/npm-simple-publisher@2.1.4
Unpacked Size
83.30 kB
Size
18.46 kB
File Count
39
NPM Version
6.14.9
Node Version
12.20.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
This little nodejs command-line script allows you to easily compile and publish node and es6 compliant code packages to npm. Init your project with minimal babel configuration for es6, compile to cjs and publish to npm with only two commands.
This package requires yarn
to behave correctly.
1# install yarn 2sudo apt install yarn 3# or (deprecated) 4sudo npm install -g yarn 5 6# TODO install globally 7sudo npm install -g @kebab-case/npm-simple-publisher
This version adds linter before build and breaking init
changes options.
npm i -g @kebab-case/npm-simple-publisher@latest
package.json
in package.bkp.json
and remove the package.json.script
and package.json.eslintConfig
entries of the original file.kc-nsp init -su
(it will skip any existing file other than config.local.json
and package.json
)build
and publish
scripts won't complete if eslint
failspackage.bkp.json
to package.json
First, create your new project your-project-name
and a sub-folder your-project-name/src
for your source
code.
Using terminal, navigate to your project root folder, i.e. cd your-project-name
Enter the following command to init your project:
1kc-nsp init
You can re-run this command afterwards, but you will need to add the -f
option to force overwrite of files, or the
-s
to skip existing files. Use the -su
options to only update your package.json
(existing scripts / eslint config won't be replaced).
Enter prompted values. ~ stands for null
. You can replace vars later in the newly created
config.local.json
with yours:
1{ 2 "NSP_USERNAME": "your npm username", 3 "NSP_PASSWORD": "your npm password", 4 "NSP_EMAIL": "your public npm email", 5 "NSP_PACKAGE_DESCRIPTION": "your package description", 6 "NSP_PACKAGE_KEYWORDS": "comma,separated,keywords", 7 "NSP_PACKAGE_LICENSE": "license to use - default: MIT", 8 "NSP_PACKAGE_VERSION": "default: 1.0.0", 9 "NSP_PACKAGE_PRIVATE": "true|false", 10 "NSP_SCOPED_PACKAGE": "true|false: use true to scope package as @username/package-name", 11 "NSP_SCOPE_NAME": "scope name - default: @username", 12 "NSP_APP_ENTRY_POINT": "app entry point - relative to ./src directory - default: index.js", 13 "NSP_REPOSITORY_HOMEPAGE": "full URL to your remote git repo homepage - default: null", 14 "NSP_ISSUES": "full URL to your bug tracker - automatically defined if github homepage provided", 15 "NSP_REPOSITORY_REMOTE": "full https URL to your remote .git - automatically defined if github homepage provided" 16}
N.B.: this file is gitignored, so you can set your npm password confidently.
You can find a list of supported licenses here after - your license field must exactly match a filename without extension: https://github.com/spdx/license-list-data/tree/master/text
You shall modify LICENSE file by replacing some generic fields (
P.S. Default package name will be your-project-name
folder name, but it can be changed in config.local.json
.
You can now write es6 in your ./src
folder and set up your own settings in package.json
and .gitignore
.
DO NOT forget to add your fantastic README.md
! If you don't, @kc/NSP will add a placeholder before publishing.
Ready to publish to npm ? Use the kc-nsp publish
script!
First, the kc-nsp build
sub-command will create a dist
folder will be created with cjs-compliant code, and your
src
entry point will be used as an es6 module. Your package.json
will be modified accordingly
(using kc-nsp generate-pj
subcommand).
You can use publish with following options:
1# skip build 2kc-nsp publish --skip-build 3kc-nsp publish -s 4# update version 5kc-nsp publish --update-version=%s # with %s: M => new major version / m : new minor version / r : new revision 6kc-nsp publish -t %s 7# skip publish confirmation 8kc-nsp publish --yes 9kc-nsp publish -y 10# override default git commit message 11kc-nps publish --commit-message="my commit message" 12kc-nps publish -m "my commit message" 13# override default git tag message 14kc-nps publish --tag-message="my tag message" 15kc-nps publish -v="my tag message" 16# use custom publish hooks - see detailed help about using hooks here after 17kc-nps publish --publish-on=hook1 --publish-on=hook2 18kc-nps publish --p=hook1 --p=hook2 19# deprecate one or more older major versions - in development
You can define your own publishing hooks, which will be executed after git push
(if configured) and before
npm publish
. Each hook is a command-line of your choice with any arguments you want.
To do so:
./config.json
(if you want to version your hooks), either in ./config.local.json
(if you don't). Format of hooks field:1{ 2 "NSP_HOOKS": { 3 "hook-name": [ 4 "command-name", 5 ["list of arguments"], 6 { 7 "prompt_question1": "answer to prompt_question1" 8 }, 9 "interactive script (true|false)", 10 null, 11 [ 12 "hidden_field1 (should match any of prompt_question)" 13 ] 14 ] 15 } 16}
@kebab-case/node-command-manager/interactiveShell
to be executed.
To get more help about interactiveShell
, please visit https://www.npmjs.com/package/@kebab-case/node-command-manager#interactive-shell
Note that you can define hooks with blank / undefined entries (like passwords), so you can version it; if you do so,
you will be prompted values for these.prompt_questions
and hidden_fields
can use regex syntax to match your command prompt.kc-nps publish -p hook-name1 -p hook-name2 ...
to use your hooks. If you do so, you will have
to specify every hook you want to use, even git
and npm
, or they'll simply be skipped.
You can add a script
entry in package.json
to avoid typing all that hooks every single time :1{ 2 "scripts": { 3 // bunch of scripts 4 "kn-publish": "kc-nps publish -p npm -p git -p my hook" 5 } 6}
This way you can publish more quickly using yarn kn-publish [other publish args]
.
Type kc-nsp --help
to get help on all available commands, and kc-nsp [module] --help
for further help on a
specific one.
This package has been brought to you by npm-simple-publisher
This little nodejs command-line script allows you to easily compile and publish node and es6 compliant code packages to npm. Init your project with minimal babel configuration for es6, compile to cjs and publish to npm with only two commands.
Try it now:
1sudo apt install yarn 2sudo npm install -g @kebab-case/npm-simple-publisher 3mkdir my_project 4cd my_project 5# getting help about command 6kc-nsp -h # list of command modules 7kc-nsp init -h # and so on 8# getting started 9kc-nsp init -f # create project 10# ... do things in my_project/src, using proposed build or your own (not npm-friendly) 11kc-nsp publish -t M|m|r # publish new Major / minor version or revision
Basically, that's all!
Find on npm: https://www.npmjs.com/package/@kebab-case/npm-simple-publisher
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
27 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More