cjs-to-es6 - CLI to convert CommonJS to ES6 modules

  •        174

CLI to convert JavaScript files from CommonJS to ES6 modules (aka ES2015 modules, aka JavaScript modules, aka hipster require()). This tool uses 5to6-codemod under the hood. It's basically just a thin convenience wrapper, which can process multiple files and convert both imports and exports.

https://github.com/nolanlawson/cjs-to-es6

Dependencies:

5to6-codemod : ^1.0.0
child-process-promise : ^1.1.0
colors : ^1.1.2
denodeify : ^1.2.1
findit : ^2.0.0
jscodeshift : ^0.3.12
lie : ^3.0.1
lodash.flatten : ^4.0.0
uniq : ^1.0.1
yargs : ^3.31.0

Tags
Implementation
License
Platform

   




Related Projects

es6-module-transpiler - Tomorrow’s JavaScript module syntax today

  •    Javascript

This project is part of esnext, which has merged with Babel. All the features of esnext are supported by Babel, and more. All the tests from esnext have been ported over to Babel to ensure that switchers will have minimal code changes to make. The maintainers of esnext will continue working on Babel to bring better spec compliance, ES6 feature support, and performance. If you want a fast tool with bundling support as found in this project, you should check out Rollup. ES6 Module Transpiler is an experimental compiler that allows you to write your JavaScript using a subset of the ES6 module syntax, and compile it into AMD or CommonJS modules.

The-complete-guide-to-modern-JavaScript-from-es2015-to-es2018 - A short, easy-to-follow ebook to learn about all the new features introduced from 2015 to 2018

  •    

This book is intended for somebody already familiar with the basics of JavaScript, as I am only focusing on the new features introduced by ES6 and I won't be explaining what is a var, how to create a function, etc... Additional chapters cover the new features introduced post ES6 (ES2015) all the way to the most recent version, ES2018.

not-awesome-es6-classes - A curated list of resources on why ES6 (aka ES2015) classes are NOT awesome

  •    

Reverse-inspired by all of the awesome lists on GitHub, like Awesome, Awesome Awesomeness, Awesome JavaScript, Awesome React, Awesome Cycle.js, Awesome Go, Awesome Elixir, Awesome Elm, etc. While ES6 brings several useful and syntactically pleasing new features to JavaScript, there are many people in the JS community who feel that adding class syntax to the language was a mistake. I share this sentiment, but I have encountered quite a few programmers in the wild who don't agree or simply don't seem to understand why some of us have this opinion. So, I wanted to create an online reference where people could come to learn specifically about this issue and why they might not actually need class syntax in JavaScript.

dependo - Visualize your CommonJS or AMD module dependencies in a force directed graph report.

  •    HTML

Visualize your CommonJS, AMD, or ES6 module dependencies in a force directed graph report - powered by D3.js. Let me introduce dependo - A small visualization tool that draws an force directed graph of JavaScript dependencies pulled from a codebase of CommonJS, AMD, or ES6. Behind the scene I’m using a wonderful library named node-madge, to extract the dependencies and combined with the power of D3.js I draw a beautiful zoomable directed graph.

es6-project-starter-kit - Universal Starter Kit to build any javascript ES6 project/library runnable in nodejs and on any browser

  •    Javascript

javascript 2015/es6/next introduces a lot of new cool features unfortunately not yet available in the current modern browsers. This starter kit contains all the tools you need to let you run your ES6 code on any kind of platform. If you have installed correctly all the nodejs modules you can start writing your javascript modules into the src folder of course using the awesome javascript es6 syntax.


ES6-for-humans - A kickstarter guide to writing ES6.

  •    

let allows you to create declarations which are bound to any block, called block scoping. Instead of using var, which provides function scope, it is recommended to use block scoped variables (let or const) in ES6. Arrow functions are a short-hand notation for writing functions in ES6. The arrow function definition consists of a parameter list ( ... ), followed by the => marker and a function body. For single-argument functions, the parentheses may be omitted.

Scratch-JS - Run ES6, CoffeeScript and LiveScript on any page from Chrome's DevTools!

  •    Javascript

It's a Chrome DevTools extension (available here) that allows you to execute ES6/ES2015 code in the context of the page you're viewing, as though it were the standard DevTools console. Once you familiarize yourself with some of the concepts and features of ES6/ES2015, install the extension. You'll then notice the Scratch JS tab inside DevTools (⌘-⌥-i on a Mac, ctrl-⇧-i on a PC). You can toggle console visibility with esc, and code can be executed either by clicking the Run it button, or using ⌘-↩ on a Mac, ctrl-↩ on a PC.

modules-webmake - Bundle CommonJS/Node.js modules for web browser

  •    Javascript

Bundle CommonJS/Node.js modules for web browsers. Webmake allows you to organize JavaScript code for the browser the same way as you do for Node.js.

Steal - Universal module loader

  •    Javascript

steal is unique because it can load JavaScript modules defined in ES6, AMD, and CommonJS formats (unlike most other module loaders, which only support one of these formats at a time). In JavaScript, the word "modules" refers to small units of independent, reusable code. They are the foundation of many JavaScript design patterns, and can look like this in ES6.

direction-reveal - Direction aware content reveals via hover or tab on an element.

  •    CSS

This plugin detects which direction a user enters/exits a block, allowing you to reveal/hide content based on this direction. The hidden content can animate in from the direction the user enters and animate out the direction the user leaves, allowing you to create interesting animation effects. The script is an ES6(ES2015) module but a compiled version is included in the build as index.js. You can also copy scripts/direction-reveal.js into your own site if your build process can accomodate ES6 modules, Babel and Browserify are used in the demo site.

parallax - ES6/ES2015 HW accelerated scrollable images parallax

  •    Javascript

ES6/ES2015 unobstrusive modern HW accelerated scrollable images parallax

rollup - Next-generation ES6 module bundler

  •    Javascript

Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the new standardized format for code modules included in the ES6 revision of JavaScript, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES6 modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. This will eventually be possible natively, but Rollup lets you do it today.Install with npm install --global rollup. Rollup can be used either through a command line interface with an optional configuration file, or else through its JavaScript API. Run rollup --help to see the available options and parameters. The starter project templates, rollup-starter-lib and rollup-starter-app, demonstrate common configuration options, and more detailed instructions are available throughout the user guide.

eslint-plugin-import - ESLint plugin with rules that help validate proper imports.

  •    Javascript

This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All the goodness that the ES2015+ static module syntax intends to provide, marked up in your editor. IF YOU ARE USING THIS WITH SUBLIME: see the bottom section for important info.

language-babel - ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM

  •    CoffeeScript

Language grammar for all versions of JavaScript including ES2016 and ESNext, JSX syntax as used by Facebook React, Atom's etch and others, as well as optional typed JavaScript using Facebook flow. This package also supports highlighting of GraphQL language constructs when inside certain JavaScript template strings. For .graphql and .gql file support please see language-graphql . The colour of syntax is determined by the theme in use. By default the language-babel package will detect file types .js,.babel,.jsx, .es, .es6, .mjs and .flow. Use the standard ATOM interface to enable it for other file types. This provides a grammar that scopes the file in order to colour the text in a meaningful way. If other JavaScript grammars are enabled these may take precedence over language-babel. Look at the bottom right status bar indicator to determine the language grammar of a file being edited. language-babel will be shown as either Babel or Babel ES6 JavaScript. Clicking the name will allow the grammar for a file to be changed.

es6-cheatsheet - ES2015 [ES6] cheatsheet containing tips, tricks, best practices and code snippets

  •    Javascript

Besides var, we now have access to two new identifiers for storing values —let and const. Unlike var, let and const statements are not hoisted to the top of their enclosing scope. This change in behavior highlights that we need to be careful when refactoring legacy code which uses var. Blindly replacing instances of var with let may lead to unexpected behavior.

rollupify - Browserify transform to apply Rollup

  •    Javascript

Browserify transform to apply Rollup, converting ES6/ES2015 modules into one big CommonJS module. This tends to result in smaller bundle sizes, due to Rollup's tree-shaking and scope-hoisting capabilities.

Webpack - A bundler for javascript and friends

  •    Javascript

Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset.

import-js - A tool to simplify importing JS modules

  •    Javascript

ImportJS is a tool to automatically import dependencies in your JavaScript project. Use it along with one of our editor integrations for Atom, Emacs, Sublime, Vim, or VS Code. Detailed instructions on how to install ImportJS can be found in the editor links above.

react-starterify - A minimal React JS application starter kit

  •    Javascript

A minimal React JS application starter kit. React Starterify aims to give you a good starting point for your projects. If you're looking for a minimal ES6 (ES2015) React JS starter with nice shallow rendering test examples, this is probably for you.






We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.