Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-cortex-module

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-cortex-module

babel plugin for cortex modules

  • 1.0.0-beta.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-cortex-module

babel plugin for import cortex module

Usage

Install

Install the plugin

npm i babel-plugin-cortex-module

Configuration

Define plugin in webpack.config.js and add neurons/ as resolve path:

module.exports = {
    module: {
        loaders: [{
            test: /\.jsx?$/,
            loader: 'babel',
            exclude: /node_modules/,  // Don't exclude 'neurons' here
            query: {
                presets: ['react', 'es2015'],
                plugins: ["cortex-module"]  // Define plugin here
            }
        }
    },
    resolve: {
        modulesDirectories: ["node_modules", "neurons"]  // Add 'neurons' here
    }
}

Module Usage

Add @cortex prefix to module name in your file:

var $ = require('@cortex/zepto');

// es2015 syntax also supported
import $ from '@cortex/zepto';

// requiring specific files
var something = require('@cortex/some-module/src/something');

Build

Run cortex install and then webpack directly.

#!/usr/bin/env bash
cortex install
webpack

Keywords

FAQs

Package last updated on 27 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc