Sliderule is an implementation of the Distributed OSHW (Open Source Hardware) Framework (
being developed by Mach 30 Foundation for Space Development.
Sliderule wraps the
npm commands and uses them to manage DOF/Sliderule projects, both
on the local file system, and on a remote server. At this time only structure management is provided,
there is no capability to render models for documentation like assembly instructions out into their
Central to understanding Sliderule is the concept of local and remote components. Local components
are stored with a project, which is the top-level, enclosing component. Local components do not
have a repository associated with them, they are only stored in the
components directory of a project.
Remote components, on the other hand, are stored in a remote repository, and are only installed into
the local file system if the user requests it. Remote components are intended to be shared, local components
are intended to only be used within their parent project. A local component can be converted into a remote
component later, if desired.
The following is a list of the major operations available through this crate.
- create - Creates a top level component unless creating a component inside of an existing component.
In that case the new component is placed within the
componentsdirectory of the parent "project" component.
- add - Adds a remote component from a repository into the
node_modulesdirectory of the current component.
- download - Downloads a copy of a component form a remote repository.
- update - Downloads the latest changes to the component and/or its remote components (dependencies)
- remove - Removes a component, whether it is local or remote.
- upload - Uploads component changes on the local file system to its remote repository.
- refactor - Converts a local component to a remote component so that it may be more easily shared.
There are also various helper functions to do things like getting what level a component is in a hierarchy and compiling the licenses of all components in a project.
Adds a component from the remote repository at the provided URL to the node_modules directory.
Allows the user to change the source and/or documentation licenses for the project.
Creates a new component or converts an existing directory into a component.
Downloads a copy of a component from the remote repository at the specified URL.
Figures out and returns what depth within another component's hierarchy the component is at. 0 = A top level component is probably being created 1 = A top level component with no parent 2 = A sub-component at depth n
Extracts the source and documentation licenses from a component's .sr file.
Prints out each of the licenses in the component's directory tree so that users can see what licenses are in use and where they reside.
Converts a local component into a remote component, uploading it to the remote repo and then installing via npm.
Allows a user to set the username and password for a component's remote URL. This can be a security risk on multi-user systems since the password is stored in plain text inside the .git/config file. Users should be encouraged to use ssh instead of https to avoid this security issue.
Removes a component (local or remote) from the project directory structure.
Removes a remote component via the name.
Updates all remote component in the node_modules directory.
Downloads updates from the remote repository that is set for this directory.
Uploads any changes to the project/component to a remote repository.