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

fecmd

v1.0.2

Published

FE CMD(Common Module Definition)

Downloads

8

Readme

fecmd

install

sudo npm install fecmd -g

fecmd source export
// or 
npm install fecmd --save

.es6 more infomation https://babeljs.io/docs/learn-es2015/

Documentation

config

//fecmd.config

modulePath: bower module path(node model)

priority

0. commond line

//a) scan src/source folder, convert all js files and export export/js with same name
fecmd src/source export/js

//or b) convert app.js to export/

fecmd src/script/app.js export/

//or c)
//use base path and export with a flag 'out' such source app.js export app.out.js

fecmd src/script/app.js

//or d)
//scan current folder, convert all js files, export like c) 
fecmd

//or e)
//use fecmd.config
fecmd -e

1. modulesPath (must be exact path) 2. .bowerrc directory (if exists) 3. bower_components (if exists) 4. modulesPath (!!modulesPath === false)

{
    "modulesPath":"",
    "filesDir": [
        {
            "source": "src/scripts/",
            "exports": "src/export/js/"
        }
    ]
}

program file

<!-- file index.html -->
<script src="js/a.js"></script>
// file a.js

var b = require('lib/b.js'); // '[./]lib/b[.js]'
var tpl = require('tpl/xx.tpl'); //return a string
var json = require('data/data.json'); //return the Object
var es6 = require('lib/file.es6'); // return es5 code
// or
// require('c.js');
// require('d');
// 
// you can quote module 
// from bower module lick this require('jquery'), without 
// extname and without a filename jquery or jquery.js file
// in the same dir with a.js
require('jquery');


/* do something */
var console.log(b.c);
// file lib/b.js

// other code do something
// such
// require()...
// var a,b,c...
// function(){} ...

//export your module
//*
module.exports = {
    c: 2,
    cc: 23
}
/*/
//or
exports.c = 2;
exports.cc = 23;
//*/
//

es6

// file.es6

class Calc {
    constructor() {
        console.log('Calc constructor');
    }
    add(a, b) {
        return a + b;
    }
}

module.exports = Calc;

// usage
// var c = new Calc();
// console.log(c.add(1, 2));

template

require support template (*.tpl) like this file "xx.tpl" and export a string

<div>
    {{#list}}
    <span>{{supportTemplate}}</span>
    {{/list}}
</div>

export

"<div>\n    {{#list}}\n    <span>{{supportTemplate}}</span>\n    {{/list}}\n</div>"

more -- Test Demo https://github.com/shalles/fecmd/tree/master/test