@lectro/core

An Awesome Transformer for your Node and your Browser code

Stats

StarsIssuesVersionUpdatedCreatedSize
@lectro/core
1.1.3-alpha.113 years ago4 years agoMinified + gzip package size for @lectro/core in KB

Readme

Lectro Core

What is Lectro

Lectro enables Node Application to work with different languages that compiles to JS, very smoothly whether it is Coffeescript, Purescript, Typescript or even OCaml (BuckleScript)

Lectro uses Webpack and its loaders internally, but it is extremely easier to use and extend.

Lectro Core API provides

  • A devserver to run Node Application which restarts whenever any file changes, powered by nodemon.

  • A Build Command to build your Node Application to one bundle.

  • An Extend Command to extend Lectro capabilities, mostly to include a file loader.

Example

  • To use the devserver
const Lectro = require('@lectro/core');
(new Lectro('web'/* or node*/)).dev();

Now save this file as run.js at your project root and start the server with node run.js

That's It

Devserver assumes your entry file at src/index.js

  • To build your application
const Lectro = require('@lectro/core');
(new Lectro('web'/* or node*/)).build();

Now save this file as build.js at your project root and start the build with node build.js

Enter the Enhancers

An Enhancer typically enhances lectro features

const Lectro = require('@lectro/core')
const CommonUtilsEnhancer = require('@lectro/enhancer-commonutils')

const lectro = new Lectro('web'/* Target */).apply(CommonUtilsEnhancer)

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.