@bandress-dumbasses/lame
v0.0.6
Published
Informal notes on working with org-scoped projects in the npm registry.
Downloads
10
Readme
LAME
Informal notes on working with org-scoped projects in the npm registry.
Table of Contents
Create a new org-scoped project
- Initialize the project directory:
mkdir lame
- Create the
lame
project on github - Initialize the git project locally:
git init
- Associate the local project with github:
git remote add origin https://github.com/brainthinks/lame-test.git
- Add some stuff to the project
touch README.md
touch .gitignore
touch .npmrc
- Add the
.npmrc
file with the following:scope=bandress-dumbasses
access=public
- Initialize the node project:
yarn init
- Provide the name of the project as
@bandress-dumbasses/lame
- Commit and push all the files:
git add .
git commit -m "message"
git push -u origin master
- Version the project:
yarn version --new-version 0.0.1
git push --tags
- Publish the project
npm publish
Observe that the project was published to the org's namespace.
Modify an existing project to have an org scope
- Add the
.npmrc
file that contains thescope
andaccess
configurations - Add the
repository
property to thepackage.json
file, where the value is the git url- e.g.
"repository": "https://github.com/brainthinks/lame-test.git",
- e.g.
- Find all instances in the project where the
name
property from thepackage.json
is used- You may need to change them from
name
toname.split('/').pop()
- You may need to change them from
- Commit and push all changes
- Version the project:
yarn version --new-version 0.0.1
- Publish the project
npm publish