Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
mojito-cli-create
Advanced tools
Subcommand for mojito-cli to create mojito scaffolding/boilerplate.
This package provides the create
command for the mojito-cli
tool, that you can install with: npm install -g mojito-cli
Archetypes are used to create skeletons for the different types of artifacts in a Mojito application. The skeletons only contain stripped down boilerplate code that is easier to create using the command-line tool rather than by hand.
To create a skeleton for a Mojito application:
mojito create app [<archetype-name>] <app-name>
This will create an empty application (i.e., one with no mojits) with the name provided. The application is created in a directory named <app-name>
within the current directory. If no archetype name is provided, the default archetype is used.
From the application directory, use the following command to create a skeleton for a mojit:
mojito create mojit [<archetype-name>] <mojit-name>
This will create an empty mojit with the name provided. The command assumes it is being executed within an application directory. Thus, the mojit is created in a directory named <mojit-name>
within the mojits
subdirectory of the application directory. For example, the mojit MyMojit
would be created in mojits/MyMojit
.
As with application creation, if no archetype name is provided, the default archetype is used. Depending upon the archetype, the skeleton may include any or all of the following: controller, model, view, and binder
Mojito offers the following three archetypes for applications and mojits.
simple
- The minimal configuration and code needed to run an application.default
- This archetype is run if no command-line archetype option is specified. It is a happy medium between simple and full.full
- Provides the most comprehensive configuration and code for applications.Mojito also offers the demo app quickstartguide
that is an example app displaying documentation.
To quickstartguide
app, run the following:
mojito create demo quickstartguide <name>
You can also create your own demo apps by placing them under the archetypes/demo
directory and
then running the following command:
mojito create demo <your_demo_app> <name>
You can copy the built-in archetypes and modify them to suit your work-flow, or create your own. Then you can specify the path to specific archetype, like so:
mojito create custom <path/to/archtype> <path/to/name>
If a file in the archetype source ends with .hb
then the contents of the file will have key/value replacement done for the following:
{{name}}
-> the name passed as the last command line argument that is not a flag or option. The
name is lowercased and used for the module name of mojit code.{{class}}
-> is the sname as {{name}}
except the value is not lowercased. The value is used for the class name
of mojit code.You can also specify the option --keyval
or -k
to replace key/value pairs in a string.
For example, suppose you have the archetype directory ../menus
that has the one file today.html.hb
containing the Handlebars expressions {{dish}}
and {{side}}
. Running the command mojito create custom ../menus TodaysMenu -k dish:tilapia,side:macaroni
would create the new directory TodaysMenu
containing the file today.html
(notice that the ".hb" extension is removed). In today.html
, all occurrences of the strings {{dish}}
and {{side}}
would be replaced with tilapia
and macaroni
.
http://developer.yahoo.com/forum/Yahoo-Mojito
BSD, see LICENSE.txt. To contribute to the Mojito project, please see Contributing.
The Mojito project is a meritocratic, consensus-based community project, which allows anyone to contribute and gain additional responsibilities.
FAQs
Subcommand for mojito-cli to create mojito scaffolding/boilerplate.
The npm package mojito-cli-create receives a total of 1 weekly downloads. As such, mojito-cli-create popularity was classified as not popular.
We found that mojito-cli-create demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.