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

fc-ui2

v2.0.2

Published

FCUI2, a lightweight UI based on React and underscore.js.

Downloads

21

Readme

FCUI2

Build Status

What is FCUI2?

  • FCUI2 is a lightweight UI based on React and underscore.js.
  • FCUI2 adhere to AMD mechanism, your project need to employ javascript module loaders such as RequireJS, curl, Dojo to import FCUI2 modules.
  • All widgets in FCUI2 are written in JSX, you need to import compilation tools such as Babel to your development environment and package tools.

See FCUI2 examples

  • Enter FCUI2 root directory, install scaffold tools by running:
    npm install edp
  • Start a http server by running:
    edp webserver start

or by running

    npm install
    mkdir -p node_modules/edp/node_modules
    npm start
  • Using a browser to access URL:

      http://localhost:8847/index.html

Use FCUI2 in browsers

  • Clone a copy of the main git repo by running:
    git clone https://github.com/fcfe/fcui2.git
  • Compile fcui2/src/css/main.less, fcui2/src/css/icon/fc-icon.less to css file, or add less compiling module to your development environment, then import style sheet in your home page:
    <link rel="stylesheet" href="./dep/fcui2/src/css/icon/fc-icon.css"/>
    <link rel="stylesheet" href="./dep/fcui2/src/css/main.css"/>
  • Configure the underlying dependency like:
    require.config({
        baseUrl: './src',
        paths: {
            'react-dom': '../dep/react/react-dom',
            'react': '../dep/react/react-with-addons'
        },
        packages: [
            {
                name: 'fcui',
                location: '../dep/fcui/src',
                main: 'main'
            },
            {
                name: 'underscore',
                location: '../dep/underscore/1.8.5/src',
                main: 'underscore'
            }
        ]
    });
  • Create a simple project in src/main.js like:
    define(function (require) {

        var ReactDOM = require('react-dom');
        var React = require('react');
        var App = require('./app.jsx');
        var props = {};

        ReactDOM.render(
            React.createElement(App, props),
            document.getElementById('react-container')
        );

    });
  • Create a html file for access like:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="./dep/fcui2/css/icon/fc-icon.css"/>
<link rel="stylesheet" href="./dep/fcui2/src/css/main.css"/>
</head>
<body><div id="react-container"></div></body>
<script type="text/javascript" src="./dep/require.js"></script>
<script type="text/javascript">
    require.config({
        baseUrl: './src',
        paths: {
            'react-dom': '../dep/react/react-dom',
            'react': '../dep/react/react-with-addons'
        },
        packages: [
            {
                name: 'fcui',
                location: '../dep/fcui/src',
                main: 'main'
            },
            {
                name: 'underscore',
                location: '../dep/underscore/1.8.5/src',
                main: 'underscore'
            }
        ]
    });
    require(['main']);
</script>
</html>
  • Here is an example for src/App.jsx.js:
    define(function (require) {

        var React = require('react');
        var TextBox = require('fcui/TextBox.jsx');
        var Button = require('fcui/Button.jsx');

        return React.createClass({
            // @override
            getDefaultProps: function () {
                return {
                    name: 'Brian',
                    age: '18'
                };
            },
            // @override
            getInitialState: function () {
                return {

                };
            },
            render: function () {
                return (
                    <div>
                        Name: <TextBox value={this.props.name} /><br/>
                        Age: <TextBox value={this.props.age} /><br/>
                        <Button label="OK" />
                    </div>
                );
            }
        });
    });

How to run FCUI2 test

$ npm install
$ npm test

or

$ npm install
$ edp test start

Author

  • email: [email protected]
  • weibo: http://weibo.com/lbxx1984
  • blog: http://blog.csdn.net/lbxx1984