npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

use-automapper

v0.0.4

Published

Automatically creates config files for `use-import`

Downloads

4

Readme

use-automapper

Automatically maps projects for use-import

This command-line utility automatically creates a use.json config file from an existing JavaScript project for the use-import module.

Installation

npm install -g use-automapper

Usage

To create a map from an existing project, navigate to that project's root directory and enter this into the command line:

use-automapper run

A use.json file will be automatically created for your project and saved to the root directory.

Name Comments

You can control the reference names given to your files within the map. Just put a comment like this inside each of the files you want to name:

/* use-automapper: YourDesiredNameHere */

Options and Flags

--path

Short form: -p

Specifies path to the project's root directory. Defaults to the current working directory.

Example
use-automapper run --path /Users/someone/projects/project
use-automapper run -p /Users/someone/projects/project

--output

Short form: -o

Sets path and filename of the config JSON file. Defaults to use.json within the project's root directory.

Example
use-automapper run --output /Users/someone/projects/project/useMap.json
use-automapper run -o /Users/someone/projects/project/useMap.json

--use-path-style-names

Short form: -s

Flag. Adds the formatted relative path to each file's name (so that, for instance, the file ./src/libs/data/MyClass.js will be named "src/libs/data/MyClass" within the map). Useful to those who prefer to know the exact path to each file without checking use.json.

Example
use-automapper run --use-path-style-names
use-automapper run -s

--use-java-style-names

Short form: -j

Flag. Adds a Java-style package path to the beginning of each file's name (so that, for instance, the file ./src/libs/data/MyClass.js will be named "src.libs.data.MyClass" within the map). Potentially useful for those worried about namespacing.

Example
use-automapper run --use-java-style-names
use-automapper run -j

--disable-file-parsing

Short form:* -d

Flag. Tells the utility not to check files for name comments. May speed up the process for those not using this feature.

Example
use-automapper run --disable-file-parsing
use-automapper run -d

--include-node-modules

Short form:* -m

Flag. Tells the utility to include the JavaScript files found within node_modules folders (which are otherwise ignored by default).

Example
use-automapper run --include-node-modules
use-automapper run -m

--verbose

Short form:* -v

Flag. Logs debug output to console.

Example
use-automapper run --verbose
use-automapper run -v

Related Modules

See also: grunt-use-automapper.

Changelist

  • v0.0.4
    • Now ignores files within node_modules by default. This can be overridden using the --include-node-modules flag.
  • v0.0.3
    • Client bug fix
  • v0.0.2
    • Add verbose option / logging functionality
    • Add unit tests for AutomapperAsync.mapFiles

Credits and Licensing

Created by Jon Stout. Licensed under the MIT license.