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

@aofl/aofljs-cli

v0.6.10

Published

is a command line tool for running aofljs/0.6.0 local server and automate the build process of aofljs apps.

Downloads

102

Readme

@aofl/aofljs-cli

aofljs-cli is a command line tool for running aofljs/0.6.0 local server and automate the build process of aofljs apps.

Installation

  1. Make sure you have the latest stable versions of git, node and npm installed
  2. Install as global package:
$ npm install -g @aofl/aofljs-cli

Usage

$ aofljs-cli [options]
$ aofljs-cli [command] [options]

Options:

-h, --help     output usage information
-V, --version  output the version number
Examples:
$ aofljs-cli --help
$ aofljs-cli --version

Commands:

build       runs r.js in a directory containing __build.js file.
server      start http server
help [cmd]  display help for [cmd]
Examples:
$ aofljs-cli build -r
$ aofljs-cli server -dl
$ aofljs-cli help build

help

Usage:
aofljs-cli help [options]
Options:
build     output usage information for the build command. Equivalent to aofljs-cli build -h.
server    output usage information for the server command. Equivalent to aofljs-cli server -h.

server

aofljs-cli comes with a web server based on express. It supports development mode and live reload functionality.

Install livereload extensions in your browser to use this functionality.

Usage:
aofljs-cli server [options]
Options:
-d, --dev              dev mode, *.js instead of *.min.js
-H, --host [host]      set hostname
--cors                 allow CORS
--https                enable https
--force-https          force redirect to https
-l, --livereload       livereload
-m, --market [market]  specify market
-p, --port [port]      set port. defaults to 3000
-c, --config <path>    path to config file. Apps configuration will be used to add redirect rules when dev mode is enabeled. Server will redirect requsts, to build director, to source directory.
-h, --help             output usage information
Examples:
$ aofljs-cli server
$ aofljs-cli server -dl -H example.localhost.com -p 3000
$ aofljs-cli server --https

build-app

aofljs-cli build-app will rebuild desired directories into the output directory. The following files/directories will be filtered out:

  • .git
  • .spec.js
  • node_modules
  • bower_components
  • karma.conf.js
  • main.karma.js
  • .md

If market is specified next files/directories will overwrite original(without market prefix) files:

  • index-{market}.html
  • __build-{market}.js
  • js/main-{market}.js
  • js/config/local-api-config-{market}.json
  • js/config/stage-api-config-{market}.json
  • js/config/state-routes-{market}.js

Names may be provided as additional arguments with a config file to filter desired apps within the config file.

Usage:
aofljs-cli build-app [options]
Options:
-h, --help  output usage information
-c, --config <path> path to config file
-o, --output <path> path to output directory
-m, --market [market] specify market
-e, --regexp [pattern]  Use pattern to include or exclude files
Examples:
$ aofljs-cli build-app
$ aofljs-cli build-app myDir -o path/to/output/dir 
$ aofljs-cli build-app -c path/to/config.json
$ aofljs-cli build-app -c path/to/config.json name_one name_two
$ aofljs-cli build-app myDir -o path/to/output/dir -m jp
$ aofljs-cli build-app myDir -o path/to/output/dir -m jp -e '!**/home_page/**' -e '!**/otherpattern*/**' -e '**/node_modules/**'

default regexp list

[
  '**/*',
  '!**/.git/**',
  '!**/.git*',
  '!**/*.spec.js',
  '!**/node_modules/**',
  '!**/bower_components/**',
  '!**/karma.conf.js',
  '!**/main.karma.js',
  '!**/*.md'
]

Config format:

{
  "apps": [
    {
      "name": "app_name",
      "src": "dir_to_copy",
      "output": "output_dir",
      "market": "jp"
    }, 
    {...}
  ]
}

build

aofljs-cli build command runs requirejs optimizer on __build.js file. The recursive option can be used to traverse the subdirectories of the working directory to optimize all __build.js scripts.

Usage:
aofljs-cli build [options]
Options:
-r                     recursive build. 
-m, --market [market]  specify market
-h, --help             output usage information
Examples:
$ aofljs-cli build
$ aofljs-cli build -r
$ aofljs-cli build -r path/to/dir1
$ aofljs-cli build -r path/to/dir1 path/to/dir2 ptah/to/dir3
note:*

main.js builds fail in some cases with Error: /abs/path/to/main.js does not exist. To fix this issue update mainConfigFile path.

mainConfigFile: './main.js',

to

mainConfigFile: '../../app-directory/js/main.js',

translate

aofljs-cli pot translates marked text within html elements that have a translate attribute.

Usage:
aofljs-cli pot
Examples:
$ aofljs-cli pot dir/to/translate

License

The MIT License (MIT) Copyright (c) 2017 Age of Learning

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.