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

famous-webpack-seed

v0.9.2

Published

A seed project to get started with Webpack and Famo.us

Downloads

1

Readme

#Famous-Webpack-Seed

A seed project to get started with Webpack and Famo.us. Optional support for Cordova.

###Features

  • Your app is split into multiple bundles: ./src/xxxx/main.js > ./dist/xxxx/bundle.js
  • Require .jade, .coffee and .less
  • Support multiple configurations in your code: set window.ENV using the --env flag.
  • Support for Cordova/Phonegap

Getting started with Famo.us and webpack

####Installation

npm install -g webpack webpack-dev-server # install webpack
git clone https://github.com/markmarijnissen/famous-webpack-seed # clone this repository
# rm -rf .git # optionally remove git history
npm install # install dependencies

####Development

webpack-dev-server --reload=localhost

Now navigate to:

The optional --reload=ip flag adds the live-reload snippet to your bundle(s).

####Production

webpack --minify --env=production
  • The optional --minify flag minifies the output.
  • The optional --env=xxx flag sets a global ENV variable (default: window.TARGET='dev').

Getting started with Cordova

####Installation:

npm install -g cordova
webpack --cordova # automatically creates a Cordova config.xml
# change app ID in config.xml (optional)
cordova platform add ios # or android

webpack-cordova-plugin is used to add Cordova to your project.

####Development:

webpack-dev-server --cordova --reload=192.168.0.1 --ios # or --android

# in seperate terminal-tab, launch cordova
cordova run ios # or android
  • The --reload flag enables live reloading, and points Cordova to your webpack-dev-server.

  • The --ios or --android flags ensure the correct Cordova and plugin javascript is loaded. The javascript is different for each platform and located at platform/ios/www or platform/android/assets/www.

####Production:

webpack --cordova --minify
cordova run ios # or android

####Cordova troubleshooting For more information and troubleshooting see the webpack-cordova-plugin.


Advanced uses

Single entry-point

Don't like multiple entry points? Just modify the config.entry to point to your single entry point.

That was easy!

Extend this config

  1. Install famous-webpack-seed as npm module.
npm install famous-webpack-seed --save-dev
  1. Copy these devDependencies to your package.json and run npm install
{
  "coffee-loader": "^0.7.2",
  "coffee-script": "^1.7.1",
  "css-loader": "^0.7.0",
  "expose-loader": "^0.5.3",
  "file-loader": "git://github.com/talves/file-loader.git",
  "glob": "^4.0.5",
  "html-loader": "^0.2.2",
  "jade": "1.2.0",
  "jade-loader": "^0.6.1",
  "json-loader": "^0.5.1",
  "less": "^1.7.4",
  "less-loader": "^0.7.5",
  "optimist": "^0.6.1",
  "script-loader": "^0.6.0",
  "style-loader": "^0.6.4",
  "url-loader": "^0.5.5",
  "webpack": "^1.4.10",
  "webpack-cordova-plugin": "^0.1.3",
  "webpack-dev-server": "^1.6.5",
  "webpack-reload-plugin": "^0.1.1"
}
  1. A sample webpack.config.js to get started:
    var config = require('famous-webpack-seed');
    config.context     = __dirname + "/src";
    config.output.path = __dirname + "/dist";
    // modify any other properties of config here...
    module.exports = config;

Contributors

Like it? Show some love and star this project!