0.0.6 • Published 6 years ago
@bandress-dumbasses/lame v0.0.6
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
lameproject 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.mdtouch .gitignoretouch .npmrc
- Add the
.npmrcfile with the following:scope=bandress-dumbassesaccess=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.1git 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
.npmrcfile that contains thescopeandaccessconfigurations - Add the
repositoryproperty to thepackage.jsonfile, 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
nameproperty from thepackage.jsonis used- You may need to change them from
nametoname.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