1.2.0 • Published 5 years ago

@artlabx/logo v1.2.0

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
5 years ago

@artlabx/logo

Very simple NPM package that contains the artlab logo. Created to understand the process for building and deploying packages to https://www.npmjs.com/.

Usage

TBD. Ultimately need to determine what content is appropriate for installation by package consumers. For example, should they only have access to a /dist folder with the final compiled assets? What are the approprate package.json attributes to enforce this?

npmjs

Tips

  • A package is a file or directory that is described by a package.json file. A module is any file or directory (typically found in the node_modules directory) that can be loaded by the Node require() function. So the npm registry contains packages, many of which contain Node modules.

  • A valid javascript file defined for main inside of your package.json allows for some additional functionality such as require.resolve()

Process

Scope is critical.

Account Setup

Create an organization within your account which serves as the scope (ie. @artlabx).

Within the organization there needs to be a team. npmjs adds a "developers" team by default.

Users must then be added to the team.

Teams must also be given read/write permissions on a package after its initial publication.

Publish

A valid npm user must be added to your .npmrc file.

# NOTE the scope
$ npm adduser --scope=@artlabx

Once added, publish can be executed. Setting --access public is only necessary on the initial publish.

$ npm publish --access public

When returning to publish again, simply log back in:

When dealing with scoped packages it is critical to flag as such during login.

$ npm login --scope=@artlabx
# login without scope
$ npm login 
>> Logged in as illustr8r on https://registry.npmjs.org/.

# login without scope
$ npm login --scope=@artlabx
>> Logged in as illustr8r to scope @artlabx on https://registry.npmjs.org/.

New Version

Recommended sequence: 1. Commit any outstanding stages 2. npm version ${update_type} 3. npm publish 4. git push 5. git push --tags

npm version ${update_type} stages git commit and creates a tag. Only need to execute git push and git push --tags.

# ${update_type} options = ["major", "minor", "patch"]
$ npm version ${update_type}
1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.1.2

5 years ago

1.0.0

5 years ago