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

generator-awesomeness

v0.2.7

Published

Yeoman generator for projects using the Awesomeness framework

Downloads

24

Readme

Awesomeness Generator

Yeoman generator for projects using the Awesomeness framework - quickly set up a lightweight project using Grunt, SASS, Compass, Susy, RequireJS and other amazing tools

Getting Started

What you'll need to get going

  • All the requirements installed
  • Basic understanding of how to use CSS modules
  • Basic understanding of how to use dynamic JavaScript modules

Awesomeness provides a lot of cool tools but you'll have to connect the dots yourself. We'll try to provide all the necessary information on this page but it might be useful to read some documentation and tutorials related to each tool (i. e. Sass/Compass, Susy, RequireJS, etc.).

Requirements

Due to its nature of being a design and development framework, Awesomeness does not work out of the box. It heavily relies on other tools and frameworks and combines them to provide great flexibility and power.

Ruby

If you're a Mac user it's easy — Ruby is already installed on your machine. If you happen to be using Windows, please go to the Ruby download page, where you can find an installer and further instructions on how to proceed.

Ruby Gems

Awesomeness is built upon Sass and Compass and uses the Susy grid framework for layouting and normalize.css to softly reset browser default CSS. Hence you need to install the following gems: sass, compass, compass-normalize, susy and breakpoint.

Simply fire up Terminal (or Command Prompt on Windows) and type in this command:

$ gem install sass compass:1.0.0.alpha.19 compass-normalize susy breakpoint

This will install all four gems, as well as their dependencies. Hooray!

Node.js

Awesomeness uses some of the incredible tools built with Node.js such as the taskrunner Grunt. Download it from the official Node.js website.

How To instantly work with Awesomeness

  • Install Ruby (Windows only)
  • Install Gems
$ gem install sass compass:1.0.0.alpha.19 compass-normalize susy breakpoint
  • Install Node.js
  • Install the awesomeness generator. This command will set up your Awesomeness project for you. As you install this npm package globally, you will have to use the prefix sudo prompting you for your computer's administrator password.
$ sudo npm install -g generator-awesomeness
  • Create a new directory for your project
$ mkdir my-new-project && cd $_
  • Run the generator
$ yo awesomeness
  • Run grunt and start building great things! This will automatically open a new browser window that updates as you make changes to your project. Neat!
$ grunt serve

Import Static Components

  • Create a <custom-name>.html HTML page, add the component code to it, for example
<div class="msg">
	Content
</div>
  • Add a <custom-name>.scss Sass file and import base styles and the component like so
@import "base";
@import "imports/modules/msg";
  • Connect the dots
<link rel="stylesheet" href="/css/<custom-name>.css">

Import Dynamic Components

Follow the steps on how to import a static content

  • Add a <custom-name>.js JavaScript file and require and initialize the component like so
require(["tabacccontroller"], function(TabAccController)
{
	// Initialize tab2acc component
	TabAccController.init();
});
  • Connect the dots and add the JavaScript file to your HTML
<!-- RequireJS -->
<script src="/js/require.js"></script>
<script>
	// Load page logic
	require(['/js/<custom-name>.js']);
</script>

Attention: The Button Dropdown component is special. There is no init method. You just have to require the component in your JavaScript and it will initialize itself.

Build your application

At some point you might want to lift your application from a development to a production stage in order to improve performance and upload it to a live server. Grunt can do the heavylifting, building the app, removing all unnecessary files and concatenating & minifying JavaScript and CSS.

When you're ready to build your application just run

$ grunt build

Grunt will compile the optimized application to the directory /dist/

You have to define new modules for RequireJS in your Gruntfile.js. There you must include the JavaScript modules which need to be available in production stage, like so:

modules: [
{
	name: "common"
},
{
	name: "main-forms",
	exclude: ["common"]
}
]

If you're not familiar with this, please read the RequireJS documentation and the description for grunt-contrib-requirejs.

License

MIT