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

appctheme

v1.0.3

Published

Simple theme compiler for appcelerator apps from the command line.

Downloads

3

Readme

appctheme

Simple theme builder for appcelerator apps. This is for a very specific use case where we had an appcelerator app that needed to be replicated (or white-labeled) and the only thing that was changing was colors, logo, and title. As it's very specific, please read through the entire Setup.

Install

Run npm install appctheme -g

Setup

You must have a theme directory inside your app directory as described here: http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes.

root
  +- app
    +- themes

Your themes folder should have at least one theme directory that is the name of your theme.

This folder should have the following:

  • assets directory
  • lib directory
  • styles directory
  • config.json file
  • DefaultIcon.png file
  • tiapp.xml file

Your assets directory is not used by this app, but should follow theming practices by appcelerator

lib can be an empty directory or you can use it as you wish. This app will install a colors.js file that you can use inside your appcelerator app. It is generated from the app.tss file inside the styles directory.

styles is a directory that should contain an app.tss file. The app.tss file styles should contain only single directives. e.g.:

'.headerBorder1':{
	backgroundColor: '#CEAD5B',
}

this won't work:

'.headerBorder1':{
	backgroundColor: '#CEAD5B',
  color: '#CEAD5B',
}

app.tss should at a minimum contain

'.headerBg':{
	backgroundColor: '#58A5C4',
}

as this will be used to generate your logo.

colors.js will end up creating an object such that if you did var colors = require('colors'); you could do colors.headerBorder1

config.json is the standard appcelerator config file. It will get copied over to the app directory. See http://docs.appcelerator.com/platform/latest/#!/guide/Project_Configuration_File_(config.json)

DefaultIcon.png is your logo. You can make it whatever size you want. I used 2048x2048 and it will be scaled down. If you open up the index.js file here you can see an option where you could create all the icons, but it's time consuming. This script will take your logo and apply the headerBg backgroundColor from the app.tss as stated above.

tiapp.xml is your standard tiapp.xml file that is generated when doing appc new. I put it in the theme folder because version numbers are managed by this script on deploy and it is copied over to the root of your project.

At the end your directory structure might look like this:

root/
  +- app/
    +- themes/
      +- mytheme/
        +- assets/
        +- lib/
        +- styles/
          +- app.tss (must contain at least '.headerBg':{backroundColor: #FFFFFF}; this is converted to ../lib/colors.js
        +- config.json (standard appcelerator config format); this is copied to ../../app/config.json
        +- DefaultIcon.png (2048x2048 or 1024x1024 may be transparent logo) solid background image is made from this an copied to ../../../DefaultIcon.png and appcelerator generates all the icons from this
        +- tiapp.xml (standard appcelerator file); version numbers will be changed in this file on release and copied to ../../../tiapp.xml

Run

From your appcelerator's project root directory, run appctheme.

Options

There are only a couple command line options:

  • skip-assets - Don't build images from DefaultIcon.png appctheme --skip-assets
  • theme - what theme to use instead of being prompted appctheme --theme=mytheme

Well, if that helps anyone, let me know.