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-aip-science-app

v0.5.0

Published

A generator for Science Apps for the Arabidopsis Information Portal

Downloads

28

Readme

AIP Science App Generator

Build Status Join the chat at https://gitter.im/Arabidopsis-Information-Portal/generator-aip-science-app

A Yeoman generator for building Science Applications for the Arabidopsis Information Portal

Arabidopsis Information Portal

Getting Started

To use the generator you'll need to have Node.js and npm installed. Install Yeoman and the app generator from npm using:

$ npm install -g yo generator-aip-science-app

Then, to create a science app in the current directory, initiate the generator:

$ yo aip-science-app

Your application code is in the app/ directory inside the generated application:

.
+-- app/
|   +-- app.html
|   +-- scripts/
|       +-- app.js
|   +-- styles/
|       +-- app.css

The main application HTML file is app.html. You can customize this file to control how your application looks. You can add custom CSS styles in styles/app.css. Finally, your application logic should be in scripts/app.js.

Next Steps

The generated application includes a "test runner" that provides a similar, albeit stripped down environment as the main AIP apps page. This allows you to easily develop your science app on your local development machine before needing to deploy it to the AIP application workspace.

You can run the test runner application with the command:

$ grunt

This will build your application and start a server on http://localhost:9000. It will also watch your application source files for changes and automatically reload the browser when changes are saved.

Adding third-party libraries

Third-party libraries are managed by Bower. Due to how we build AIP science apps, libraries must use a valid bower.json and must have main defined in the bower.json. This allows the apps environment to determine dependencies at runtime.

You can search for bower packages online or using the command line:

$ bower search <keyword>

To add a library:

$ bower install <package name> --save

Make sure that you include the --save so it's added to your application's own bower.json. Otherwise, the build tools won't know it's been added!

To remove a library:

$ bower uninstall <package name> --save

What about libraries not in the Bower registry?

Okay, okay, we know that not every library out there is going to have a bower package. Not to worry, there is still hope!

For libraries that don't have a bower package (or have an incomplete one) there are a couple of options:

  1. If the bower package exists but main is missing, the best thing to do is probably to contact the maintainer and ask them to fix it. Submit a pull request!

  2. Alternatively, you can fork the repo and add the main definition yourself.

  3. Bower doesn't require that a bower package actually be registered. You can use bower to include any library available from a Git endpoint, e.g., Github. But you will still need a bower.json for the app build.

  4. Fork the repository to your own Git repo and create a bower.json!

Compatibility and Best Practices

HTML

  1. Be careful using HTML IDs!

JavaScript

  1. Use closures!

More

More coming soon!

Packaging for deployment

Coming soon!

Other

AIP Science Apps use Grunt for executing development tasks and Bower for library and dependency management.

Release history

v0.3.2

  • Pin lodash version to 3.x.

v0.3.1

  • Added Araport App Manifest: araport-app.json. Declare your apps assets!

v0.2.8

  • added exclude rules for wiredep; exclude jQuery, already provided by the test runner environment

v0.2.7

v0.2.6

  • tests

v0.2.5

  • client generation was not using jQuery in the SwaggerApi init
  • properly URI encode values in token calls

v0.2.4

  • fix issue with Gruntfile not being properly escaped
  • create a bower_components dir even when no dependencies so that wiredep is happy

v0.2.3

  • updated documentation
  • fixed tests

v0.2.2

  • Added serve:dist config
  • Upgraded dependency handling to use wiredep
  • removed CDN-served files from bower (bower should only be app dependencies, not env dependencies)
  • Using Swagger Api using jQuery instead of Shred.js
  • Added /me endpoint to profiles spec
  • Updated files spec to include uploading a file directly
  • Updated swagger.js with better support for uploading files
  • include a README in the generated app

v0.2.0

  • Breaking changes to dependency handling related to upcoming changes in apps environment
  • added tests

v0.1.0

  • Initial release

License

MIT